fie 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3b6f35b993cf269f20a901f405e6e60448d52cd
4
- data.tar.gz: '09becea6eb2e41de48aba6468f982303fc90735a'
3
+ metadata.gz: 155692e3c91858b2b1a70fb6def818b2381e7e18
4
+ data.tar.gz: 33672bc19dc57be4a2ec61ddbb4bb573763b5e10
5
5
  SHA512:
6
- metadata.gz: e8c631176e472bff4a13c9ed795e8fd4b47c1882f77b0ffc0b5bdfe293b48a6ba6e8d7f9368575a0ddea70f4b141f26f2e4de10e581884004b0d2109fe3837f6
7
- data.tar.gz: 6774945a46c61a0e2ab636c0b807e2a671091c045fc850c35d7006d3d2c5258a2d9042ce7c32e786cd1a43bfe715a97c88399db79441e817ffdc2282794aed88
6
+ metadata.gz: e56bb4cb01c5268bab2e59b38e7558535fea2b6b4bed9390f762f1ac24e22fce21c848aed4859574d5588ba700201d9055e2636678773f428afa07df09351375
7
+ data.tar.gz: 389e2cca0aaf804d93d81f4cfe2d2852309bdbdc82166eb69494113aeac07c8683012758a0bd65c72963a36c5fce76414ef780998bdb4454c2be859fe15de548
data/README.md CHANGED
@@ -21,13 +21,13 @@ fie therefore replaces traditional Javascript frontend frameworks while requirin
21
21
 
22
22
  1. Add the gem to your gemfile like so:
23
23
  ```ruby
24
- gem 'fie', '~> 0.3.2'
24
+ gem 'fie', '~> 0.3.3'
25
25
  ```
26
26
  2. Run the bundler
27
27
  ```bash
28
28
  $ bundle install
29
29
  ```
30
- 3. Replace yield in your main layout with `render template: 'layouts/fie' %>`. Below is an example.
30
+ 3. Replace yield in your main layout with `<%= render template: 'layouts/fie' %>`. Below is an example.
31
31
  * Old:
32
32
  ```erb
33
33
  <!DOCTYPE html>
@@ -17,6 +17,8 @@ module Fie
17
17
  controller_name: params['controller_name'],
18
18
  action_name: params['action_name'],
19
19
  uuid: self.params[:identifier]
20
+
21
+ execute_js_function('Fie.triggerFieReadyEvent')
20
22
  end
21
23
 
22
24
  def unsubscribed
@@ -1,3 +1,3 @@
1
1
  module Fie
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -15,12 +15,17 @@ export class Fie {
15
15
  }
16
16
 
17
17
  executeCommanderMethod(functionName, parameters = {}) {
18
- this.cable.callRemoteFunction(document.body, 'calling remote function', functionName, JSON.parse(JSON.stringify(parameters)));
18
+ this.cable.callRemoteFunction(document.body, functionName, 'calling remote function', JSON.parse(JSON.stringify(parameters)));
19
19
  }
20
20
 
21
21
  addEventListener(eventName, selector, callback) {
22
22
  Util.addEventListener(eventName, selector, callback);
23
23
  }
24
+
25
+ triggerFieReadyEvent() {
26
+ const fieReadyEvent = new Event('fieReady');
27
+ document.dispatchEvent(fieReadyEvent);
28
+ }
24
29
 
25
30
  _diffSetup() {
26
31
  polyfill();
@@ -16,7 +16,8 @@ export class Commander extends Channel {
16
16
  switch(command) {
17
17
  case 'refresh_view':
18
18
  innerHTML(document.querySelector('[fie-body=true]'), parameters.html);
19
- document.dispatchEvent(new Event(this.eventName));
19
+ const event = new Event(this.eventName);
20
+ document.dispatchEvent(event);
20
21
  break;
21
22
  case 'subscribe_to_pools':
22
23
  parameters.subjects.forEach(subject => this.cable.subscribeToPool(subject));
@@ -10,7 +10,7 @@ export class Util {
10
10
  }
11
11
 
12
12
  static execJS(functionName, args = []) {
13
- window[functionName](...args);
13
+ eval(functionName)(...args);
14
14
  }
15
15
 
16
16
  static get viewVariables() {
@@ -1 +1 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){"use strict";(function(e){t.a=void 0!==e?e:{env:{NODE_ENV:"development"}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=("object"===(void 0===e?"undefined":r(e))?e:window).document?document.createElement("div"):null;function i(e){return o&&e&&e.indexOf&&e.includes("&")?(o.innerHTML=e,o.textContent):e}}).call(this,n(5))},function(e,t,n){"use strict";(function(e){var n=new Map,r="undefined"!=typeof location,o=void 0!==e&&e.argv,i=function(){};t.a=function(t,a){var u=r&&location.search.includes("diff_perf"),c=o&&e.argv.includes("diff_perf");return u||c?function(e){t&&t.host?e=t.host.constructor.name+" "+e:"function"==typeof a.rawNodeName&&(e=a.rawNodeName.name+" "+e);var r=e+"-end";if(n.has(e)){var o=(performance.now()-n.get(e)).toFixed(3);n.delete(e),performance.mark(r),performance.measure("diffHTML "+e+" ("+o+"ms)",e,r)}else n.set(e,performance.now()),performance.mark(e)}:i}}).call(this,n(4))},function(e,t,n){var r=n(12),o=n(11);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],s=!1,f=-1;function d(){s&&c&&(s=!1,c.length?l=c.concat(l):f=-1,l.length&&p())}function p(){if(!s){var e=u(d);s=!0;for(var t=l.length;t;){for(c=l,l=[];++f<t;)c&&c[f].run();f=-1,t=l.length}c=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||s||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(void 0!==o&&null!==o)for(var i=Object.keys(Object(o)),a=0,u=i.length;a<u;a++){var c=i[a],l=Object.getOwnPropertyDescriptor(o,c);void 0!==l&&l.enumerable&&(n[c]=o[c])}}return n}e.exports={assign:r,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:r})}}},function(e,t,n){var r,o;!function(i){var a=function(e,t,n){if(!d(t)||h(t)||v(t)||y(t)||f(t))return t;var r,o=0,i=0;if(p(t))for(r=[],i=t.length;o<i;o++)r.push(a(e,t[o],n));else for(var u in r={},t)Object.prototype.hasOwnProperty.call(t,u)&&(r[e(u,n)]=a(e,t[u],n));return r},u=function(e){return m(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)},c=function(e){var t=u(e);return t.substr(0,1).toUpperCase()+t.substr(1)},l=function(e,t){return function(e,t){var n=(t=t||{}).separator||"_",r=t.split||/(?=[A-Z])/;return e.split(r).join(n)}(e,t).toLowerCase()},s=Object.prototype.toString,f=function(e){return"function"==typeof e},d=function(e){return e===Object(e)},p=function(e){return"[object Array]"==s.call(e)},h=function(e){return"[object Date]"==s.call(e)},v=function(e){return"[object RegExp]"==s.call(e)},y=function(e){return"[object Boolean]"==s.call(e)},m=function(e){return(e-=0)==e},g=function(e,t){var n=t&&"process"in t?t.process:t;return"function"!=typeof n?e:function(t,r){return n(t,e,r)}};void 0===(o="function"==typeof(r={camelize:u,decamelize:l,pascalize:c,depascalize:l,camelizeKeys:function(e,t){return a(g(u,t),e)},decamelizeKeys:function(e,t){return a(g(l,t),e,t)},pascalizeKeys:function(e,t){return a(g(c,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}})?r.call(t,n,t,e):r)||(e.exports=o)}()},function(e,t,n){(function(e,n){var r;!function(){var o="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},i=o._,a=Array.prototype,u=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,l=a.push,s=a.slice,f=u.toString,d=u.hasOwnProperty,p=Array.isArray,h=Object.keys,v=Object.create,y=function(){},m=function(e){return e instanceof m?e:this instanceof m?void(this._wrapped=e):new m(e)};void 0===t||t.nodeType?o._=m:(void 0!==n&&!n.nodeType&&n.exports&&(t=n.exports=m),t._=m),m.VERSION="1.9.1";var g,b=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)}}return function(){return e.apply(t,arguments)}},N=function(e,t,n){return m.iteratee!==g?m.iteratee(e,t):null==e?m.identity:m.isFunction(e)?b(e,t,n):m.isObject(e)&&!m.isArray(e)?m.matcher(e):m.property(e)};m.iteratee=g=function(e,t){return N(e,t,1/0)};var w=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),o=0;o<n;o++)r[o]=arguments[o+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var i=Array(t+1);for(o=0;o<t;o++)i[o]=arguments[o];return i[t]=r,e.apply(this,i)}},E=function(e){if(!m.isObject(e))return{};if(v)return v(e);y.prototype=e;var t=new y;return y.prototype=null,t},T=function(e){return function(t){return null==t?void 0:t[e]}},_=function(e,t){return null!=e&&d.call(e,t)},k=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},S=Math.pow(2,53)-1,x=T("length"),O=function(e){var t=x(e);return"number"==typeof t&&t>=0&&t<=S};m.each=m.forEach=function(e,t,n){var r,o;if(t=b(t,n),O(e))for(r=0,o=e.length;r<o;r++)t(e[r],r,e);else{var i=m.keys(e);for(r=0,o=i.length;r<o;r++)t(e[i[r]],i[r],e)}return e},m.map=m.collect=function(e,t,n){t=N(t,n);for(var r=!O(e)&&m.keys(e),o=(r||e).length,i=Array(o),a=0;a<o;a++){var u=r?r[a]:a;i[a]=t(e[u],u,e)}return i};var j=function(e){return function(t,n,r,o){var i=arguments.length>=3;return function(t,n,r,o){var i=!O(t)&&m.keys(t),a=(i||t).length,u=e>0?0:a-1;for(o||(r=t[i?i[u]:u],u+=e);u>=0&&u<a;u+=e){var c=i?i[u]:u;r=n(r,t[c],c,t)}return r}(t,b(n,o,4),r,i)}};m.reduce=m.foldl=m.inject=j(1),m.reduceRight=m.foldr=j(-1),m.find=m.detect=function(e,t,n){var r=(O(e)?m.findIndex:m.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},m.filter=m.select=function(e,t,n){var r=[];return t=N(t,n),m.each(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r},m.reject=function(e,t,n){return m.filter(e,m.negate(N(t)),n)},m.every=m.all=function(e,t,n){t=N(t,n);for(var r=!O(e)&&m.keys(e),o=(r||e).length,i=0;i<o;i++){var a=r?r[i]:i;if(!t(e[a],a,e))return!1}return!0},m.some=m.any=function(e,t,n){t=N(t,n);for(var r=!O(e)&&m.keys(e),o=(r||e).length,i=0;i<o;i++){var a=r?r[i]:i;if(t(e[a],a,e))return!0}return!1},m.contains=m.includes=m.include=function(e,t,n,r){return O(e)||(e=m.values(e)),("number"!=typeof n||r)&&(n=0),m.indexOf(e,t,n)>=0},m.invoke=w(function(e,t,n){var r,o;return m.isFunction(t)?o=t:m.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),m.map(e,function(e){var i=o;if(!i){if(r&&r.length&&(e=k(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)})}),m.pluck=function(e,t){return m.map(e,m.property(t))},m.where=function(e,t){return m.filter(e,m.matcher(t))},m.findWhere=function(e,t){return m.find(e,m.matcher(t))},m.max=function(e,t,n){var r,o,i=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var u=0,c=(e=O(e)?e:m.values(e)).length;u<c;u++)null!=(r=e[u])&&r>i&&(i=r);else t=N(t,n),m.each(e,function(e,n,r){((o=t(e,n,r))>a||o===-1/0&&i===-1/0)&&(i=e,a=o)});return i},m.min=function(e,t,n){var r,o,i=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var u=0,c=(e=O(e)?e:m.values(e)).length;u<c;u++)null!=(r=e[u])&&r<i&&(i=r);else t=N(t,n),m.each(e,function(e,n,r){((o=t(e,n,r))<a||o===1/0&&i===1/0)&&(i=e,a=o)});return i},m.shuffle=function(e){return m.sample(e,1/0)},m.sample=function(e,t,n){if(null==t||n)return O(e)||(e=m.values(e)),e[m.random(e.length-1)];var r=O(e)?m.clone(e):m.values(e),o=x(r);t=Math.max(Math.min(t,o),0);for(var i=o-1,a=0;a<t;a++){var u=m.random(a,i),c=r[a];r[a]=r[u],r[u]=c}return r.slice(0,t)},m.sortBy=function(e,t,n){var r=0;return t=N(t,n),m.pluck(m.map(e,function(e,n,o){return{value:e,index:r++,criteria:t(e,n,o)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")};var A=function(e,t){return function(n,r,o){var i=t?[[],[]]:{};return r=N(r,o),m.each(n,function(t,o){var a=r(t,o,n);e(i,t,a)}),i}};m.groupBy=A(function(e,t,n){_(e,n)?e[n].push(t):e[n]=[t]}),m.indexBy=A(function(e,t,n){e[n]=t}),m.countBy=A(function(e,t,n){_(e,n)?e[n]++:e[n]=1});var C=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;m.toArray=function(e){return e?m.isArray(e)?s.call(e):m.isString(e)?e.match(C):O(e)?m.map(e,m.identity):m.values(e):[]},m.size=function(e){return null==e?0:O(e)?e.length:m.keys(e).length},m.partition=A(function(e,t,n){e[n?0:1].push(t)},!0),m.first=m.head=m.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:m.initial(e,e.length-t)},m.initial=function(e,t,n){return s.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},m.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:m.rest(e,Math.max(0,e.length-t))},m.rest=m.tail=m.drop=function(e,t,n){return s.call(e,null==t||n?1:t)},m.compact=function(e){return m.filter(e,Boolean)};var M=function(e,t,n,r){for(var o=(r=r||[]).length,i=0,a=x(e);i<a;i++){var u=e[i];if(O(u)&&(m.isArray(u)||m.isArguments(u)))if(t)for(var c=0,l=u.length;c<l;)r[o++]=u[c++];else M(u,t,n,r),o=r.length;else n||(r[o++]=u)}return r};m.flatten=function(e,t){return M(e,t,!1)},m.without=w(function(e,t){return m.difference(e,t)}),m.uniq=m.unique=function(e,t,n,r){m.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=N(n,r));for(var o=[],i=[],a=0,u=x(e);a<u;a++){var c=e[a],l=n?n(c,a,e):c;t&&!n?(a&&i===l||o.push(c),i=l):n?m.contains(i,l)||(i.push(l),o.push(c)):m.contains(o,c)||o.push(c)}return o},m.union=w(function(e){return m.uniq(M(e,!0,!0))}),m.intersection=function(e){for(var t=[],n=arguments.length,r=0,o=x(e);r<o;r++){var i=e[r];if(!m.contains(t,i)){var a;for(a=1;a<n&&m.contains(arguments[a],i);a++);a===n&&t.push(i)}}return t},m.difference=w(function(e,t){return t=M(t,!0,!0),m.filter(e,function(e){return!m.contains(t,e)})}),m.unzip=function(e){for(var t=e&&m.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=m.pluck(e,r);return n},m.zip=w(m.unzip),m.object=function(e,t){for(var n={},r=0,o=x(e);r<o;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var R=function(e){return function(t,n,r){n=N(n,r);for(var o=x(t),i=e>0?0:o-1;i>=0&&i<o;i+=e)if(n(t[i],i,t))return i;return-1}};m.findIndex=R(1),m.findLastIndex=R(-1),m.sortedIndex=function(e,t,n,r){for(var o=(n=N(n,r,1))(t),i=0,a=x(e);i<a;){var u=Math.floor((i+a)/2);n(e[u])<o?i=u+1:a=u}return i};var V=function(e,t,n){return function(r,o,i){var a=0,u=x(r);if("number"==typeof i)e>0?a=i>=0?i:Math.max(i+u,a):u=i>=0?Math.min(i+1,u):i+u+1;else if(n&&i&&u)return r[i=n(r,o)]===o?i:-1;if(o!=o)return(i=t(s.call(r,a,u),m.isNaN))>=0?i+a:-1;for(i=e>0?a:u-1;i>=0&&i<u;i+=e)if(r[i]===o)return i;return-1}};m.indexOf=V(1,m.findIndex,m.sortedIndex),m.lastIndexOf=V(-1,m.findLastIndex),m.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),o=Array(r),i=0;i<r;i++,e+=n)o[i]=e;return o},m.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,o=e.length;r<o;)n.push(s.call(e,r,r+=t));return n};var I=function(e,t,n,r,o){if(!(r instanceof t))return e.apply(n,o);var i=E(e.prototype),a=e.apply(i,o);return m.isObject(a)?a:i};m.bind=w(function(e,t,n){if(!m.isFunction(e))throw new TypeError("Bind must be called on a function");var r=w(function(o){return I(e,r,t,this,n.concat(o))});return r}),m.partial=w(function(e,t){var n=m.partial.placeholder,r=function(){for(var o=0,i=t.length,a=Array(i),u=0;u<i;u++)a[u]=t[u]===n?arguments[o++]:t[u];for(;o<arguments.length;)a.push(arguments[o++]);return I(e,r,this,this,a)};return r}),m.partial.placeholder=m,m.bindAll=w(function(e,t){var n=(t=M(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=m.bind(e[r],e)}}),m.memoize=function(e,t){var n=function(r){var o=n.cache,i=""+(t?t.apply(this,arguments):r);return _(o,i)||(o[i]=e.apply(this,arguments)),o[i]};return n.cache={},n},m.delay=w(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)}),m.defer=m.partial(m.delay,m,1),m.throttle=function(e,t,n){var r,o,i,a,u=0;n||(n={});var c=function(){u=!1===n.leading?0:m.now(),r=null,a=e.apply(o,i),r||(o=i=null)},l=function(){var l=m.now();u||!1!==n.leading||(u=l);var s=t-(l-u);return o=this,i=arguments,s<=0||s>t?(r&&(clearTimeout(r),r=null),u=l,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(c,s)),a};return l.cancel=function(){clearTimeout(r),u=0,r=o=i=null},l},m.debounce=function(e,t,n){var r,o,i=function(t,n){r=null,n&&(o=e.apply(t,n))},a=w(function(a){if(r&&clearTimeout(r),n){var u=!r;r=setTimeout(i,t),u&&(o=e.apply(this,a))}else r=m.delay(i,t,this,a);return o});return a.cancel=function(){clearTimeout(r),r=null},a},m.wrap=function(e,t){return m.partial(t,e)},m.negate=function(e){return function(){return!e.apply(this,arguments)}},m.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},m.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},m.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},m.once=m.partial(m.before,2),m.restArguments=w;var L=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],D=function(e,t){var n=F.length,r=e.constructor,o=m.isFunction(r)&&r.prototype||u,i="constructor";for(_(e,i)&&!m.contains(t,i)&&t.push(i);n--;)(i=F[n])in e&&e[i]!==o[i]&&!m.contains(t,i)&&t.push(i)};m.keys=function(e){if(!m.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)_(e,n)&&t.push(n);return L&&D(e,t),t},m.allKeys=function(e){if(!m.isObject(e))return[];var t=[];for(var n in e)t.push(n);return L&&D(e,t),t},m.values=function(e){for(var t=m.keys(e),n=t.length,r=Array(n),o=0;o<n;o++)r[o]=e[t[o]];return r},m.mapObject=function(e,t,n){t=N(t,n);for(var r=m.keys(e),o=r.length,i={},a=0;a<o;a++){var u=r[a];i[u]=t(e[u],u,e)}return i},m.pairs=function(e){for(var t=m.keys(e),n=t.length,r=Array(n),o=0;o<n;o++)r[o]=[t[o],e[t[o]]];return r},m.invert=function(e){for(var t={},n=m.keys(e),r=0,o=n.length;r<o;r++)t[e[n[r]]]=n[r];return t},m.functions=m.methods=function(e){var t=[];for(var n in e)m.isFunction(e[n])&&t.push(n);return t.sort()};var P=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var o=1;o<r;o++)for(var i=arguments[o],a=e(i),u=a.length,c=0;c<u;c++){var l=a[c];t&&void 0!==n[l]||(n[l]=i[l])}return n}};m.extend=P(m.allKeys),m.extendOwn=m.assign=P(m.keys),m.findKey=function(e,t,n){t=N(t,n);for(var r,o=m.keys(e),i=0,a=o.length;i<a;i++)if(t(e[r=o[i]],r,e))return r};var z,H,B=function(e,t,n){return t in n};m.pick=w(function(e,t){var n={},r=t[0];if(null==e)return n;m.isFunction(r)?(t.length>1&&(r=b(r,t[1])),t=m.allKeys(e)):(r=B,t=M(t,!1,!1),e=Object(e));for(var o=0,i=t.length;o<i;o++){var a=t[o],u=e[a];r(u,a,e)&&(n[a]=u)}return n}),m.omit=w(function(e,t){var n,r=t[0];return m.isFunction(r)?(r=m.negate(r),t.length>1&&(n=t[1])):(t=m.map(M(t,!1,!1),String),r=function(e,n){return!m.contains(t,n)}),m.pick(e,r,n)}),m.defaults=P(m.allKeys,!0),m.create=function(e,t){var n=E(e);return t&&m.extendOwn(n,t),n},m.clone=function(e){return m.isObject(e)?m.isArray(e)?e.slice():m.extend({},e):e},m.tap=function(e,t){return t(e),e},m.isMatch=function(e,t){var n=m.keys(t),r=n.length;if(null==e)return!r;for(var o=Object(e),i=0;i<r;i++){var a=n[i];if(t[a]!==o[a]||!(a in o))return!1}return!0},z=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&H(e,t,n,r)},H=function(e,t,n,r){e instanceof m&&(e=e._wrapped),t instanceof m&&(t=t._wrapped);var o=f.call(e);if(o!==f.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return c.valueOf.call(e)===c.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,u=t.constructor;if(a!==u&&!(m.isFunction(a)&&a instanceof a&&m.isFunction(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var l=n.length;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),i){if((l=e.length)!==t.length)return!1;for(;l--;)if(!z(e[l],t[l],n,r))return!1}else{var s,d=m.keys(e);if(l=d.length,m.keys(t).length!==l)return!1;for(;l--;)if(s=d[l],!_(t,s)||!z(e[s],t[s],n,r))return!1}return n.pop(),r.pop(),!0},m.isEqual=function(e,t){return z(e,t)},m.isEmpty=function(e){return null==e||(O(e)&&(m.isArray(e)||m.isString(e)||m.isArguments(e))?0===e.length:0===m.keys(e).length)},m.isElement=function(e){return!(!e||1!==e.nodeType)},m.isArray=p||function(e){return"[object Array]"===f.call(e)},m.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},m.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e){m["is"+e]=function(t){return f.call(t)==="[object "+e+"]"}}),m.isArguments(arguments)||(m.isArguments=function(e){return _(e,"callee")});var U=o.document&&o.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof U&&(m.isFunction=function(e){return"function"==typeof e||!1}),m.isFinite=function(e){return!m.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},m.isNaN=function(e){return m.isNumber(e)&&isNaN(e)},m.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===f.call(e)},m.isNull=function(e){return null===e},m.isUndefined=function(e){return void 0===e},m.has=function(e,t){if(!m.isArray(t))return _(e,t);for(var n=t.length,r=0;r<n;r++){var o=t[r];if(null==e||!d.call(e,o))return!1;e=e[o]}return!!n},m.noConflict=function(){return o._=i,this},m.identity=function(e){return e},m.constant=function(e){return function(){return e}},m.noop=function(){},m.property=function(e){return m.isArray(e)?function(t){return k(t,e)}:T(e)},m.propertyOf=function(e){return null==e?function(){}:function(t){return m.isArray(t)?k(e,t):e[t]}},m.matcher=m.matches=function(e){return e=m.extendOwn({},e),function(t){return m.isMatch(t,e)}},m.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var o=0;o<e;o++)r[o]=t(o);return r},m.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},m.now=Date.now||function(){return(new Date).getTime()};var $={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},q=m.invert($),K=function(e){var t=function(t){return e[t]},n="(?:"+m.keys(e).join("|")+")",r=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(o,t):e}};m.escape=K($),m.unescape=K(q),m.result=function(e,t,n){m.isArray(t)||(t=[t]);var r=t.length;if(!r)return m.isFunction(n)?n.call(e):n;for(var o=0;o<r;o++){var i=null==e?void 0:e[t[o]];void 0===i&&(i=n,o=r),e=m.isFunction(i)?i.call(e):i}return e};var J=0;m.uniqueId=function(e){var t=++J+"";return e?e+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var W=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Z=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+G[e]};m.template=function(e,t,n){!t&&n&&(t=n),t=m.defaults({},t,m.templateSettings);var r,o=RegExp([(t.escape||W).source,(t.interpolate||W).source,(t.evaluate||W).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(o,function(t,n,r,o,u){return a+=e.slice(i,u).replace(Z,Q),i=u+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var u=function(e){return r.call(this,e,m)},c=t.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},m.chain=function(e){var t=m(e);return t._chain=!0,t};var X=function(e,t){return e._chain?m(t).chain():t};m.mixin=function(e){return m.each(m.functions(e),function(t){var n=m[t]=e[t];m.prototype[t]=function(){var e=[this._wrapped];return l.apply(e,arguments),X(this,n.apply(m,e))}}),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];m.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],X(this,n)}}),m.each(["concat","join","slice"],function(e){var t=a[e];m.prototype[e]=function(){return X(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return m}.apply(t,[]))||(n.exports=r)}()}).call(this,n(5),n(10)(e))},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"StateCache",function(){return f}),n.d(r,"NodeCache",function(){return d}),n.d(r,"TransitionCache",function(){return p}),n.d(r,"MiddlewareCache",function(){return h});var o={};n.r(o),n.d(o,"protectVTree",function(){return G}),n.d(o,"unprotectVTree",function(){return Z}),n.d(o,"cleanMemory",function(){return Q});var i=n(3),a=n.n(i);class u{constructor(e,t,n){this.channelName=e,this.identifier=t,this.cable=n,this.eventName="fieChanged",this.subscription=App.cable.subscriptions.create({channel:e,identifier:t},{connected:e=>{this.connected()},received:e=>this.received(e)})}connected(){this.perform("initialize_pools"),console.log(`Connected to ${this.channelName} with identifier ${this.identifier}`)}perform(e,t={}){this.subscription.perform(e,t)}}class c extends u{received(e){this.cable.commander.processCommand(e.command,e.parameters)}}var l=n(8);class s{static addEventListener(e,t,n){document.querySelector("[fie-body=true]").addEventListener(e,e=>{e.target.matches(t)&&n(e)})}static execJS(e,t=[]){window[e](...t)}static get viewVariables(){const e=document.querySelectorAll('[fie-variable]:not([fie-variable=""])');return Object(l.object)(Array.from(e).map(e=>{return[e.getAttribute("fie-variable"),e.getAttribute("fie-value")]}))}}var f=new Map,d=new Map,p=new Map,h=new Set;h.CreateTreeHookCache=new Set,h.CreateNodeHookCache=new Set,h.SyncTreeHookCache=new Set;for(var v=new Set,y=new Set,m=new Set,g={free:v,allocated:y,protected:m},b=0;b<1e4;b++)v.add({rawNodeName:"",nodeName:"",nodeValue:"",nodeType:1,key:"",childNodes:[],attributes:{}});var N=v.values(),w={size:1e4,memory:g,get:function(){var e=N.next(),t=e.value,n=void 0===t?{rawNodeName:"",nodeName:"",nodeValue:"",nodeType:1,key:"",childNodes:[],attributes:{}}:t;return e.done&&(N=v.values()),v.delete(n),y.add(n),n},protect:function(e){y.delete(e),m.add(e)},unprotect:function(e){m.has(e)&&(m.delete(e),v.add(e))}},E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function T(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var _=h.CreateTreeHookCache,k=(Object.assign,Array.isArray),S="#document-fragment";function x(e,t,n){for(var r=arguments.length,o=Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];if(!e)return null;if(k(e)){n=[];for(var a=0;a<e.length;a++){var u=x(e[a]);if(u){var c,l=11===u.nodeType;if("string"==typeof u.rawNodeName&&l)(c=n).push.apply(c,T(u.childNodes));else n.push(u)}}return x(S,null,n)}var s="object"===(void 0===e?"undefined":E(e));if(e&&s&&"parentNode"in e){if(t={},n=[],3===e.nodeType)n=e.nodeValue;else if(1===e.nodeType&&e.attributes.length){t={};for(var f=0;f<e.attributes.length;f++){var p=e.attributes[f],h=p.name,v=p.value;""===v&&h in e?t[h]=e[h]:t[h]=v}}if((1===e.nodeType||11===e.nodeType)&&e.childNodes.length){n=[];for(var y=0;y<e.childNodes.length;y++)n.push(x(e.childNodes[y]))}var m=x(e.nodeName,t,n);return d.set(m,e),m}if(s)return"children"in e&&!("childNodes"in e)?x(e.nodeName||e.elementName,e.attributes,e.children):e;o.length&&(n=[n].concat(o));var g=w.get(),b="#text"===e,N="string"==typeof e;if(g.key="",g.rawNodeName=e,g.nodeName=N?e.toLowerCase():"#document-fragment",g.childNodes.length=0,g.nodeValue="",g.attributes={},b){var O=2===arguments.length?t:n,j=k(O)?O.join(""):O;return g.nodeType=3,g.nodeValue=String(j||""),g}g.nodeType=e===S||"string"!=typeof e?11:"#comment"===e?8:1;var A=k(t)||"object"!==(void 0===t?"undefined":E(t))?t:n,C=k(A)?A:[A];if(A&&C.length)for(var M=0;M<C.length;M++){var R=C[M];if(Array.isArray(R))for(var V=0;V<R.length;V++)g.childNodes.push(R[V]);else{if(!R)continue;if(11===R.nodeType&&"string"==typeof R.rawNodeName)for(var I=0;I<R.childNodes.length;I++)g.childNodes.push(R.childNodes[I]);else R&&"object"===(void 0===R?"undefined":E(R))?g.childNodes.push(R):R&&g.childNodes.push(x("#text",null,R))}}t&&"object"===(void 0===t?"undefined":E(t))&&!k(t)&&(g.attributes=t),"script"===g.nodeName&&g.attributes.src&&(g.key=String(g.attributes.src)),g.attributes&&"key"in g.attributes&&(g.key=String(g.attributes.key));var L=g;return _.forEach(function(e,t){(t=e(L))&&(L=t)}),L}var O=n(0),j=h.CreateNodeHookCache,A="http://www.w3.org/2000/svg";function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2];if("production"!==O.a.env.NODE_ENV&&!e)throw new Error("Missing VTree when trying to create DOM Node");var r=d.get(e);if(r)return r;var o=e.nodeName,i=e.rawNodeName,a=void 0===i?o:i,u=e.childNodes,c=void 0===u?[]:u;n=n||"svg"===o;var l=null;j.forEach(function(t,n){(n=t(e))&&(l=n)}),l||(l="#text"===o?t.createTextNode(e.nodeValue):"#document-fragment"===o?t.createDocumentFragment():n?t.createElementNS(A,a):t.createElement(a)),d.set(e,l);for(var s=0;s<c.length;s++)l.appendChild(C(c[s],t,n));return l}function M(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var R=/\S/,V=/<!.*>/i,I=/\b([_a-z][_a-z0-9\-]*)\s*(=\s*("([^"]+)"|'([^']+)'|(\S+)))?/gi,L=/[^ ]/,F=/__DIFFHTML__([^_]*)__/,D=/<!--[^]*?(?=-->)-->|<(\/?)([a-z\-\_][a-z0-9\-\_]*)\s*([^>]*?)(\/?)>/gi,P=(Object.assign,new Set(["script","noscript","style","code","template"])),z=new Set(["meta","img","link","input","area","br","hr","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),H={li:{li:!0},p:{p:!0,div:!0},td:{td:!0,th:!0},th:{td:!0,th:!0}},B={li:{ul:!0,ol:!0},a:{div:!0},b:{div:!0},i:{div:!0},p:{div:!0},td:{tr:!0,table:!0},th:{tr:!0,table:!0}},U=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&!V.test(t)&&!F.test(t))return e.childNodes.push(x("#text",t));for(var o=[],i=t.split(F),a=(i.length,0);a<i.length;a++){var u=i[a];if(u)if(a%2==1){var c=r.children[u];if(!c)continue;var l=11===c.nodeType;"string"==typeof c.rawNodeName&&l?o.push.apply(o,M(c.childNodes)):o.push(c)}else V.test(u)||o.push(x("#text",u))}(n=e.childNodes).push.apply(n,o)},$=function e(t,n,r){var o;if(o=F.exec(t))return e(r.tags[o[1]],n,r);for(var i,a={};i=I.exec(n||"");){var u=i[1],c=i[6]||i[5]||i[4]||i[1],l=c.match(F);if(l&&l.length)for(var s=c.split(F),f=(s.length,F.exec(u)),d=f?r.attributes[f[1]]:u,p=0;p<s.length;p++){var h=s[p];h&&(p%2==1?a[d]?a[d]+=r.attributes[h]:a[d]=r.attributes[h]:a[d]?a[d]+=h:a[d]=h)}else if(l=F.exec(u)){var v=r.attributes[l[1]],y=F.exec(c),m=y?r.attributes[y[1]]:c;a[v]='""'===c?"":m}else a[u]='""'===c?"":c}return x(t,a,[])};function q(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=x("#document-fragment",null,[]),a=[i],u=i,c=-1;if(-1===e.indexOf("<")&&e)return U(u,e,t),i;for(;n=D.exec(e);){c>-1&&c+n[0].length<D.lastIndex&&(r=e.slice(c,D.lastIndex-n[0].length))&&U(u,r,t);var l=D.lastIndex-n[0].length;if(-1===c&&l>0){var s=e.slice(0,l);s&&R.test(s)&&!V.exec(s)&&U(u,s,t)}if(c=D.lastIndex,"!"!==n[0][1]){if(!n[1]){if(!n[4]&&H[u.rawNodeName]&&H[u.rawNodeName][n[2]]&&(a.pop(),u=a[a.length-1]),u=u.childNodes[u.childNodes.push($(n[2],n[3],t))-1],a.push(u),P.has(n[2])){var f="</"+n[2]+">",d=e.indexOf(f,D.lastIndex);n[2].length;-1===d?c=D.lastIndex=e.length+1:(c=d+f.length,D.lastIndex=c,n[1]=!0);var p=e.slice(n.index+n[0].length,d);U(u,p,t)}}if(n[1]||n[4]||z.has(n[2])){if(n[2]!==u.rawNodeName&&o.strict){var h=u.rawNodeName,v=e.slice(D.lastIndex-n[0].length).split("\n").slice(0,3),y=Array(L.exec(v[0]).index).join(" ")+"^";throw v.splice(1,0,y+"\nPossibly invalid markup. Saw "+n[2]+", expected "+h+"...\n "),new Error("\n\n"+v.join("\n"))}for(var m=F.exec(n[2]);u;){if("/"===n[4]&&m){a.pop(),u=a[a.length-1];break}if(m){var g=t.tags[m[1]];if(u.rawNodeName===g){a.pop(),u=a[a.length-1];break}}if(u.rawNodeName===n[2]){a.pop(),u=a[a.length-1];break}var b=B[u.rawNodeName];if(!b||!b[n[2]])break;a.pop(),u=a[a.length-1]}}}}var N=e.slice(-1===c?0:c).trim();if(N&&U(u,N,t),i.childNodes.length&&"html"===i.childNodes[0].nodeName){var w={before:[],after:[]},E={after:[]},T=i.childNodes[0],_=!0,k=!0;if(T.childNodes=T.childNodes.filter(function(e){if("body"===e.nodeName||"head"===e.nodeName)return"head"===e.nodeName&&(_=!1),"body"===e.nodeName&&(k=!1),!0;1===e.nodeType&&(_&&k?w.before.push(e):!_&&k?w.after.push(e):k||E.after.push(e))}),T.childNodes[0]&&"head"===T.childNodes[0].nodeName){var S=T.childNodes[0].childNodes;S.unshift.apply(S,w.before),S.push.apply(S,w.after)}else{var O=x("head",null,[]),j=O.childNodes;j.unshift.apply(j,w.before),j.push.apply(j,w.after),T.childNodes.unshift(O)}if(T.childNodes[1]&&"body"===T.childNodes[1].nodeName){var A=T.childNodes[1].childNodes;A.push.apply(A,E.after)}else{var C=x("body",null,[]),M=C.childNodes;M.push.apply(M,E.after),T.childNodes.push(C)}}return I.lastIndex=0,D.lastIndex=0,i}var K=w.memory,J=w.protect,W=w.unprotect;function G(e){J(e);for(var t=0;t<e.childNodes.length;t++)G(e.childNodes[t]);return e}function Z(e){W(e);for(var t=0;t<e.childNodes.length;t++)Z(e.childNodes[t]);return e}function Q(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];f.forEach(function(t){return e=t.isRendering||e}),K.allocated.forEach(function(e){return K.free.add(e)}),K.allocated.clear(),d.forEach(function(e,t){K.protected.has(t)||d.delete(t)})}function X(e){var t=e.state,n=e.domNode,r=e.markup,o=e.options,i=t.previousMarkup,a=o.inner;if(i===n.outerHTML&&t.oldTree||(t.oldTree&&Z(t.oldTree),t.oldTree=x(n),d.set(t.oldTree,n),G(t.oldTree)),e.oldTree=t.oldTree,e.newTree||(e.newTree=x(r)),a){var u=e.oldTree,c=e.newTree,l=(u.rawNodeName,u.nodeName),s=u.attributes,f="string"!=typeof c.rawNodeName,p=11===c.nodeType&&!f?c.childNodes:c;e.newTree=x(l,s,p)}}var Y=n(1);function ee(e){return e.replace(/[&<>]/g,function(e){return"&#"+e.charCodeAt(0)+";"})}var te=n(2),ne=Object.assign({decodeEntities:Y.a,escape:ee,makeMeasure:te.a,memory:o,Pool:w,process:O.a},r);function re(e){var t=e.state;if(t.isRendering){t.nextTransaction&&t.nextTransaction.promises[0].resolve(t.nextTransaction),t.nextTransaction=e;var n={},r=new Promise(function(e){return n.resolve=e});return r.resolve=n.resolve,e.promises=[r],e.abort()}t.isRendering=!0}function oe(e){var t=e.markup,n=e.state,r=e.state.measure;if(r("should update"),"string"==typeof t&&n.markup===t)return e.abort();"string"==typeof t&&(n.markup=t),r("should update")}var ie=h.SyncTreeHookCache,ae=(Object.assign,Object.keys,{}),ue=["old","new"];function ce(e){var t=e.state.measure,n=e.oldTree,r=e.newTree;e.domNode;t("sync trees"),n.nodeName!==r.nodeName&&11!==r.nodeType?(e.patches={TREE_OPS:[{REPLACE_CHILD:[r,n]}],SET_ATTRIBUTE:[],REMOVE_ATTRIBUTE:[],NODE_VALUE:[]},Z(e.oldTree),e.oldTree=e.state.oldTree=r,G(e.oldTree),f.set(C(r),e.state)):e.patches=function e(t,n,r,o,i){t||(t=ae),n||(n=ae);var a=t.nodeName,u=11===n.nodeType,c=t===ae,l={old:new Map,new:new Map};if("production"!==O.a.env.NODE_ENV){if(n===ae)throw new Error("Missing new Virtual Tree to sync changes from");if(!c&&a!==n.nodeName&&!u)throw new Error("Sync failure, cannot compare "+n.nodeName+" with "+a)}for(var s=0;s<ue.length;s++){var f=ue[s],d=l[f],p=arguments[s],h=p&&p.childNodes;if(h&&h.length)for(var v=0;v<h.length;v++){var y=h[v];if(y.key){if("production"!==O.a.env.NODE_ENV&&d.has(y.key))throw new Error("Key: "+y.key+" cannot be duplicated");d.set(y.key,y)}}}ie.forEach(function(a,u){(u=a(t=i||t,n,l,o)||n)&&u!==n&&(n.childNodes=[].concat(u),e(t!==ae?t:null,u,r,n),n=u)});var m=n.nodeName,g=r=r||{SET_ATTRIBUTE:[],REMOVE_ATTRIBUTE:[],TREE_OPS:[],NODE_VALUE:[]},b=g.SET_ATTRIBUTE,N=g.REMOVE_ATTRIBUTE,w=g.TREE_OPS,E=g.NODE_VALUE,T={INSERT_BEFORE:[],REMOVE_CHILD:[],REPLACE_CHILD:[]},_=T.INSERT_BEFORE,k=T.REMOVE_CHILD,S=T.REPLACE_CHILD,x=1===n.nodeType;if("#text"===n.nodeName)return"#text"!==t.nodeName?E.push(n,n.nodeValue,null):c||t.nodeValue===n.nodeValue||(E.push(t,n.nodeValue,t.nodeValue),t.nodeValue=n.nodeValue),r;if(x){var j=c?ae:t.attributes,A=n.attributes;for(var C in A){var M=A[C];C in j&&j[C]===A[C]||(c||(j[C]=M),b.push(c?n:t,C,M))}if(!c)for(var R in j)R in A||(N.push(t,R),delete j[R])}if("production"!==O.a.env.NODE_ENV&&!c&&a!==m&&!u)throw new Error("Sync failure, cannot compare "+m+" with "+a);var V=n.childNodes;if(c){for(var I=0;I<V.length;I++)e(null,V[I],r,n);return r}var L=t.childNodes;if(l.old.size||l.new.size){l.old.values();for(var F=0;F<V.length;F++){var D=L[F],P=V[F],z=P.key;if(D){var H=D.key,B=l.new.has(H),U=l.old.has(z);if(B||U)if(B)if(z===H)D.nodeName===P.nodeName?e(D,P,r,n):(S.push(P,D),t.childNodes[F]=P,e(null,P,r,n));else{var $=P;z&&U?($=l.old.get(z),L.splice(L.indexOf($),1)):z&&($=P,e(null,P,r,n)),_.push(t,$,D),L.splice(F,0,$)}else k.push(D),L.splice(L.indexOf(D),1),F-=1;else S.push(P,D),L.splice(L.indexOf(D),1,P),e(null,P,r,n)}else _.push(t,P,null),L.push(P),e(null,P,r,n)}}else for(var q=0;q<V.length;q++){var K=L&&L[q],J=V[q];if(K)if(K.nodeName===J.nodeName)e(K,J,r,t);else{S.push(J,K);var W=t.childNodes[q];t.childNodes[q]=J,e(null,J,r,t,W)}else _.push(t,J,null),L&&L.push(J),e(null,J,r,t)}if(L.length!==V.length){for(var G=V.length;G<L.length;G++)k.push(L[G]);L.length=V.length}return(_.length||k.length||S.length)&&(_.length||(T.INSERT_BEFORE=null),k.length||(T.REMOVE_CHILD=null),S.length||(T.REPLACE_CHILD=null),w.push(T)),r}(n,r),t("sync trees")}var le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function se(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var fe=["attached","detached","replaced","attributeChanged","textChanged"];function de(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=p.get(e),i=[];if(!o.size)return i;if("textChanged"!==e&&3===n[0].nodeType)return i;if(o.forEach(function(e){var t=e.apply(void 0,n);"object"===(void 0===t?"undefined":le(t))&&t.then&&i.push(t)}),"attached"===e||"detached"===e){var a=n[0];[].concat(se(a.childNodes)).forEach(function(t){i.push.apply(i,se(de.apply(void 0,[e,t].concat(se(n.slice(1))))))})}return i}fe.forEach(function(e){return p.set(e,new Set)});var pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function he(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var ve=new Set(["script","noscript","style","code","template"]),ye=function(e,t){e.removeAttribute(t),t in e&&(e[t]=void 0)},me=new Set;function ge(e){var t=e.domNode,n=e.state,r=e.state.measure,o=e.patches,i=e.promises,a=void 0===i?[]:i,u=t.namespaceURI,c=void 0===u?"":u,l=t.nodeName;n.isSVG="svg"===l.toLowerCase()||c.includes("svg"),n.ownerDocument=t.ownerDocument||document,r("patch node"),a.push.apply(a,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=e.TREE_OPS,o=e.NODE_VALUE,i=e.SET_ATTRIBUTE,a=e.REMOVE_ATTRIBUTE,u=t.isSVG,c=t.ownerDocument;if(i.length)for(var l=0;l<i.length;l+=3){var s=i[l],f=i[l+1],h=Object(Y.a)(i[l+2]),v=C(s,c,u),y=de("attributeChanged",v,f,v.getAttribute(f),h),m="object"===(void 0===h?"undefined":pe(h)),g="function"==typeof h,b=0===f.indexOf("on")?f.toLowerCase():f;if(m||g||!b){if(m&&"style"===b)for(var N=Object.keys(h),w=0;w<N.length;w++)v.style[N[w]]=h[N[w]];else if("string"!=typeof h){v.hasAttribute(b)&&v[b]!==h&&v.removeAttribute(b,""),v.setAttribute(b,"");try{v[b]=h}catch(e){}}}else{var E=null===h||void 0===h,T=s.nodeName+"-"+b;if(!me.has(T))try{v[b]=h}catch(e){me.add(T)}v.setAttribute(b,E?"":h)}y.length&&n.push.apply(n,he(y))}if(a.length)for(var _=function(e){var t=a[e],r=a[e+1],o=d.get(t),i=(p.get("attributeChanged"),o.getAttribute(r)),u=de("attributeChanged",o,r,i,null);u.length?(Promise.all(u).then(function(){return ye(o,r)}),n.push.apply(n,he(u))):ye(o,r)},k=0;k<a.length;k+=2)_(k);for(var S=0;S<r.length;S++){var x=r[S],O=x.INSERT_BEFORE,j=x.REMOVE_CHILD,A=x.REPLACE_CHILD;if(O&&O.length)for(var M=0;M<O.length;M+=3){var R=O[M],V=O[M+1],I=O[M+2],L=d.get(R),F=I&&C(I,c,u);p.get("attached"),I&&G(I);var D=C(V,c,u);G(V),L.insertBefore(D,F);var P=de("attached",D);n.push.apply(n,he(P))}if(j&&j.length)for(var z=function(e){var t=j[e],r=d.get(t),o=(p.get("detached"),de("detached",r));o.length?(Promise.all(o).then(function(){r.parentNode.removeChild(r),Z(t)}),n.push.apply(n,he(o))):(r.parentNode.removeChild(r),Z(t))},H=0;H<j.length;H++)z(H);if(A&&A.length)for(var B=function(e){var t=A[e],r=A[e+1],o=d.get(r),i=C(t,c,u);p.get("attached"),p.get("detached"),p.get("replaced"),o.parentNode.insertBefore(i,o),G(t);var a=de("attached",i),l=de("detached",o),s=de("replaced",o,i),f=[].concat(he(a),he(l),he(s));f.length?(Promise.all(f).then(function(){o.parentNode.replaceChild(i,o),Z(r)}),n.push.apply(n,he(f))):(o.parentNode.replaceChild(i,o),Z(r))},U=0;U<A.length;U+=2)B(U)}if(o.length)for(var $=0;$<o.length;$+=3){var q=o[$],K=o[$+1],J=o[$+2],W=C(q),Q=(p.get("textChanged"),de("textChanged",W,J,K)),X=W.parentNode;K.includes("&")?W.nodeValue=Object(Y.a)(K):W.nodeValue=K,X&&ve.has(X.nodeName.toLowerCase())&&(X.nodeValue=ee(Object(Y.a)(K))),Q.length&&n.push.apply(n,he(Q))}return n}(o,n))),r("patch node"),e.promises=a}function be(e){var t=e.promises,n=void 0===t?[]:t;return n.length?Promise.all(n).then(function(){return e.end()}):Promise.resolve(e.end())}var Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},we=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Ee=[re,oe,X,ce,ge,be],Te={schedule:re,shouldUpdate:oe,reconcileTrees:X,syncTrees:ce,patchNode:ge,endAsPromise:be},_e=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.domNode=t,this.markup=n,this.options=r,this.state=f.get(t)||{measure:Object(te.a)(t,n)},this.tasks=[].concat(r.tasks),this.endedCallbacks=new Set,f.set(t,this.state)}return we(e,null,[{key:"create",value:function(t,n,r){return new e(t,n,r)}},{key:"renderNext",value:function(t){if(t.nextTransaction){var n=t.nextTransaction,r=t.nextTransaction.promises,o=r&&r[0];t.nextTransaction=void 0,n.aborted=!1,n.tasks.pop(),e.flow(n,n.tasks),r&&r.length>1?Promise.all(r.slice(1)).then(function(){return o.resolve()}):o&&o.resolve()}}},{key:"flow",value:function(e,t){for(var n=e,r=0;r<t.length;r++){if(e.aborted)return n;if(void 0!==(n=t[r](e))&&n!==e)return n}}},{key:"assert",value:function(e){if("production"!==O.a.env.NODE_ENV){if("object"!==Ne(e.domNode))throw new Error("Transaction requires a DOM Node mount point");if(e.aborted&&e.completed)throw new Error("Transaction was previously aborted");if(e.completed)throw new Error("Transaction was previously completed")}}},{key:"invokeMiddleware",value:function(e){var t=e.tasks;h.forEach(function(n){var r=n(e);r&&t.push(r)})}}]),we(e,[{key:"start",value:function(){"production"!==O.a.env.NODE_ENV&&e.assert(this);this.domNode;var t=this.state.measure,n=this.tasks,r=n.pop();return this.aborted=!1,e.invokeMiddleware(this),t("render"),n.push(r),e.flow(this,n)}},{key:"abort",value:function(){this.state;return this.aborted=!0,this.tasks[this.tasks.length-1](this)}},{key:"end",value:function(){var t=this,n=this.state,r=this.domNode,o=this.options,i=n.measure;o.inner;return i("finalize"),this.completed=!0,i("finalize"),i("render"),this.endedCallbacks.forEach(function(e){return e(t)}),this.endedCallbacks.clear(),n.previousMarkup=r.outerHTML,n.isRendering=!1,Q(),e.renderNext(n),this}},{key:"onceEnded",value:function(e){this.endedCallbacks.add(e)}}]),e}();function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.inner=!0,n.tasks=n.tasks||Ee,_e.create(e,t,n).start()}var Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe=/(=|"|')[^><]*?$/,Oe=/(<|\/)/,je="__DIFFHTML__",Ae=function(e){var t=e.shift();return"string"==typeof t?ee(Object(Y.a)(t)):t};var Ce=h.CreateTreeHookCache,Me=h.CreateNodeHookCache,Re=h.SyncTreeHookCache;function Ve(e){if("production"!==O.a.env.NODE_ENV&&"function"!=typeof e)throw new Error("Middleware must be a function");var t=e.subscribe,n=e.unsubscribe,r=e.createTreeHook,o=e.createNodeHook,i=e.syncTreeHook;return h.add(e),t&&e.subscribe(),r&&Ce.add(r),o&&Me.add(o),i&&Re.add(i),function(){h.delete(e),n&&n(),Ce.delete(r),Me.delete(o),Re.delete(i)}}Ee.splice(Ee.indexOf(X),0,function(e){var t=e.state,n=e.markup,r=e.options,o=t.measure,i=r.inner;if("string"==typeof n){o("parsing markup for new tree");var a=q(n,null,r).childNodes;e.newTree=x(i?a:a[0]||a),o("parsing markup for new tree")}});var Ie={VERSION:"1.0.0-beta.9",addTransitionState:function(e,t){if("production"!==O.a.env.NODE_ENV){if(!e||!fe.includes(e))throw new Error("Invalid state name '"+e+"'");if(!t)throw new Error("Missing transition state callback")}p.get(e).add(t)},removeTransitionState:function(e,t){if("production"!==O.a.env.NODE_ENV&&e&&!fe.includes(e))throw new Error("Invalid state name '"+e+"'");if(!t&&e)p.get(e).clear();else if(e&&t)p.get(e).delete(t);else for(var n=0;n<fe.length;n++)p.get(fe[n]).clear()},release:function(e){var t=f.get(e);t&&t.oldTree&&Z(t.oldTree),f.delete(e),Q()},createTree:x,use:Ve,outerHTML:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.inner=!1,n.tasks=n.tasks||Ee,_e.create(e,t,n).start()},innerHTML:ke,html:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"==typeof e&&(e=[e]),!e)return null;if(1===e.length&&!n.length){var o=q(e[0]).childNodes;return o.length>1?x(o):o[0]}var i="",a={attributes:{},children:{},tags:{}};e.forEach(function(e,t){if(i+=e,n.length){var r=Ae(n),o=e.split(" ").pop().trim().slice(-1),u=Boolean(i.match(xe)),c=Boolean(o.match(Oe)),l="string"==typeof r,s="object"===(void 0===r?"undefined":Se(r)),f=Array.isArray(r),d=je+t+"__";u?(a.attributes[t]=r,i+=d):c&&!l?(a.tags[t]=r,i+=d):f||s?(a.children[t]=x(r),i+=d):r&&(i+=r)}});var u=q(i,a).childNodes;return 1===u.length?u[0]:x(u)}},Le=Object.assign(ne,Ie,{parse:q,defaultTasks:Ee,tasks:Te,createNode:C});Ie.Internals=Le,"undefined"!=typeof devTools&&(Ve(devTools(Le)),console.info("diffHTML DevTools Found and Activated..."));class Fe extends u{connected(){super.connected(),this.cable.callRemoteFunction(document.body,"initialize_state","Upload State",{view_variables:s.viewVariables})}received(e){this.processCommand(e.command,e.parameters)}processCommand(e,t={}){switch(e){case"refresh_view":ke(document.querySelector("[fie-body=true]"),t.html),document.dispatchEvent(new Event(this.eventName));break;case"subscribe_to_pools":t.subjects.forEach(e=>this.cable.subscribeToPool(e));break;case"publish_to_pool":{const e=t.subject,n=t.object,r=t.sender_uuid;this.perform(`pool_${e}_callback`,{object:n,sender_uuid:r})}break;case"publish_to_pool_lazy":{const e=t.subject,n=t.object,r=t.sender_uuid;this.perform(`pool_${e}_callback`,{object:n,sender_uuid:r,lazy:!0})}break;case"execute_function":s.execJS(t.name,t.arguments);break;default:console.log(`Command: ${e}, Parameters: ${t}`)}}}var De=n(7);class Pe{constructor(){const e=a()();let t=`${Object(De.camelize)(this._controllerName)}Commander`;t=t.charAt(0).toUpperCase()+t.slice(1),this.commander=new Fe(t,e,this),this.pools={}}callRemoteFunction(e,t,n,r){this._logEvent(e,n,t,r);const o={caller:{id:e.id,class:e.className,value:e.value},controller_name:this._controllerName,action_name:this._actionName,...r};this.commander.perform(t,o)}subscribeToPool(e){this.pools[e]=new c("Fie::Pools",e,this)}_logEvent(e,t,n,r){console.log(`Event ${t} triggered by element ${this._elementDescriptor(e)} is calling function ${n} with parameters ${JSON.stringify(r)}`)}_elementDescriptor(e){const t=e.tagName,n=""==e.id||null==e.id||void 0==e.id,r=""==e.className||null==e.className||void 0==e.className;return n?r?t:`${t}.${e.className}`:`${t}#${e.id}`}get _actionName(){return this._viewNameElement.getAttribute("fie-action")}get _controllerName(){return this._viewNameElement.getAttribute("fie-controller")}get _viewNameElement(){return document.querySelector('[fie-controller]:not([fie-controller=""])')}}class ze{constructor(e,t=0){this.callback=e,this.timeout=setTimeout(e,t)}clear(){clearTimeout(this.timeout)}fastForward(){clearTimeout(this.timeout),this.callback()}}class He{constructor(e){this.cable=e,this.timer=new ze(e=>{}),this._initializeInputElements(),this._initializeFieEvents(["click","submit","scroll","keyup","keydown","enter"])}_initializeFieEvents(e){e.forEach(e=>{const t=`[fie-${e}]:not([fie-${e}=''])`;let n=e;"enter"==n&&(n="keydown"),s.addEventListener(n,t,t=>{this._handleFieEvent(e,n,t)})})}_handleFieEvent(e,t,n){if("enter"==e&&13==n.keyCode||"enter"!=e){const r=n.target.getAttribute(`fie-${e}`),o=JSON.parse(n.target.getAttribute("fie-parameters"))||{};this.timer.fastForward(),this.cable.callRemoteFunction(n.target,r,t,o)}}_initializeInputElements(){const e=["text","password","search","tel","url"],t=["textarea",...e].reduce((e,t)=>e+`, input[type=${t}]`),n=["input",...e].reduce((e,t)=>e+`:not([type=${t}])`);s.addEventListener("keydown",t,e=>{13==e.keyCode?e.target.blur():(this.timer.clear(),this.timer=new ze(t=>this._updateStateUsingChangelog(e.target),300))}),s.addEventListener("focusin",t,e=>{e.target.setAttribute("fie-ignore",a()())}),s.addEventListener("focusout",t,e=>{e.target.removeAttribute("fie-ignore")}),s.addEventListener("change",n,e=>{this._updateStateUsingChangelog(e.target)})}_updateStateUsingChangelog(e){const t={},n=e.name.split("[")[0],r=e.name.match(/[^\[]+(?=\])/g),o=null!=r&&r.length>0,i=Object.keys(s.viewVariables).includes(n),a=o&&i,u=Object.keys(s.viewVariables).includes(e.name);a?this._buildChangelog(r,n,t,e):u?t[e.name]=e.value:console.log(r),this.cable.callRemoteFunction(e,"modify_state_using_changelog","Input Element Change",{objects_changelog:t})}_buildChangelog(e,t,n,r){const o=r.value;n[t]={},n=n[t],e.forEach(t=>{(t=>t==e[e.length-1])(t)?n[t]=o:(n[t]={},n=n[t])})}}var Be=n(6);n.d(t,"Fie",function(){return Ue});class Ue{constructor(){this._diffSetup(),document.addEventListener("DOMContentLoaded",e=>{this.cable=new Pe,new He(this.cable)})}executeCommanderMethod(e,t={}){this.cable.callRemoteFunction(document.body,"calling remote function",e,JSON.parse(JSON.stringify(t)))}addEventListener(e,t,n){s.addEventListener(e,t,n)}_diffSetup(){Object(Be.polyfill)(),Ve(Object.assign(e=>{},{syncTreeHook:(e,t)=>{if("input"===t.nodeName){const e=document.querySelector('[name="'+t.attributes.name+'"]');return void 0!=e&&void 0!=e.attributes["fie-ignore"]&&(t.nodeValue=e.value,t.attributes.value=e.value,t.attributes.autofocus="",t.attributes["fie-ignore"]=e.attributes["fie-ignore"]),t}}}))}}window.Fie=new Ue},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t,n){"use strict";(function(e){t.a=void 0!==e?e:{env:{NODE_ENV:"development"}}}).call(this,n(5))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return Util});var underscore__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(9),underscore__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(underscore__WEBPACK_IMPORTED_MODULE_0__);class Util{static addEventListener(e,t,n){document.querySelector("[fie-body=true]").addEventListener(e,e=>{e.target.matches(t)&&n(e)})}static execJS(functionName,args=[]){eval(functionName)(...args)}static get viewVariables(){const e=document.querySelectorAll('[fie-variable]:not([fie-variable=""])');return Object(underscore__WEBPACK_IMPORTED_MODULE_0__.object)(Array.from(e).map(e=>{return[e.getAttribute("fie-variable"),e.getAttribute("fie-value")]}))}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=("object"===(void 0===e?"undefined":r(e))?e:window).document?document.createElement("div"):null;function i(e){return o&&e&&e.indexOf&&e.includes("&")?(o.innerHTML=e,o.textContent):e}}).call(this,n(6))},function(e,t,n){"use strict";(function(e){var n=new Map,r="undefined"!=typeof location,o=void 0!==e&&e.argv,i=function(){};t.a=function(t,a){var u=r&&location.search.includes("diff_perf"),c=o&&e.argv.includes("diff_perf");return u||c?function(e){t&&t.host?e=t.host.constructor.name+" "+e:"function"==typeof a.rawNodeName&&(e=a.rawNodeName.name+" "+e);var r=e+"-end";if(n.has(e)){var o=(performance.now()-n.get(e)).toFixed(3);n.delete(e),performance.mark(r),performance.measure("diffHTML "+e+" ("+o+"ms)",e,r)}else n.set(e,performance.now()),performance.mark(e)}:i}}).call(this,n(5))},function(e,t,n){var r=n(13),o=n(12);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],s=!1,f=-1;function d(){s&&c&&(s=!1,c.length?l=c.concat(l):f=-1,l.length&&p())}function p(){if(!s){var e=u(d);s=!0;for(var t=l.length;t;){for(c=l,l=[];++f<t;)c&&c[f].run();f=-1,t=l.length}c=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||s||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(void 0!==o&&null!==o)for(var i=Object.keys(Object(o)),a=0,u=i.length;a<u;a++){var c=i[a],l=Object.getOwnPropertyDescriptor(o,c);void 0!==l&&l.enumerable&&(n[c]=o[c])}}return n}e.exports={assign:r,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:r})}}},function(e,t,n){var r,o;!function(i){var a=function(e,t,n){if(!d(t)||h(t)||v(t)||y(t)||f(t))return t;var r,o=0,i=0;if(p(t))for(r=[],i=t.length;o<i;o++)r.push(a(e,t[o],n));else for(var u in r={},t)Object.prototype.hasOwnProperty.call(t,u)&&(r[e(u,n)]=a(e,t[u],n));return r},u=function(e){return m(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)},c=function(e){var t=u(e);return t.substr(0,1).toUpperCase()+t.substr(1)},l=function(e,t){return function(e,t){var n=(t=t||{}).separator||"_",r=t.split||/(?=[A-Z])/;return e.split(r).join(n)}(e,t).toLowerCase()},s=Object.prototype.toString,f=function(e){return"function"==typeof e},d=function(e){return e===Object(e)},p=function(e){return"[object Array]"==s.call(e)},h=function(e){return"[object Date]"==s.call(e)},v=function(e){return"[object RegExp]"==s.call(e)},y=function(e){return"[object Boolean]"==s.call(e)},m=function(e){return(e-=0)==e},g=function(e,t){var n=t&&"process"in t?t.process:t;return"function"!=typeof n?e:function(t,r){return n(t,e,r)}};void 0===(o="function"==typeof(r={camelize:u,decamelize:l,pascalize:c,depascalize:l,camelizeKeys:function(e,t){return a(g(u,t),e)},decamelizeKeys:function(e,t){return a(g(l,t),e,t)},pascalizeKeys:function(e,t){return a(g(c,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}})?r.call(t,n,t,e):r)||(e.exports=o)}()},function(e,t,n){(function(e,n){var r;!function(){var o="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},i=o._,a=Array.prototype,u=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,l=a.push,s=a.slice,f=u.toString,d=u.hasOwnProperty,p=Array.isArray,h=Object.keys,v=Object.create,y=function(){},m=function(e){return e instanceof m?e:this instanceof m?void(this._wrapped=e):new m(e)};void 0===t||t.nodeType?o._=m:(void 0!==n&&!n.nodeType&&n.exports&&(t=n.exports=m),t._=m),m.VERSION="1.9.1";var g,b=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)}}return function(){return e.apply(t,arguments)}},N=function(e,t,n){return m.iteratee!==g?m.iteratee(e,t):null==e?m.identity:m.isFunction(e)?b(e,t,n):m.isObject(e)&&!m.isArray(e)?m.matcher(e):m.property(e)};m.iteratee=g=function(e,t){return N(e,t,1/0)};var _=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),o=0;o<n;o++)r[o]=arguments[o+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var i=Array(t+1);for(o=0;o<t;o++)i[o]=arguments[o];return i[t]=r,e.apply(this,i)}},w=function(e){if(!m.isObject(e))return{};if(v)return v(e);y.prototype=e;var t=new y;return y.prototype=null,t},E=function(e){return function(t){return null==t?void 0:t[e]}},T=function(e,t){return null!=e&&d.call(e,t)},k=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},O=Math.pow(2,53)-1,S=E("length"),x=function(e){var t=S(e);return"number"==typeof t&&t>=0&&t<=O};m.each=m.forEach=function(e,t,n){var r,o;if(t=b(t,n),x(e))for(r=0,o=e.length;r<o;r++)t(e[r],r,e);else{var i=m.keys(e);for(r=0,o=i.length;r<o;r++)t(e[i[r]],i[r],e)}return e},m.map=m.collect=function(e,t,n){t=N(t,n);for(var r=!x(e)&&m.keys(e),o=(r||e).length,i=Array(o),a=0;a<o;a++){var u=r?r[a]:a;i[a]=t(e[u],u,e)}return i};var A=function(e){return function(t,n,r,o){var i=arguments.length>=3;return function(t,n,r,o){var i=!x(t)&&m.keys(t),a=(i||t).length,u=e>0?0:a-1;for(o||(r=t[i?i[u]:u],u+=e);u>=0&&u<a;u+=e){var c=i?i[u]:u;r=n(r,t[c],c,t)}return r}(t,b(n,o,4),r,i)}};m.reduce=m.foldl=m.inject=A(1),m.reduceRight=m.foldr=A(-1),m.find=m.detect=function(e,t,n){var r=(x(e)?m.findIndex:m.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},m.filter=m.select=function(e,t,n){var r=[];return t=N(t,n),m.each(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r},m.reject=function(e,t,n){return m.filter(e,m.negate(N(t)),n)},m.every=m.all=function(e,t,n){t=N(t,n);for(var r=!x(e)&&m.keys(e),o=(r||e).length,i=0;i<o;i++){var a=r?r[i]:i;if(!t(e[a],a,e))return!1}return!0},m.some=m.any=function(e,t,n){t=N(t,n);for(var r=!x(e)&&m.keys(e),o=(r||e).length,i=0;i<o;i++){var a=r?r[i]:i;if(t(e[a],a,e))return!0}return!1},m.contains=m.includes=m.include=function(e,t,n,r){return x(e)||(e=m.values(e)),("number"!=typeof n||r)&&(n=0),m.indexOf(e,t,n)>=0},m.invoke=_(function(e,t,n){var r,o;return m.isFunction(t)?o=t:m.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),m.map(e,function(e){var i=o;if(!i){if(r&&r.length&&(e=k(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)})}),m.pluck=function(e,t){return m.map(e,m.property(t))},m.where=function(e,t){return m.filter(e,m.matcher(t))},m.findWhere=function(e,t){return m.find(e,m.matcher(t))},m.max=function(e,t,n){var r,o,i=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var u=0,c=(e=x(e)?e:m.values(e)).length;u<c;u++)null!=(r=e[u])&&r>i&&(i=r);else t=N(t,n),m.each(e,function(e,n,r){((o=t(e,n,r))>a||o===-1/0&&i===-1/0)&&(i=e,a=o)});return i},m.min=function(e,t,n){var r,o,i=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var u=0,c=(e=x(e)?e:m.values(e)).length;u<c;u++)null!=(r=e[u])&&r<i&&(i=r);else t=N(t,n),m.each(e,function(e,n,r){((o=t(e,n,r))<a||o===1/0&&i===1/0)&&(i=e,a=o)});return i},m.shuffle=function(e){return m.sample(e,1/0)},m.sample=function(e,t,n){if(null==t||n)return x(e)||(e=m.values(e)),e[m.random(e.length-1)];var r=x(e)?m.clone(e):m.values(e),o=S(r);t=Math.max(Math.min(t,o),0);for(var i=o-1,a=0;a<t;a++){var u=m.random(a,i),c=r[a];r[a]=r[u],r[u]=c}return r.slice(0,t)},m.sortBy=function(e,t,n){var r=0;return t=N(t,n),m.pluck(m.map(e,function(e,n,o){return{value:e,index:r++,criteria:t(e,n,o)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")};var j=function(e,t){return function(n,r,o){var i=t?[[],[]]:{};return r=N(r,o),m.each(n,function(t,o){var a=r(t,o,n);e(i,t,a)}),i}};m.groupBy=j(function(e,t,n){T(e,n)?e[n].push(t):e[n]=[t]}),m.indexBy=j(function(e,t,n){e[n]=t}),m.countBy=j(function(e,t,n){T(e,n)?e[n]++:e[n]=1});var C=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;m.toArray=function(e){return e?m.isArray(e)?s.call(e):m.isString(e)?e.match(C):x(e)?m.map(e,m.identity):m.values(e):[]},m.size=function(e){return null==e?0:x(e)?e.length:m.keys(e).length},m.partition=j(function(e,t,n){e[n?0:1].push(t)},!0),m.first=m.head=m.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:m.initial(e,e.length-t)},m.initial=function(e,t,n){return s.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},m.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:m.rest(e,Math.max(0,e.length-t))},m.rest=m.tail=m.drop=function(e,t,n){return s.call(e,null==t||n?1:t)},m.compact=function(e){return m.filter(e,Boolean)};var M=function(e,t,n,r){for(var o=(r=r||[]).length,i=0,a=S(e);i<a;i++){var u=e[i];if(x(u)&&(m.isArray(u)||m.isArguments(u)))if(t)for(var c=0,l=u.length;c<l;)r[o++]=u[c++];else M(u,t,n,r),o=r.length;else n||(r[o++]=u)}return r};m.flatten=function(e,t){return M(e,t,!1)},m.without=_(function(e,t){return m.difference(e,t)}),m.uniq=m.unique=function(e,t,n,r){m.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=N(n,r));for(var o=[],i=[],a=0,u=S(e);a<u;a++){var c=e[a],l=n?n(c,a,e):c;t&&!n?(a&&i===l||o.push(c),i=l):n?m.contains(i,l)||(i.push(l),o.push(c)):m.contains(o,c)||o.push(c)}return o},m.union=_(function(e){return m.uniq(M(e,!0,!0))}),m.intersection=function(e){for(var t=[],n=arguments.length,r=0,o=S(e);r<o;r++){var i=e[r];if(!m.contains(t,i)){var a;for(a=1;a<n&&m.contains(arguments[a],i);a++);a===n&&t.push(i)}}return t},m.difference=_(function(e,t){return t=M(t,!0,!0),m.filter(e,function(e){return!m.contains(t,e)})}),m.unzip=function(e){for(var t=e&&m.max(e,S).length||0,n=Array(t),r=0;r<t;r++)n[r]=m.pluck(e,r);return n},m.zip=_(m.unzip),m.object=function(e,t){for(var n={},r=0,o=S(e);r<o;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var R=function(e){return function(t,n,r){n=N(n,r);for(var o=S(t),i=e>0?0:o-1;i>=0&&i<o;i+=e)if(n(t[i],i,t))return i;return-1}};m.findIndex=R(1),m.findLastIndex=R(-1),m.sortedIndex=function(e,t,n,r){for(var o=(n=N(n,r,1))(t),i=0,a=S(e);i<a;){var u=Math.floor((i+a)/2);n(e[u])<o?i=u+1:a=u}return i};var I=function(e,t,n){return function(r,o,i){var a=0,u=S(r);if("number"==typeof i)e>0?a=i>=0?i:Math.max(i+u,a):u=i>=0?Math.min(i+1,u):i+u+1;else if(n&&i&&u)return r[i=n(r,o)]===o?i:-1;if(o!=o)return(i=t(s.call(r,a,u),m.isNaN))>=0?i+a:-1;for(i=e>0?a:u-1;i>=0&&i<u;i+=e)if(r[i]===o)return i;return-1}};m.indexOf=I(1,m.findIndex,m.sortedIndex),m.lastIndexOf=I(-1,m.findLastIndex),m.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),o=Array(r),i=0;i<r;i++,e+=n)o[i]=e;return o},m.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,o=e.length;r<o;)n.push(s.call(e,r,r+=t));return n};var L=function(e,t,n,r,o){if(!(r instanceof t))return e.apply(n,o);var i=w(e.prototype),a=e.apply(i,o);return m.isObject(a)?a:i};m.bind=_(function(e,t,n){if(!m.isFunction(e))throw new TypeError("Bind must be called on a function");var r=_(function(o){return L(e,r,t,this,n.concat(o))});return r}),m.partial=_(function(e,t){var n=m.partial.placeholder,r=function(){for(var o=0,i=t.length,a=Array(i),u=0;u<i;u++)a[u]=t[u]===n?arguments[o++]:t[u];for(;o<arguments.length;)a.push(arguments[o++]);return L(e,r,this,this,a)};return r}),m.partial.placeholder=m,m.bindAll=_(function(e,t){var n=(t=M(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=m.bind(e[r],e)}}),m.memoize=function(e,t){var n=function(r){var o=n.cache,i=""+(t?t.apply(this,arguments):r);return T(o,i)||(o[i]=e.apply(this,arguments)),o[i]};return n.cache={},n},m.delay=_(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)}),m.defer=m.partial(m.delay,m,1),m.throttle=function(e,t,n){var r,o,i,a,u=0;n||(n={});var c=function(){u=!1===n.leading?0:m.now(),r=null,a=e.apply(o,i),r||(o=i=null)},l=function(){var l=m.now();u||!1!==n.leading||(u=l);var s=t-(l-u);return o=this,i=arguments,s<=0||s>t?(r&&(clearTimeout(r),r=null),u=l,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(c,s)),a};return l.cancel=function(){clearTimeout(r),u=0,r=o=i=null},l},m.debounce=function(e,t,n){var r,o,i=function(t,n){r=null,n&&(o=e.apply(t,n))},a=_(function(a){if(r&&clearTimeout(r),n){var u=!r;r=setTimeout(i,t),u&&(o=e.apply(this,a))}else r=m.delay(i,t,this,a);return o});return a.cancel=function(){clearTimeout(r),r=null},a},m.wrap=function(e,t){return m.partial(t,e)},m.negate=function(e){return function(){return!e.apply(this,arguments)}},m.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},m.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},m.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},m.once=m.partial(m.before,2),m.restArguments=_;var V=!{toString:null}.propertyIsEnumerable("toString"),D=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],P=function(e,t){var n=D.length,r=e.constructor,o=m.isFunction(r)&&r.prototype||u,i="constructor";for(T(e,i)&&!m.contains(t,i)&&t.push(i);n--;)(i=D[n])in e&&e[i]!==o[i]&&!m.contains(t,i)&&t.push(i)};m.keys=function(e){if(!m.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)T(e,n)&&t.push(n);return V&&P(e,t),t},m.allKeys=function(e){if(!m.isObject(e))return[];var t=[];for(var n in e)t.push(n);return V&&P(e,t),t},m.values=function(e){for(var t=m.keys(e),n=t.length,r=Array(n),o=0;o<n;o++)r[o]=e[t[o]];return r},m.mapObject=function(e,t,n){t=N(t,n);for(var r=m.keys(e),o=r.length,i={},a=0;a<o;a++){var u=r[a];i[u]=t(e[u],u,e)}return i},m.pairs=function(e){for(var t=m.keys(e),n=t.length,r=Array(n),o=0;o<n;o++)r[o]=[t[o],e[t[o]]];return r},m.invert=function(e){for(var t={},n=m.keys(e),r=0,o=n.length;r<o;r++)t[e[n[r]]]=n[r];return t},m.functions=m.methods=function(e){var t=[];for(var n in e)m.isFunction(e[n])&&t.push(n);return t.sort()};var F=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var o=1;o<r;o++)for(var i=arguments[o],a=e(i),u=a.length,c=0;c<u;c++){var l=a[c];t&&void 0!==n[l]||(n[l]=i[l])}return n}};m.extend=F(m.allKeys),m.extendOwn=m.assign=F(m.keys),m.findKey=function(e,t,n){t=N(t,n);for(var r,o=m.keys(e),i=0,a=o.length;i<a;i++)if(t(e[r=o[i]],r,e))return r};var z,B,H=function(e,t,n){return t in n};m.pick=_(function(e,t){var n={},r=t[0];if(null==e)return n;m.isFunction(r)?(t.length>1&&(r=b(r,t[1])),t=m.allKeys(e)):(r=H,t=M(t,!1,!1),e=Object(e));for(var o=0,i=t.length;o<i;o++){var a=t[o],u=e[a];r(u,a,e)&&(n[a]=u)}return n}),m.omit=_(function(e,t){var n,r=t[0];return m.isFunction(r)?(r=m.negate(r),t.length>1&&(n=t[1])):(t=m.map(M(t,!1,!1),String),r=function(e,n){return!m.contains(t,n)}),m.pick(e,r,n)}),m.defaults=F(m.allKeys,!0),m.create=function(e,t){var n=w(e);return t&&m.extendOwn(n,t),n},m.clone=function(e){return m.isObject(e)?m.isArray(e)?e.slice():m.extend({},e):e},m.tap=function(e,t){return t(e),e},m.isMatch=function(e,t){var n=m.keys(t),r=n.length;if(null==e)return!r;for(var o=Object(e),i=0;i<r;i++){var a=n[i];if(t[a]!==o[a]||!(a in o))return!1}return!0},z=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&B(e,t,n,r)},B=function(e,t,n,r){e instanceof m&&(e=e._wrapped),t instanceof m&&(t=t._wrapped);var o=f.call(e);if(o!==f.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return c.valueOf.call(e)===c.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,u=t.constructor;if(a!==u&&!(m.isFunction(a)&&a instanceof a&&m.isFunction(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var l=n.length;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),i){if((l=e.length)!==t.length)return!1;for(;l--;)if(!z(e[l],t[l],n,r))return!1}else{var s,d=m.keys(e);if(l=d.length,m.keys(t).length!==l)return!1;for(;l--;)if(s=d[l],!T(t,s)||!z(e[s],t[s],n,r))return!1}return n.pop(),r.pop(),!0},m.isEqual=function(e,t){return z(e,t)},m.isEmpty=function(e){return null==e||(x(e)&&(m.isArray(e)||m.isString(e)||m.isArguments(e))?0===e.length:0===m.keys(e).length)},m.isElement=function(e){return!(!e||1!==e.nodeType)},m.isArray=p||function(e){return"[object Array]"===f.call(e)},m.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},m.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e){m["is"+e]=function(t){return f.call(t)==="[object "+e+"]"}}),m.isArguments(arguments)||(m.isArguments=function(e){return T(e,"callee")});var U=o.document&&o.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof U&&(m.isFunction=function(e){return"function"==typeof e||!1}),m.isFinite=function(e){return!m.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},m.isNaN=function(e){return m.isNumber(e)&&isNaN(e)},m.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===f.call(e)},m.isNull=function(e){return null===e},m.isUndefined=function(e){return void 0===e},m.has=function(e,t){if(!m.isArray(t))return T(e,t);for(var n=t.length,r=0;r<n;r++){var o=t[r];if(null==e||!d.call(e,o))return!1;e=e[o]}return!!n},m.noConflict=function(){return o._=i,this},m.identity=function(e){return e},m.constant=function(e){return function(){return e}},m.noop=function(){},m.property=function(e){return m.isArray(e)?function(t){return k(t,e)}:E(e)},m.propertyOf=function(e){return null==e?function(){}:function(t){return m.isArray(t)?k(e,t):e[t]}},m.matcher=m.matches=function(e){return e=m.extendOwn({},e),function(t){return m.isMatch(t,e)}},m.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var o=0;o<e;o++)r[o]=t(o);return r},m.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},m.now=Date.now||function(){return(new Date).getTime()};var $={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},q=m.invert($),K=function(e){var t=function(t){return e[t]},n="(?:"+m.keys(e).join("|")+")",r=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(o,t):e}};m.escape=K($),m.unescape=K(q),m.result=function(e,t,n){m.isArray(t)||(t=[t]);var r=t.length;if(!r)return m.isFunction(n)?n.call(e):n;for(var o=0;o<r;o++){var i=null==e?void 0:e[t[o]];void 0===i&&(i=n,o=r),e=m.isFunction(i)?i.call(e):i}return e};var J=0;m.uniqueId=function(e){var t=++J+"";return e?e+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var W=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Z=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+G[e]};m.template=function(e,t,n){!t&&n&&(t=n),t=m.defaults({},t,m.templateSettings);var r,o=RegExp([(t.escape||W).source,(t.interpolate||W).source,(t.evaluate||W).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(o,function(t,n,r,o,u){return a+=e.slice(i,u).replace(Z,Q),i=u+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var u=function(e){return r.call(this,e,m)},c=t.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},m.chain=function(e){var t=m(e);return t._chain=!0,t};var X=function(e,t){return e._chain?m(t).chain():t};m.mixin=function(e){return m.each(m.functions(e),function(t){var n=m[t]=e[t];m.prototype[t]=function(){var e=[this._wrapped];return l.apply(e,arguments),X(this,n.apply(m,e))}}),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];m.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],X(this,n)}}),m.each(["concat","join","slice"],function(e){var t=a[e];m.prototype[e]=function(){return X(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return m}.apply(t,[]))||(n.exports=r)}()}).call(this,n(6),n(11)(e))},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"StateCache",function(){return s}),n.d(r,"NodeCache",function(){return f}),n.d(r,"TransitionCache",function(){return d}),n.d(r,"MiddlewareCache",function(){return p});var o={};n.r(o),n.d(o,"protectVTree",function(){return W}),n.d(o,"unprotectVTree",function(){return G}),n.d(o,"cleanMemory",function(){return Z});var i=n(4),a=n.n(i);class u{constructor(e,t,n){this.channelName=e,this.identifier=t,this.cable=n,this.eventName="fieChanged",this.subscription=App.cable.subscriptions.create({channel:e,identifier:t},{connected:e=>{this.connected()},received:e=>this.received(e)})}connected(){this.perform("initialize_pools"),console.log(`Connected to ${this.channelName} with identifier ${this.identifier}`)}perform(e,t={}){this.subscription.perform(e,t)}}class c extends u{received(e){this.cable.commander.processCommand(e.command,e.parameters)}}var l=n(1),s=new Map,f=new Map,d=new Map,p=new Set;p.CreateTreeHookCache=new Set,p.CreateNodeHookCache=new Set,p.SyncTreeHookCache=new Set;for(var h=new Set,v=new Set,y=new Set,m={free:h,allocated:v,protected:y},g=0;g<1e4;g++)h.add({rawNodeName:"",nodeName:"",nodeValue:"",nodeType:1,key:"",childNodes:[],attributes:{}});var b=h.values(),N={size:1e4,memory:m,get:function(){var e=b.next(),t=e.value,n=void 0===t?{rawNodeName:"",nodeName:"",nodeValue:"",nodeType:1,key:"",childNodes:[],attributes:{}}:t;return e.done&&(b=h.values()),h.delete(n),v.add(n),n},protect:function(e){v.delete(e),y.add(e)},unprotect:function(e){y.has(e)&&(y.delete(e),h.add(e))}},_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function w(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var E=p.CreateTreeHookCache,T=(Object.assign,Array.isArray),k="#document-fragment";function O(e,t,n){for(var r=arguments.length,o=Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];if(!e)return null;if(T(e)){n=[];for(var a=0;a<e.length;a++){var u=O(e[a]);if(u){var c,l=11===u.nodeType;if("string"==typeof u.rawNodeName&&l)(c=n).push.apply(c,w(u.childNodes));else n.push(u)}}return O(k,null,n)}var s="object"===(void 0===e?"undefined":_(e));if(e&&s&&"parentNode"in e){if(t={},n=[],3===e.nodeType)n=e.nodeValue;else if(1===e.nodeType&&e.attributes.length){t={};for(var d=0;d<e.attributes.length;d++){var p=e.attributes[d],h=p.name,v=p.value;""===v&&h in e?t[h]=e[h]:t[h]=v}}if((1===e.nodeType||11===e.nodeType)&&e.childNodes.length){n=[];for(var y=0;y<e.childNodes.length;y++)n.push(O(e.childNodes[y]))}var m=O(e.nodeName,t,n);return f.set(m,e),m}if(s)return"children"in e&&!("childNodes"in e)?O(e.nodeName||e.elementName,e.attributes,e.children):e;o.length&&(n=[n].concat(o));var g=N.get(),b="#text"===e,S="string"==typeof e;if(g.key="",g.rawNodeName=e,g.nodeName=S?e.toLowerCase():"#document-fragment",g.childNodes.length=0,g.nodeValue="",g.attributes={},b){var x=2===arguments.length?t:n,A=T(x)?x.join(""):x;return g.nodeType=3,g.nodeValue=String(A||""),g}g.nodeType=e===k||"string"!=typeof e?11:"#comment"===e?8:1;var j=T(t)||"object"!==(void 0===t?"undefined":_(t))?t:n,C=T(j)?j:[j];if(j&&C.length)for(var M=0;M<C.length;M++){var R=C[M];if(Array.isArray(R))for(var I=0;I<R.length;I++)g.childNodes.push(R[I]);else{if(!R)continue;if(11===R.nodeType&&"string"==typeof R.rawNodeName)for(var L=0;L<R.childNodes.length;L++)g.childNodes.push(R.childNodes[L]);else R&&"object"===(void 0===R?"undefined":_(R))?g.childNodes.push(R):R&&g.childNodes.push(O("#text",null,R))}}t&&"object"===(void 0===t?"undefined":_(t))&&!T(t)&&(g.attributes=t),"script"===g.nodeName&&g.attributes.src&&(g.key=String(g.attributes.src)),g.attributes&&"key"in g.attributes&&(g.key=String(g.attributes.key));var V=g;return E.forEach(function(e,t){(t=e(V))&&(V=t)}),V}var S=n(0),x=p.CreateNodeHookCache,A="http://www.w3.org/2000/svg";function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2];if("production"!==S.a.env.NODE_ENV&&!e)throw new Error("Missing VTree when trying to create DOM Node");var r=f.get(e);if(r)return r;var o=e.nodeName,i=e.rawNodeName,a=void 0===i?o:i,u=e.childNodes,c=void 0===u?[]:u;n=n||"svg"===o;var l=null;x.forEach(function(t,n){(n=t(e))&&(l=n)}),l||(l="#text"===o?t.createTextNode(e.nodeValue):"#document-fragment"===o?t.createDocumentFragment():n?t.createElementNS(A,a):t.createElement(a)),f.set(e,l);for(var s=0;s<c.length;s++)l.appendChild(j(c[s],t,n));return l}function C(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var M=/\S/,R=/<!.*>/i,I=/\b([_a-z][_a-z0-9\-]*)\s*(=\s*("([^"]+)"|'([^']+)'|(\S+)))?/gi,L=/[^ ]/,V=/__DIFFHTML__([^_]*)__/,D=/<!--[^]*?(?=-->)-->|<(\/?)([a-z\-\_][a-z0-9\-\_]*)\s*([^>]*?)(\/?)>/gi,P=(Object.assign,new Set(["script","noscript","style","code","template"])),F=new Set(["meta","img","link","input","area","br","hr","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),z={li:{li:!0},p:{p:!0,div:!0},td:{td:!0,th:!0},th:{td:!0,th:!0}},B={li:{ul:!0,ol:!0},a:{div:!0},b:{div:!0},i:{div:!0},p:{div:!0},td:{tr:!0,table:!0},th:{tr:!0,table:!0}},H=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&!R.test(t)&&!V.test(t))return e.childNodes.push(O("#text",t));for(var o=[],i=t.split(V),a=(i.length,0);a<i.length;a++){var u=i[a];if(u)if(a%2==1){var c=r.children[u];if(!c)continue;var l=11===c.nodeType;"string"==typeof c.rawNodeName&&l?o.push.apply(o,C(c.childNodes)):o.push(c)}else R.test(u)||o.push(O("#text",u))}(n=e.childNodes).push.apply(n,o)},U=function e(t,n,r){var o;if(o=V.exec(t))return e(r.tags[o[1]],n,r);for(var i,a={};i=I.exec(n||"");){var u=i[1],c=i[6]||i[5]||i[4]||i[1],l=c.match(V);if(l&&l.length)for(var s=c.split(V),f=(s.length,V.exec(u)),d=f?r.attributes[f[1]]:u,p=0;p<s.length;p++){var h=s[p];h&&(p%2==1?a[d]?a[d]+=r.attributes[h]:a[d]=r.attributes[h]:a[d]?a[d]+=h:a[d]=h)}else if(l=V.exec(u)){var v=r.attributes[l[1]],y=V.exec(c),m=y?r.attributes[y[1]]:c;a[v]='""'===c?"":m}else a[u]='""'===c?"":c}return O(t,a,[])};function $(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=O("#document-fragment",null,[]),a=[i],u=i,c=-1;if(-1===e.indexOf("<")&&e)return H(u,e,t),i;for(;n=D.exec(e);){c>-1&&c+n[0].length<D.lastIndex&&(r=e.slice(c,D.lastIndex-n[0].length))&&H(u,r,t);var l=D.lastIndex-n[0].length;if(-1===c&&l>0){var s=e.slice(0,l);s&&M.test(s)&&!R.exec(s)&&H(u,s,t)}if(c=D.lastIndex,"!"!==n[0][1]){if(!n[1]){if(!n[4]&&z[u.rawNodeName]&&z[u.rawNodeName][n[2]]&&(a.pop(),u=a[a.length-1]),u=u.childNodes[u.childNodes.push(U(n[2],n[3],t))-1],a.push(u),P.has(n[2])){var f="</"+n[2]+">",d=e.indexOf(f,D.lastIndex);n[2].length;-1===d?c=D.lastIndex=e.length+1:(c=d+f.length,D.lastIndex=c,n[1]=!0);var p=e.slice(n.index+n[0].length,d);H(u,p,t)}}if(n[1]||n[4]||F.has(n[2])){if(n[2]!==u.rawNodeName&&o.strict){var h=u.rawNodeName,v=e.slice(D.lastIndex-n[0].length).split("\n").slice(0,3),y=Array(L.exec(v[0]).index).join(" ")+"^";throw v.splice(1,0,y+"\nPossibly invalid markup. Saw "+n[2]+", expected "+h+"...\n "),new Error("\n\n"+v.join("\n"))}for(var m=V.exec(n[2]);u;){if("/"===n[4]&&m){a.pop(),u=a[a.length-1];break}if(m){var g=t.tags[m[1]];if(u.rawNodeName===g){a.pop(),u=a[a.length-1];break}}if(u.rawNodeName===n[2]){a.pop(),u=a[a.length-1];break}var b=B[u.rawNodeName];if(!b||!b[n[2]])break;a.pop(),u=a[a.length-1]}}}}var N=e.slice(-1===c?0:c).trim();if(N&&H(u,N,t),i.childNodes.length&&"html"===i.childNodes[0].nodeName){var _={before:[],after:[]},w={after:[]},E=i.childNodes[0],T=!0,k=!0;if(E.childNodes=E.childNodes.filter(function(e){if("body"===e.nodeName||"head"===e.nodeName)return"head"===e.nodeName&&(T=!1),"body"===e.nodeName&&(k=!1),!0;1===e.nodeType&&(T&&k?_.before.push(e):!T&&k?_.after.push(e):k||w.after.push(e))}),E.childNodes[0]&&"head"===E.childNodes[0].nodeName){var S=E.childNodes[0].childNodes;S.unshift.apply(S,_.before),S.push.apply(S,_.after)}else{var x=O("head",null,[]),A=x.childNodes;A.unshift.apply(A,_.before),A.push.apply(A,_.after),E.childNodes.unshift(x)}if(E.childNodes[1]&&"body"===E.childNodes[1].nodeName){var j=E.childNodes[1].childNodes;j.push.apply(j,w.after)}else{var C=O("body",null,[]),$=C.childNodes;$.push.apply($,w.after),E.childNodes.push(C)}}return I.lastIndex=0,D.lastIndex=0,i}var q=N.memory,K=N.protect,J=N.unprotect;function W(e){K(e);for(var t=0;t<e.childNodes.length;t++)W(e.childNodes[t]);return e}function G(e){J(e);for(var t=0;t<e.childNodes.length;t++)G(e.childNodes[t]);return e}function Z(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];s.forEach(function(t){return e=t.isRendering||e}),q.allocated.forEach(function(e){return q.free.add(e)}),q.allocated.clear(),f.forEach(function(e,t){q.protected.has(t)||f.delete(t)})}function Q(e){var t=e.state,n=e.domNode,r=e.markup,o=e.options,i=t.previousMarkup,a=o.inner;if(i===n.outerHTML&&t.oldTree||(t.oldTree&&G(t.oldTree),t.oldTree=O(n),f.set(t.oldTree,n),W(t.oldTree)),e.oldTree=t.oldTree,e.newTree||(e.newTree=O(r)),a){var u=e.oldTree,c=e.newTree,l=(u.rawNodeName,u.nodeName),s=u.attributes,d="string"!=typeof c.rawNodeName,p=11===c.nodeType&&!d?c.childNodes:c;e.newTree=O(l,s,p)}}var X=n(2);function Y(e){return e.replace(/[&<>]/g,function(e){return"&#"+e.charCodeAt(0)+";"})}var ee=n(3),te=Object.assign({decodeEntities:X.a,escape:Y,makeMeasure:ee.a,memory:o,Pool:N,process:S.a},r);function ne(e){var t=e.state;if(t.isRendering){t.nextTransaction&&t.nextTransaction.promises[0].resolve(t.nextTransaction),t.nextTransaction=e;var n={},r=new Promise(function(e){return n.resolve=e});return r.resolve=n.resolve,e.promises=[r],e.abort()}t.isRendering=!0}function re(e){var t=e.markup,n=e.state,r=e.state.measure;if(r("should update"),"string"==typeof t&&n.markup===t)return e.abort();"string"==typeof t&&(n.markup=t),r("should update")}var oe=p.SyncTreeHookCache,ie=(Object.assign,Object.keys,{}),ae=["old","new"];function ue(e){var t=e.state.measure,n=e.oldTree,r=e.newTree;e.domNode;t("sync trees"),n.nodeName!==r.nodeName&&11!==r.nodeType?(e.patches={TREE_OPS:[{REPLACE_CHILD:[r,n]}],SET_ATTRIBUTE:[],REMOVE_ATTRIBUTE:[],NODE_VALUE:[]},G(e.oldTree),e.oldTree=e.state.oldTree=r,W(e.oldTree),s.set(j(r),e.state)):e.patches=function e(t,n,r,o,i){t||(t=ie),n||(n=ie);var a=t.nodeName,u=11===n.nodeType,c=t===ie,l={old:new Map,new:new Map};if("production"!==S.a.env.NODE_ENV){if(n===ie)throw new Error("Missing new Virtual Tree to sync changes from");if(!c&&a!==n.nodeName&&!u)throw new Error("Sync failure, cannot compare "+n.nodeName+" with "+a)}for(var s=0;s<ae.length;s++){var f=ae[s],d=l[f],p=arguments[s],h=p&&p.childNodes;if(h&&h.length)for(var v=0;v<h.length;v++){var y=h[v];if(y.key){if("production"!==S.a.env.NODE_ENV&&d.has(y.key))throw new Error("Key: "+y.key+" cannot be duplicated");d.set(y.key,y)}}}oe.forEach(function(a,u){(u=a(t=i||t,n,l,o)||n)&&u!==n&&(n.childNodes=[].concat(u),e(t!==ie?t:null,u,r,n),n=u)});var m=n.nodeName,g=r=r||{SET_ATTRIBUTE:[],REMOVE_ATTRIBUTE:[],TREE_OPS:[],NODE_VALUE:[]},b=g.SET_ATTRIBUTE,N=g.REMOVE_ATTRIBUTE,_=g.TREE_OPS,w=g.NODE_VALUE,E={INSERT_BEFORE:[],REMOVE_CHILD:[],REPLACE_CHILD:[]},T=E.INSERT_BEFORE,k=E.REMOVE_CHILD,O=E.REPLACE_CHILD,x=1===n.nodeType;if("#text"===n.nodeName)return"#text"!==t.nodeName?w.push(n,n.nodeValue,null):c||t.nodeValue===n.nodeValue||(w.push(t,n.nodeValue,t.nodeValue),t.nodeValue=n.nodeValue),r;if(x){var A=c?ie:t.attributes,j=n.attributes;for(var C in j){var M=j[C];C in A&&A[C]===j[C]||(c||(A[C]=M),b.push(c?n:t,C,M))}if(!c)for(var R in A)R in j||(N.push(t,R),delete A[R])}if("production"!==S.a.env.NODE_ENV&&!c&&a!==m&&!u)throw new Error("Sync failure, cannot compare "+m+" with "+a);var I=n.childNodes;if(c){for(var L=0;L<I.length;L++)e(null,I[L],r,n);return r}var V=t.childNodes;if(l.old.size||l.new.size){l.old.values();for(var D=0;D<I.length;D++){var P=V[D],F=I[D],z=F.key;if(P){var B=P.key,H=l.new.has(B),U=l.old.has(z);if(H||U)if(H)if(z===B)P.nodeName===F.nodeName?e(P,F,r,n):(O.push(F,P),t.childNodes[D]=F,e(null,F,r,n));else{var $=F;z&&U?($=l.old.get(z),V.splice(V.indexOf($),1)):z&&($=F,e(null,F,r,n)),T.push(t,$,P),V.splice(D,0,$)}else k.push(P),V.splice(V.indexOf(P),1),D-=1;else O.push(F,P),V.splice(V.indexOf(P),1,F),e(null,F,r,n)}else T.push(t,F,null),V.push(F),e(null,F,r,n)}}else for(var q=0;q<I.length;q++){var K=V&&V[q],J=I[q];if(K)if(K.nodeName===J.nodeName)e(K,J,r,t);else{O.push(J,K);var W=t.childNodes[q];t.childNodes[q]=J,e(null,J,r,t,W)}else T.push(t,J,null),V&&V.push(J),e(null,J,r,t)}if(V.length!==I.length){for(var G=I.length;G<V.length;G++)k.push(V[G]);V.length=I.length}return(T.length||k.length||O.length)&&(T.length||(E.INSERT_BEFORE=null),k.length||(E.REMOVE_CHILD=null),O.length||(E.REPLACE_CHILD=null),_.push(E)),r}(n,r),t("sync trees")}var ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function le(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var se=["attached","detached","replaced","attributeChanged","textChanged"];function fe(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=d.get(e),i=[];if(!o.size)return i;if("textChanged"!==e&&3===n[0].nodeType)return i;if(o.forEach(function(e){var t=e.apply(void 0,n);"object"===(void 0===t?"undefined":ce(t))&&t.then&&i.push(t)}),"attached"===e||"detached"===e){var a=n[0];[].concat(le(a.childNodes)).forEach(function(t){i.push.apply(i,le(fe.apply(void 0,[e,t].concat(le(n.slice(1))))))})}return i}se.forEach(function(e){return d.set(e,new Set)});var de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function pe(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var he=new Set(["script","noscript","style","code","template"]),ve=function(e,t){e.removeAttribute(t),t in e&&(e[t]=void 0)},ye=new Set;function me(e){var t=e.domNode,n=e.state,r=e.state.measure,o=e.patches,i=e.promises,a=void 0===i?[]:i,u=t.namespaceURI,c=void 0===u?"":u,l=t.nodeName;n.isSVG="svg"===l.toLowerCase()||c.includes("svg"),n.ownerDocument=t.ownerDocument||document,r("patch node"),a.push.apply(a,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=e.TREE_OPS,o=e.NODE_VALUE,i=e.SET_ATTRIBUTE,a=e.REMOVE_ATTRIBUTE,u=t.isSVG,c=t.ownerDocument;if(i.length)for(var l=0;l<i.length;l+=3){var s=i[l],p=i[l+1],h=Object(X.a)(i[l+2]),v=j(s,c,u),y=fe("attributeChanged",v,p,v.getAttribute(p),h),m="object"===(void 0===h?"undefined":de(h)),g="function"==typeof h,b=0===p.indexOf("on")?p.toLowerCase():p;if(m||g||!b){if(m&&"style"===b)for(var N=Object.keys(h),_=0;_<N.length;_++)v.style[N[_]]=h[N[_]];else if("string"!=typeof h){v.hasAttribute(b)&&v[b]!==h&&v.removeAttribute(b,""),v.setAttribute(b,"");try{v[b]=h}catch(e){}}}else{var w=null===h||void 0===h,E=s.nodeName+"-"+b;if(!ye.has(E))try{v[b]=h}catch(e){ye.add(E)}v.setAttribute(b,w?"":h)}y.length&&n.push.apply(n,pe(y))}if(a.length)for(var T=function(e){var t=a[e],r=a[e+1],o=f.get(t),i=(d.get("attributeChanged"),o.getAttribute(r)),u=fe("attributeChanged",o,r,i,null);u.length?(Promise.all(u).then(function(){return ve(o,r)}),n.push.apply(n,pe(u))):ve(o,r)},k=0;k<a.length;k+=2)T(k);for(var O=0;O<r.length;O++){var S=r[O],x=S.INSERT_BEFORE,A=S.REMOVE_CHILD,C=S.REPLACE_CHILD;if(x&&x.length)for(var M=0;M<x.length;M+=3){var R=x[M],I=x[M+1],L=x[M+2],V=f.get(R),D=L&&j(L,c,u);d.get("attached"),L&&W(L);var P=j(I,c,u);W(I),V.insertBefore(P,D);var F=fe("attached",P);n.push.apply(n,pe(F))}if(A&&A.length)for(var z=function(e){var t=A[e],r=f.get(t),o=(d.get("detached"),fe("detached",r));o.length?(Promise.all(o).then(function(){r.parentNode.removeChild(r),G(t)}),n.push.apply(n,pe(o))):(r.parentNode.removeChild(r),G(t))},B=0;B<A.length;B++)z(B);if(C&&C.length)for(var H=function(e){var t=C[e],r=C[e+1],o=f.get(r),i=j(t,c,u);d.get("attached"),d.get("detached"),d.get("replaced"),o.parentNode.insertBefore(i,o),W(t);var a=fe("attached",i),l=fe("detached",o),s=fe("replaced",o,i),p=[].concat(pe(a),pe(l),pe(s));p.length?(Promise.all(p).then(function(){o.parentNode.replaceChild(i,o),G(r)}),n.push.apply(n,pe(p))):(o.parentNode.replaceChild(i,o),G(r))},U=0;U<C.length;U+=2)H(U)}if(o.length)for(var $=0;$<o.length;$+=3){var q=o[$],K=o[$+1],J=o[$+2],Z=j(q),Q=(d.get("textChanged"),fe("textChanged",Z,J,K)),ee=Z.parentNode;K.includes("&")?Z.nodeValue=Object(X.a)(K):Z.nodeValue=K,ee&&he.has(ee.nodeName.toLowerCase())&&(ee.nodeValue=Y(Object(X.a)(K))),Q.length&&n.push.apply(n,pe(Q))}return n}(o,n))),r("patch node"),e.promises=a}function ge(e){var t=e.promises,n=void 0===t?[]:t;return n.length?Promise.all(n).then(function(){return e.end()}):Promise.resolve(e.end())}var be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var _e=[ne,re,Q,ue,me,ge],we={schedule:ne,shouldUpdate:re,reconcileTrees:Q,syncTrees:ue,patchNode:me,endAsPromise:ge},Ee=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.domNode=t,this.markup=n,this.options=r,this.state=s.get(t)||{measure:Object(ee.a)(t,n)},this.tasks=[].concat(r.tasks),this.endedCallbacks=new Set,s.set(t,this.state)}return Ne(e,null,[{key:"create",value:function(t,n,r){return new e(t,n,r)}},{key:"renderNext",value:function(t){if(t.nextTransaction){var n=t.nextTransaction,r=t.nextTransaction.promises,o=r&&r[0];t.nextTransaction=void 0,n.aborted=!1,n.tasks.pop(),e.flow(n,n.tasks),r&&r.length>1?Promise.all(r.slice(1)).then(function(){return o.resolve()}):o&&o.resolve()}}},{key:"flow",value:function(e,t){for(var n=e,r=0;r<t.length;r++){if(e.aborted)return n;if(void 0!==(n=t[r](e))&&n!==e)return n}}},{key:"assert",value:function(e){if("production"!==S.a.env.NODE_ENV){if("object"!==be(e.domNode))throw new Error("Transaction requires a DOM Node mount point");if(e.aborted&&e.completed)throw new Error("Transaction was previously aborted");if(e.completed)throw new Error("Transaction was previously completed")}}},{key:"invokeMiddleware",value:function(e){var t=e.tasks;p.forEach(function(n){var r=n(e);r&&t.push(r)})}}]),Ne(e,[{key:"start",value:function(){"production"!==S.a.env.NODE_ENV&&e.assert(this);this.domNode;var t=this.state.measure,n=this.tasks,r=n.pop();return this.aborted=!1,e.invokeMiddleware(this),t("render"),n.push(r),e.flow(this,n)}},{key:"abort",value:function(){this.state;return this.aborted=!0,this.tasks[this.tasks.length-1](this)}},{key:"end",value:function(){var t=this,n=this.state,r=this.domNode,o=this.options,i=n.measure;o.inner;return i("finalize"),this.completed=!0,i("finalize"),i("render"),this.endedCallbacks.forEach(function(e){return e(t)}),this.endedCallbacks.clear(),n.previousMarkup=r.outerHTML,n.isRendering=!1,Z(),e.renderNext(n),this}},{key:"onceEnded",value:function(e){this.endedCallbacks.add(e)}}]),e}();function Te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.inner=!0,n.tasks=n.tasks||_e,Ee.create(e,t,n).start()}var ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe=/(=|"|')[^><]*?$/,Se=/(<|\/)/,xe="__DIFFHTML__",Ae=function(e){var t=e.shift();return"string"==typeof t?Y(Object(X.a)(t)):t};var je=p.CreateTreeHookCache,Ce=p.CreateNodeHookCache,Me=p.SyncTreeHookCache;function Re(e){if("production"!==S.a.env.NODE_ENV&&"function"!=typeof e)throw new Error("Middleware must be a function");var t=e.subscribe,n=e.unsubscribe,r=e.createTreeHook,o=e.createNodeHook,i=e.syncTreeHook;return p.add(e),t&&e.subscribe(),r&&je.add(r),o&&Ce.add(o),i&&Me.add(i),function(){p.delete(e),n&&n(),je.delete(r),Ce.delete(o),Me.delete(i)}}_e.splice(_e.indexOf(Q),0,function(e){var t=e.state,n=e.markup,r=e.options,o=t.measure,i=r.inner;if("string"==typeof n){o("parsing markup for new tree");var a=$(n,null,r).childNodes;e.newTree=O(i?a:a[0]||a),o("parsing markup for new tree")}});var Ie={VERSION:"1.0.0-beta.9",addTransitionState:function(e,t){if("production"!==S.a.env.NODE_ENV){if(!e||!se.includes(e))throw new Error("Invalid state name '"+e+"'");if(!t)throw new Error("Missing transition state callback")}d.get(e).add(t)},removeTransitionState:function(e,t){if("production"!==S.a.env.NODE_ENV&&e&&!se.includes(e))throw new Error("Invalid state name '"+e+"'");if(!t&&e)d.get(e).clear();else if(e&&t)d.get(e).delete(t);else for(var n=0;n<se.length;n++)d.get(se[n]).clear()},release:function(e){var t=s.get(e);t&&t.oldTree&&G(t.oldTree),s.delete(e),Z()},createTree:O,use:Re,outerHTML:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.inner=!1,n.tasks=n.tasks||_e,Ee.create(e,t,n).start()},innerHTML:Te,html:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"==typeof e&&(e=[e]),!e)return null;if(1===e.length&&!n.length){var o=$(e[0]).childNodes;return o.length>1?O(o):o[0]}var i="",a={attributes:{},children:{},tags:{}};e.forEach(function(e,t){if(i+=e,n.length){var r=Ae(n),o=e.split(" ").pop().trim().slice(-1),u=Boolean(i.match(Oe)),c=Boolean(o.match(Se)),l="string"==typeof r,s="object"===(void 0===r?"undefined":ke(r)),f=Array.isArray(r),d=xe+t+"__";u?(a.attributes[t]=r,i+=d):c&&!l?(a.tags[t]=r,i+=d):f||s?(a.children[t]=O(r),i+=d):r&&(i+=r)}});var u=$(i,a).childNodes;return 1===u.length?u[0]:O(u)}},Le=Object.assign(te,Ie,{parse:$,defaultTasks:_e,tasks:we,createNode:j});Ie.Internals=Le,"undefined"!=typeof devTools&&(Re(devTools(Le)),console.info("diffHTML DevTools Found and Activated..."));class Ve extends u{connected(){super.connected(),this.cable.callRemoteFunction(document.body,"initialize_state","Upload State",{view_variables:l.a.viewVariables})}received(e){this.processCommand(e.command,e.parameters)}processCommand(e,t={}){switch(e){case"refresh_view":Te(document.querySelector("[fie-body=true]"),t.html);const n=new Event(this.eventName);document.dispatchEvent(n);break;case"subscribe_to_pools":t.subjects.forEach(e=>this.cable.subscribeToPool(e));break;case"publish_to_pool":{const e=t.subject,n=t.object,r=t.sender_uuid;this.perform(`pool_${e}_callback`,{object:n,sender_uuid:r})}break;case"publish_to_pool_lazy":{const e=t.subject,n=t.object,r=t.sender_uuid;this.perform(`pool_${e}_callback`,{object:n,sender_uuid:r,lazy:!0})}break;case"execute_function":l.a.execJS(t.name,t.arguments);break;default:console.log(`Command: ${e}, Parameters: ${t}`)}}}var De=n(8);class Pe{constructor(){const e=a()();let t=`${Object(De.camelize)(this._controllerName)}Commander`;t=t.charAt(0).toUpperCase()+t.slice(1),this.commander=new Ve(t,e,this),this.pools={}}callRemoteFunction(e,t,n,r){this._logEvent(e,n,t,r);const o={caller:{id:e.id,class:e.className,value:e.value},controller_name:this._controllerName,action_name:this._actionName,...r};this.commander.perform(t,o)}subscribeToPool(e){this.pools[e]=new c("Fie::Pools",e,this)}_logEvent(e,t,n,r){console.log(`Event ${t} triggered by element ${this._elementDescriptor(e)} is calling function ${n} with parameters ${JSON.stringify(r)}`)}_elementDescriptor(e){const t=e.tagName,n=""==e.id||null==e.id||void 0==e.id,r=""==e.className||null==e.className||void 0==e.className;return n?r?t:`${t}.${e.className}`:`${t}#${e.id}`}get _actionName(){return this._viewNameElement.getAttribute("fie-action")}get _controllerName(){return this._viewNameElement.getAttribute("fie-controller")}get _viewNameElement(){return document.querySelector('[fie-controller]:not([fie-controller=""])')}}class Fe{constructor(e,t=0){this.callback=e,this.timeout=setTimeout(e,t)}clear(){clearTimeout(this.timeout)}fastForward(){clearTimeout(this.timeout),this.callback()}}class ze{constructor(e){this.cable=e,this.timer=new Fe(e=>{}),this._initializeInputElements(),this._initializeFieEvents(["click","submit","scroll","keyup","keydown","enter"])}_initializeFieEvents(e){e.forEach(e=>{const t=`[fie-${e}]:not([fie-${e}=''])`;let n=e;"enter"==n&&(n="keydown"),l.a.addEventListener(n,t,t=>{this._handleFieEvent(e,n,t)})})}_handleFieEvent(e,t,n){if("enter"==e&&13==n.keyCode||"enter"!=e){const r=n.target.getAttribute(`fie-${e}`),o=JSON.parse(n.target.getAttribute("fie-parameters"))||{};this.timer.fastForward(),this.cable.callRemoteFunction(n.target,r,t,o)}}_initializeInputElements(){const e=["text","password","search","tel","url"],t=["textarea",...e].reduce((e,t)=>e+`, input[type=${t}]`),n=["input",...e].reduce((e,t)=>e+`:not([type=${t}])`);l.a.addEventListener("keydown",t,e=>{13==e.keyCode?e.target.blur():(this.timer.clear(),this.timer=new Fe(t=>this._updateStateUsingChangelog(e.target),300))}),l.a.addEventListener("focusin",t,e=>{e.target.setAttribute("fie-ignore",a()())}),l.a.addEventListener("focusout",t,e=>{e.target.removeAttribute("fie-ignore")}),l.a.addEventListener("change",n,e=>{this._updateStateUsingChangelog(e.target)})}_updateStateUsingChangelog(e){const t={},n=e.name.split("[")[0],r=e.name.match(/[^\[]+(?=\])/g),o=null!=r&&r.length>0,i=Object.keys(l.a.viewVariables).includes(n),a=o&&i,u=Object.keys(l.a.viewVariables).includes(e.name);a?this._buildChangelog(r,n,t,e):u?t[e.name]=e.value:console.log(r),this.cable.callRemoteFunction(e,"modify_state_using_changelog","Input Element Change",{objects_changelog:t})}_buildChangelog(e,t,n,r){const o=r.value;n[t]={},n=n[t],e.forEach(t=>{(t=>t==e[e.length-1])(t)?n[t]=o:(n[t]={},n=n[t])})}}var Be=n(7);n.d(t,"Fie",function(){return He});class He{constructor(){this._diffSetup(),document.addEventListener("DOMContentLoaded",e=>{this.cable=new Pe,new ze(this.cable)})}executeCommanderMethod(e,t={}){this.cable.callRemoteFunction(document.body,e,"calling remote function",JSON.parse(JSON.stringify(t)))}addEventListener(e,t,n){l.a.addEventListener(e,t,n)}triggerFieReadyEvent(){const e=new Event("fieReady");document.dispatchEvent(e)}_diffSetup(){Object(Be.polyfill)(),Re(Object.assign(e=>{},{syncTreeHook:(e,t)=>{if("input"===t.nodeName){const e=document.querySelector('[name="'+t.attributes.name+'"]');return void 0!=e&&void 0!=e.attributes["fie-ignore"]&&(t.nodeValue=e.value,t.attributes.value=e.value,t.attributes.autofocus="",t.attributes["fie-ignore"]=e.attributes["fie-ignore"]),t}}}))}}window.Fie=new He},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}}]);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eran Peer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-15 00:00:00.000000000 Z
11
+ date: 2018-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler