From ee57bca66588658fc419325d22cca58a95a6cc2b Mon Sep 17 00:00:00 2001 From: mazuh Date: Fri, 22 Mar 2024 15:15:39 -0300 Subject: [PATCH] make prod --- index.html | 566 ++++++++++++++++++++++++++--------------------------- 1 file changed, 280 insertions(+), 286 deletions(-) diff --git a/index.html b/index.html index 0811a27..96d7246 100644 --- a/index.html +++ b/index.html @@ -91,7 +91,7 @@ return fun.a === 9 ? fun.f(a, b, c, d, e, f, g, h, i) : fun(a)(b)(c)(d)(e)(f)(g)(h)(i); } -console.warn('Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.'); + var _JsArray_empty = []; @@ -248,12 +248,12 @@ // LOG -var _Debug_log_UNUSED = F2(function(tag, value) +var _Debug_log = F2(function(tag, value) { return value; }); -var _Debug_log = F2(function(tag, value) +var _Debug_log_UNUSED = F2(function(tag, value) { console.log(tag + ': ' + _Debug_toString(value)); return value; @@ -279,12 +279,12 @@ // TO STRING -function _Debug_toString_UNUSED(value) +function _Debug_toString(value) { return ''; } -function _Debug_toString(value) +function _Debug_toString_UNUSED(value) { return _Debug_toAnsiString(false, value); } @@ -469,13 +469,13 @@ // CRASH -function _Debug_crash_UNUSED(identifier) +function _Debug_crash(identifier) { throw new Error('https://github.com/elm/core/blob/1.0.0/hints/' + identifier + '.md'); } -function _Debug_crash(identifier, fact1, fact2, fact3, fact4) +function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4) { switch(identifier) { @@ -533,11 +533,11 @@ function _Debug_regionToString(region) { - if (region.start.line === region.end.line) + if (region.V.H === region.ac.H) { - return 'on line ' + region.start.line; + return 'on line ' + region.V.H; } - return 'on lines ' + region.start.line + ' through ' + region.end.line; + return 'on lines ' + region.V.H + ' through ' + region.ac.H; } @@ -575,7 +575,7 @@ return true; } - /**/ + /**_UNUSED/ if (x.$ === 'Set_elm_builtin') { x = $elm$core$Set$toList(x); @@ -588,7 +588,7 @@ } //*/ - /**_UNUSED/ + /**/ if (x.$ < 0) { x = $elm$core$Dict$toList(x); @@ -623,7 +623,7 @@ return x === y ? /*EQ*/ 0 : x < y ? /*LT*/ -1 : /*GT*/ 1; } - /**/ + /**_UNUSED/ if (x instanceof String) { var a = x.valueOf(); @@ -632,10 +632,10 @@ } //*/ - /**_UNUSED/ + /**/ if (typeof x.$ === 'undefined') //*/ - /**/ + /**_UNUSED/ if (x.$[0] === '#') //*/ { @@ -665,17 +665,17 @@ // COMMON VALUES -var _Utils_Tuple0_UNUSED = 0; -var _Utils_Tuple0 = { $: '#0' }; +var _Utils_Tuple0 = 0; +var _Utils_Tuple0_UNUSED = { $: '#0' }; -function _Utils_Tuple2_UNUSED(a, b) { return { a: a, b: b }; } -function _Utils_Tuple2(a, b) { return { $: '#2', a: a, b: b }; } +function _Utils_Tuple2(a, b) { return { a: a, b: b }; } +function _Utils_Tuple2_UNUSED(a, b) { return { $: '#2', a: a, b: b }; } -function _Utils_Tuple3_UNUSED(a, b, c) { return { a: a, b: b, c: c }; } -function _Utils_Tuple3(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } +function _Utils_Tuple3(a, b, c) { return { a: a, b: b, c: c }; } +function _Utils_Tuple3_UNUSED(a, b, c) { return { $: '#3', a: a, b: b, c: c }; } -function _Utils_chr_UNUSED(c) { return c; } -function _Utils_chr(c) { return new String(c); } +function _Utils_chr(c) { return c; } +function _Utils_chr_UNUSED(c) { return new String(c); } // RECORDS @@ -726,11 +726,11 @@ -var _List_Nil_UNUSED = { $: 0 }; -var _List_Nil = { $: '[]' }; +var _List_Nil = { $: 0 }; +var _List_Nil_UNUSED = { $: '[]' }; -function _List_Cons_UNUSED(hd, tl) { return { $: 1, a: hd, b: tl }; } -function _List_Cons(hd, tl) { return { $: '::', a: hd, b: tl }; } +function _List_Cons(hd, tl) { return { $: 1, a: hd, b: tl }; } +function _List_Cons_UNUSED(hd, tl) { return { $: '::', a: hd, b: tl }; } var _List_cons = F2(_List_Cons); @@ -1226,7 +1226,7 @@ -/**/ +/**_UNUSED/ function _Json_errorToString(error) { return $elm$json$Json$Decode$errorToString(error); @@ -1630,11 +1630,11 @@ return JSON.stringify(_Json_unwrap(value), null, indentLevel) + ''; }); -function _Json_wrap(value) { return { $: 0, a: value }; } -function _Json_unwrap(value) { return value.a; } +function _Json_wrap_UNUSED(value) { return { $: 0, a: value }; } +function _Json_unwrap_UNUSED(value) { return value.a; } -function _Json_wrap_UNUSED(value) { return value; } -function _Json_unwrap_UNUSED(value) { return value; } +function _Json_wrap(value) { return value; } +function _Json_unwrap(value) { return value; } function _Json_emptyArray() { return []; } function _Json_emptyObject() { return {}; } @@ -1871,9 +1871,9 @@ return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.aJ, + impl.aQ, + impl.aO, function() { return function() {} } ); }); @@ -1886,7 +1886,7 @@ function _Platform_initialize(flagDecoder, args, init, update, subscriptions, stepperBuilder) { var result = A2(_Json_run, flagDecoder, _Json_wrap(args ? args['flags'] : undefined)); - $elm$core$Result$isOk(result) || _Debug_crash(2 /**/, _Json_errorToString(result.a) /**/); + $elm$core$Result$isOk(result) || _Debug_crash(2 /**_UNUSED/, _Json_errorToString(result.a) /**/); var managers = {}; var initPair = init(result.a); var model = initPair.a; @@ -2330,7 +2330,7 @@ // -function _Platform_export_UNUSED(exports) +function _Platform_export(exports) { scope['Elm'] ? _Platform_mergeExportsProd(scope['Elm'], exports) @@ -2351,7 +2351,7 @@ } -function _Platform_export(exports) +function _Platform_export_UNUSED(exports) { scope['Elm'] ? _Platform_mergeExportsDebug('Elm', scope['Elm'], exports) @@ -2391,10 +2391,10 @@ { // NOTE: this function needs _Platform_export available to work - /**_UNUSED/ + /**/ var node = args['node']; //*/ - /**/ + /**_UNUSED/ var node = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ @@ -2669,14 +2669,14 @@ function _VirtualDom_noJavaScriptUri(value) { return _VirtualDom_RE_js.test(value) - ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } function _VirtualDom_noJavaScriptOrHtmlUri(value) { return _VirtualDom_RE_js_html.test(value) - ? /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + ? /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ : value; } @@ -2684,7 +2684,7 @@ { return (typeof _Json_unwrap(value) === 'string' && _VirtualDom_RE_js_html.test(_Json_unwrap(value))) ? _Json_wrap( - /**_UNUSED/''//*//**/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ + /**/''//*//**_UNUSED/'javascript:alert("This is an XSS vector. Please use ports or web components instead.")'//*/ ) : value; } @@ -2733,9 +2733,9 @@ var _VirtualDom_mapEventRecord = F2(function(func, record) { return { - message: func(record.message), - stopPropagation: record.stopPropagation, - preventDefault: record.preventDefault + v: func(record.v), + W: record.W, + T: record.T } }); @@ -3003,11 +3003,11 @@ // 3 = Custom var value = result.a; - var message = !tag ? value : tag < 3 ? value.a : value.message; - var stopPropagation = tag == 1 ? value.b : tag == 3 && value.stopPropagation; + var message = !tag ? value : tag < 3 ? value.a : value.v; + var stopPropagation = tag == 1 ? value.b : tag == 3 && value.W; var currentEventNode = ( stopPropagation && event.stopPropagation(), - (tag == 2 ? value.b : tag == 3 && value.preventDefault) && event.preventDefault(), + (tag == 2 ? value.b : tag == 3 && value.T) && event.preventDefault(), eventNode ); var tagger; @@ -3957,15 +3957,15 @@ return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.aJ, + impl.aQ, + impl.aO, function(sendToApp, initialModel) { - var view = impl.view; - /**_UNUSED/ + var view = impl.aR; + /**/ var domNode = args['node']; //*/ - /**/ + /**_UNUSED/ var domNode = args && args['node'] ? args['node'] : _Debug_crash(0); //*/ var currNode = _VirtualDom_virtualize(domNode); @@ -3993,12 +3993,12 @@ return _Platform_initialize( flagDecoder, args, - impl.init, - impl.update, - impl.subscriptions, + impl.aJ, + impl.aQ, + impl.aO, function(sendToApp, initialModel) { - var divertHrefToApp = impl.setup && impl.setup(sendToApp) - var view = impl.view; + var divertHrefToApp = impl.U && impl.U(sendToApp) + var view = impl.aR; var title = _VirtualDom_doc.title; var bodyNode = _VirtualDom_doc.body; var currNode = _VirtualDom_virtualize(bodyNode); @@ -4006,12 +4006,12 @@ { _VirtualDom_divertHrefToApp = divertHrefToApp; var doc = view(model); - var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.body); + var nextNode = _VirtualDom_node('body')(_List_Nil)(doc.aC); var patches = _VirtualDom_diff(currNode, nextNode); bodyNode = _VirtualDom_applyPatches(bodyNode, currNode, patches, sendToApp); currNode = nextNode; _VirtualDom_divertHrefToApp = 0; - (title !== doc.title) && (_VirtualDom_doc.title = title = doc.title); + (title !== doc.aP) && (_VirtualDom_doc.title = title = doc.aP); }); } ); @@ -4067,12 +4067,12 @@ function _Browser_application(impl) { - var onUrlChange = impl.onUrlChange; - var onUrlRequest = impl.onUrlRequest; + var onUrlChange = impl.aK; + var onUrlRequest = impl.aL; var key = function() { key.a(onUrlChange(_Browser_getUrl())); }; return _Browser_document({ - setup: function(sendToApp) + U: function(sendToApp) { key.a = sendToApp; _Browser_window.addEventListener('popstate', key); @@ -4088,9 +4088,9 @@ var next = $elm$url$Url$fromString(href).a; sendToApp(onUrlRequest( (next - && curr.protocol === next.protocol - && curr.host === next.host - && curr.port_.a === next.port_.a + && curr.ap === next.ap + && curr.ag === next.ag + && curr.am.a === next.am.a ) ? $elm$browser$Browser$Internal(next) : $elm$browser$Browser$External(href) @@ -4098,13 +4098,13 @@ } }); }, - init: function(flags) + aJ: function(flags) { - return A3(impl.init, flags, _Browser_getUrl(), key); + return A3(impl.aJ, flags, _Browser_getUrl(), key); }, - view: impl.view, - update: impl.update, - subscriptions: impl.subscriptions + aR: impl.aR, + aQ: impl.aQ, + aO: impl.aO }); } @@ -4170,17 +4170,17 @@ function _Browser_visibilityInfo() { return (typeof _VirtualDom_doc.hidden !== 'undefined') - ? { hidden: 'hidden', change: 'visibilitychange' } + ? { aH: 'hidden', aD: 'visibilitychange' } : (typeof _VirtualDom_doc.mozHidden !== 'undefined') - ? { hidden: 'mozHidden', change: 'mozvisibilitychange' } + ? { aH: 'mozHidden', aD: 'mozvisibilitychange' } : (typeof _VirtualDom_doc.msHidden !== 'undefined') - ? { hidden: 'msHidden', change: 'msvisibilitychange' } + ? { aH: 'msHidden', aD: 'msvisibilitychange' } : (typeof _VirtualDom_doc.webkitHidden !== 'undefined') - ? { hidden: 'webkitHidden', change: 'webkitvisibilitychange' } - : { hidden: 'hidden', change: 'visibilitychange' }; + ? { aH: 'webkitHidden', aD: 'webkitvisibilitychange' } + : { aH: 'hidden', aD: 'visibilitychange' }; } @@ -4261,12 +4261,12 @@ function _Browser_getViewport() { return { - scene: _Browser_getScene(), - viewport: { - x: _Browser_window.pageXOffset, - y: _Browser_window.pageYOffset, - width: _Browser_doc.documentElement.clientWidth, - height: _Browser_doc.documentElement.clientHeight + at: _Browser_getScene(), + aw: { + ay: _Browser_window.pageXOffset, + az: _Browser_window.pageYOffset, + ax: _Browser_doc.documentElement.clientWidth, + af: _Browser_doc.documentElement.clientHeight } }; } @@ -4276,8 +4276,8 @@ var body = _Browser_doc.body; var elem = _Browser_doc.documentElement; return { - width: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), - height: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) + ax: Math.max(body.scrollWidth, body.offsetWidth, elem.scrollWidth, elem.offsetWidth, elem.clientWidth), + af: Math.max(body.scrollHeight, body.offsetHeight, elem.scrollHeight, elem.offsetHeight, elem.clientHeight) }; } @@ -4300,15 +4300,15 @@ return _Browser_withNode(id, function(node) { return { - scene: { - width: node.scrollWidth, - height: node.scrollHeight + at: { + ax: node.scrollWidth, + af: node.scrollHeight }, - viewport: { - x: node.scrollLeft, - y: node.scrollTop, - width: node.clientWidth, - height: node.clientHeight + aw: { + ay: node.scrollLeft, + az: node.scrollTop, + ax: node.clientWidth, + af: node.clientHeight } }; }); @@ -4338,18 +4338,18 @@ var x = _Browser_window.pageXOffset; var y = _Browser_window.pageYOffset; return { - scene: _Browser_getScene(), - viewport: { - x: x, - y: y, - width: _Browser_doc.documentElement.clientWidth, - height: _Browser_doc.documentElement.clientHeight + at: _Browser_getScene(), + aw: { + ay: x, + az: y, + ax: _Browser_doc.documentElement.clientWidth, + af: _Browser_doc.documentElement.clientHeight }, - element: { - x: x + rect.left, - y: y + rect.top, - width: rect.width, - height: rect.height + aF: { + ay: x + rect.left, + az: y + rect.top, + ax: rect.width, + af: rect.height } }; }); @@ -4392,7 +4392,7 @@ var tail = _v0.d; var helper = F2( function (node, acc) { - if (node.$ === 'SubTree') { + if (!node.$) { var subTree = node.a; return A3($elm$core$Elm$JsArray$foldr, helper, acc, subTree); } else { @@ -4413,7 +4413,7 @@ function (func, acc, t) { foldr: while (true) { - if (t.$ === 'RBEmpty_elm_builtin') { + if (t.$ === -2) { return acc; } else { var key = t.b; @@ -4458,54 +4458,54 @@ dict); }; var $elm$core$Set$toList = function (_v0) { - var dict = _v0.a; + var dict = _v0; return $elm$core$Dict$keys(dict); }; -var $elm$core$Basics$EQ = {$: 'EQ'}; -var $elm$core$Basics$GT = {$: 'GT'}; -var $elm$core$Basics$LT = {$: 'LT'}; +var $elm$core$Basics$EQ = 1; +var $elm$core$Basics$GT = 2; +var $elm$core$Basics$LT = 0; var $author$project$Main$init = { - amounts: _List_fromArray( + h: _List_fromArray( [ - {id: 1, name: '', personId: 0, quantity: 1, unitPrice: 0.0}, - {id: 2, name: '', personId: 0, quantity: 1, unitPrice: 0.0}, - {id: 3, name: '', personId: 0, quantity: 1, unitPrice: 0.0} + {a: 1, f: '', o: 0, j: 1, t: 0.0}, + {a: 2, f: '', o: 0, j: 1, t: 0.0}, + {a: 3, f: '', o: 0, j: 1, t: 0.0} ]), - nextAmountId: 4, - nextPersonId: 3, - people: _List_fromArray( + I: 4, + J: 3, + m: _List_fromArray( [ - {id: 1, name: ''}, - {id: 2, name: ''} + {a: 1, f: ''}, + {a: 2, f: ''} ]) }; var $elm$core$Result$Err = function (a) { - return {$: 'Err', a: a}; + return {$: 1, a: a}; }; var $elm$json$Json$Decode$Failure = F2( function (a, b) { - return {$: 'Failure', a: a, b: b}; + return {$: 3, a: a, b: b}; }); var $elm$json$Json$Decode$Field = F2( function (a, b) { - return {$: 'Field', a: a, b: b}; + return {$: 0, a: a, b: b}; }); var $elm$json$Json$Decode$Index = F2( function (a, b) { - return {$: 'Index', a: a, b: b}; + return {$: 1, a: a, b: b}; }); var $elm$core$Result$Ok = function (a) { - return {$: 'Ok', a: a}; + return {$: 0, a: a}; }; var $elm$json$Json$Decode$OneOf = function (a) { - return {$: 'OneOf', a: a}; + return {$: 2, a: a}; }; -var $elm$core$Basics$False = {$: 'False'}; +var $elm$core$Basics$False = 1; var $elm$core$Basics$add = _Basics_add; var $elm$core$Maybe$Just = function (a) { - return {$: 'Just', a: a}; + return {$: 0, a: a}; }; -var $elm$core$Maybe$Nothing = {$: 'Nothing'}; +var $elm$core$Maybe$Nothing = {$: 1}; var $elm$core$String$all = _String_all; var $elm$core$Basics$and = _Basics_and; var $elm$core$Basics$append = _Utils_append; @@ -4630,12 +4630,12 @@ errorToStringHelp: while (true) { switch (error.$) { - case 'Field': + case 0: var f = error.a; var err = error.b; var isSimple = function () { var _v1 = $elm$core$String$uncons(f); - if (_v1.$ === 'Nothing') { + if (_v1.$ === 1) { return false; } else { var _v2 = _v1.a; @@ -4650,7 +4650,7 @@ error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 'Index': + case 1: var i = error.a; var err = error.b; var indexName = '[' + ($elm$core$String$fromInt(i) + ']'); @@ -4659,7 +4659,7 @@ error = $temp$error; context = $temp$context; continue errorToStringHelp; - case 'OneOf': + case 2: var errors = error.a; if (!errors.b) { return 'Ran into a Json.Decode.oneOf with no possibilities' + function () { @@ -4723,7 +4723,7 @@ var $elm$core$Array$branchFactor = 32; var $elm$core$Array$Array_elm_builtin = F4( function (a, b, c, d) { - return {$: 'Array_elm_builtin', a: a, b: b, c: c, d: d}; + return {$: 0, a: a, b: b, c: c, d: d}; }); var $elm$core$Elm$JsArray$empty = _JsArray_empty; var $elm$core$Basics$ceiling = _Basics_ceiling; @@ -4738,7 +4738,7 @@ var $elm$core$Array$empty = A4($elm$core$Array$Array_elm_builtin, 0, $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, $elm$core$Elm$JsArray$empty); var $elm$core$Elm$JsArray$initialize = _JsArray_initialize; var $elm$core$Array$Leaf = function (a) { - return {$: 'Leaf', a: a}; + return {$: 1, a: a}; }; var $elm$core$Basics$apL = F2( function (f, x) { @@ -4758,7 +4758,7 @@ }); var $elm$core$Basics$mul = _Basics_mul; var $elm$core$Array$SubTree = function (a) { - return {$: 'SubTree', a: a}; + return {$: 0, a: a}; }; var $elm$core$Elm$JsArray$initializeFromList = _JsArray_initializeFromList; var $elm$core$Array$compressNodes = F2( @@ -4805,25 +4805,25 @@ }); var $elm$core$Array$builderToArray = F2( function (reverseNodeList, builder) { - if (!builder.nodeListSize) { + if (!builder.b) { return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.tail), + $elm$core$Elm$JsArray$length(builder.d), $elm$core$Array$shiftStep, $elm$core$Elm$JsArray$empty, - builder.tail); + builder.d); } else { - var treeLen = builder.nodeListSize * $elm$core$Array$branchFactor; + var treeLen = builder.b * $elm$core$Array$branchFactor; var depth = $elm$core$Basics$floor( A2($elm$core$Basics$logBase, $elm$core$Array$branchFactor, treeLen - 1)); - var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.nodeList) : builder.nodeList; - var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.nodeListSize); + var correctNodeList = reverseNodeList ? $elm$core$List$reverse(builder.e) : builder.e; + var tree = A2($elm$core$Array$treeFromBuilder, correctNodeList, builder.b); return A4( $elm$core$Array$Array_elm_builtin, - $elm$core$Elm$JsArray$length(builder.tail) + treeLen, + $elm$core$Elm$JsArray$length(builder.d) + treeLen, A2($elm$core$Basics$max, 5, depth * $elm$core$Array$shiftStep), tree, - builder.tail); + builder.d); } }); var $elm$core$Basics$idiv = _Basics_idiv; @@ -4836,7 +4836,7 @@ return A2( $elm$core$Array$builderToArray, false, - {nodeList: nodeList, nodeListSize: (len / $elm$core$Array$branchFactor) | 0, tail: tail}); + {e: nodeList, b: (len / $elm$core$Array$branchFactor) | 0, d: tail}); } else { var leaf = $elm$core$Array$Leaf( A3($elm$core$Elm$JsArray$initialize, $elm$core$Array$branchFactor, fromIndex, fn)); @@ -4866,9 +4866,9 @@ return A5($elm$core$Array$initializeHelp, fn, initialFromIndex, len, _List_Nil, tail); } }); -var $elm$core$Basics$True = {$: 'True'}; +var $elm$core$Basics$True = 0; var $elm$core$Result$isOk = function (result) { - if (result.$ === 'Ok') { + if (!result.$) { return true; } else { return false; @@ -4879,33 +4879,31 @@ var $elm$json$Json$Decode$succeed = _Json_succeed; var $elm$virtual_dom$VirtualDom$toHandlerInt = function (handler) { switch (handler.$) { - case 'Normal': + case 0: return 0; - case 'MayStopPropagation': + case 1: return 1; - case 'MayPreventDefault': + case 2: return 2; default: return 3; } }; var $elm$browser$Browser$External = function (a) { - return {$: 'External', a: a}; + return {$: 1, a: a}; }; var $elm$browser$Browser$Internal = function (a) { - return {$: 'Internal', a: a}; + return {$: 0, a: a}; }; var $elm$core$Basics$identity = function (x) { return x; }; -var $elm$browser$Browser$Dom$NotFound = function (a) { - return {$: 'NotFound', a: a}; -}; -var $elm$url$Url$Http = {$: 'Http'}; -var $elm$url$Url$Https = {$: 'Https'}; +var $elm$browser$Browser$Dom$NotFound = $elm$core$Basics$identity; +var $elm$url$Url$Http = 0; +var $elm$url$Url$Https = 1; var $elm$url$Url$Url = F6( function (protocol, host, port_, path, query, fragment) { - return {fragment: fragment, host: host, path: path, port_: port_, protocol: protocol, query: query}; + return {ae: fragment, ag: host, ak: path, am: port_, ap: protocol, aq: query}; }); var $elm$core$String$contains = _String_contains; var $elm$core$String$length = _String_length; @@ -4941,7 +4939,7 @@ var i = _v0.a; var _v1 = $elm$core$String$toInt( A2($elm$core$String$dropLeft, i + 1, str)); - if (_v1.$ === 'Nothing') { + if (_v1.$ === 1) { return $elm$core$Maybe$Nothing; } else { var port_ = _v1; @@ -5024,26 +5022,24 @@ var $elm$url$Url$fromString = function (str) { return A2($elm$core$String$startsWith, 'http://', str) ? A2( $elm$url$Url$chompAfterProtocol, - $elm$url$Url$Http, + 0, A2($elm$core$String$dropLeft, 7, str)) : (A2($elm$core$String$startsWith, 'https://', str) ? A2( $elm$url$Url$chompAfterProtocol, - $elm$url$Url$Https, + 1, A2($elm$core$String$dropLeft, 8, str)) : $elm$core$Maybe$Nothing); }; var $elm$core$Basics$never = function (_v0) { never: while (true) { - var nvr = _v0.a; + var nvr = _v0; var $temp$_v0 = nvr; _v0 = $temp$_v0; continue never; } }; -var $elm$core$Task$Perform = function (a) { - return {$: 'Perform', a: a}; -}; +var $elm$core$Task$Perform = $elm$core$Basics$identity; var $elm$core$Task$succeed = _Scheduler_succeed; -var $elm$core$Task$init = $elm$core$Task$succeed(_Utils_Tuple0); +var $elm$core$Task$init = $elm$core$Task$succeed(0); var $elm$core$List$foldrHelper = F4( function (fn, acc, ctr, ls) { if (!ls.b) { @@ -5149,7 +5145,7 @@ var $elm$core$Platform$sendToApp = _Platform_sendToApp; var $elm$core$Task$spawnCmd = F2( function (router, _v0) { - var task = _v0.a; + var task = _v0; return _Scheduler_spawn( A2( $elm$core$Task$andThen, @@ -5161,7 +5157,7 @@ return A2( $elm$core$Task$map, function (_v0) { - return _Utils_Tuple0; + return 0; }, $elm$core$Task$sequence( A2( @@ -5171,21 +5167,19 @@ }); var $elm$core$Task$onSelfMsg = F3( function (_v0, _v1, _v2) { - return $elm$core$Task$succeed(_Utils_Tuple0); + return $elm$core$Task$succeed(0); }); var $elm$core$Task$cmdMap = F2( function (tagger, _v0) { - var task = _v0.a; - return $elm$core$Task$Perform( - A2($elm$core$Task$map, tagger, task)); + var task = _v0; + return A2($elm$core$Task$map, tagger, task); }); _Platform_effectManagers['Task'] = _Platform_createManager($elm$core$Task$init, $elm$core$Task$onEffects, $elm$core$Task$onSelfMsg, $elm$core$Task$cmdMap); var $elm$core$Task$command = _Platform_leaf('Task'); var $elm$core$Task$perform = F2( function (toMessage, task) { return $elm$core$Task$command( - $elm$core$Task$Perform( - A2($elm$core$Task$map, toMessage, task))); + A2($elm$core$Task$map, toMessage, task)); }); var $elm$core$Platform$Cmd$batch = _Platform_batch; var $elm$core$Platform$Cmd$none = $elm$core$Platform$Cmd$batch(_List_Nil); @@ -5194,19 +5188,19 @@ var $elm$browser$Browser$sandbox = function (impl) { return _Browser_element( { - init: function (_v0) { - return _Utils_Tuple2(impl.init, $elm$core$Platform$Cmd$none); + aJ: function (_v0) { + return _Utils_Tuple2(impl.aJ, $elm$core$Platform$Cmd$none); }, - subscriptions: function (_v1) { + aO: function (_v1) { return $elm$core$Platform$Sub$none; }, - update: F2( + aQ: F2( function (msg, model) { return _Utils_Tuple2( - A2(impl.update, msg, model), + A2(impl.aQ, msg, model), $elm$core$Platform$Cmd$none); }), - view: impl.view + aR: impl.aR }); }; var $elm$core$List$append = F2( @@ -5232,86 +5226,86 @@ var $author$project$Main$update = F2( function (msg, model) { switch (msg.$) { - case 'AddPerson': - var nextPersonId = model.nextPersonId + 1; - var currentPersonId = model.nextPersonId; - var adding = {id: currentPersonId, name: ''}; + case 0: + var nextPersonId = model.J + 1; + var currentPersonId = model.J; + var adding = {a: currentPersonId, f: ''}; var updatedPeople = A2( $elm$core$List$append, - model.people, + model.m, _List_fromArray( [adding])); return _Utils_update( model, - {nextPersonId: nextPersonId, people: updatedPeople}); - case 'UpdatePerson': + {J: nextPersonId, m: updatedPeople}); + case 1: var updatingPerson = msg.a; var updatedPeople = A2( $elm$core$List$map, function (existing) { - return _Utils_eq(existing.id, updatingPerson.id) ? updatingPerson : existing; + return _Utils_eq(existing.a, updatingPerson.a) ? updatingPerson : existing; }, - model.people); + model.m); return _Utils_update( model, - {people: updatedPeople}); - case 'RemovePerson': + {m: updatedPeople}); + case 2: var removingPersonId = msg.a; var updatedPeople = A2( $elm$core$List$filter, function (person) { - return !_Utils_eq(person.id, removingPersonId); + return !_Utils_eq(person.a, removingPersonId); }, - model.people); + model.m); var updatedAmounts = A2( $elm$core$List$map, function (amount) { - return _Utils_eq(amount.personId, removingPersonId) ? _Utils_update( + return _Utils_eq(amount.o, removingPersonId) ? _Utils_update( amount, - {personId: 0}) : amount; + {o: 0}) : amount; }, - model.amounts); + model.h); return _Utils_update( model, - {amounts: updatedAmounts, people: updatedPeople}); - case 'AddAmount': - var nextAmountId = model.nextAmountId + 1; - var currentAmountId = model.nextAmountId; - var adding = {id: currentAmountId, name: '', personId: 0, quantity: 1, unitPrice: 0}; + {h: updatedAmounts, m: updatedPeople}); + case 3: + var nextAmountId = model.I + 1; + var currentAmountId = model.I; + var adding = {a: currentAmountId, f: '', o: 0, j: 1, t: 0}; var updatedAmounts = A2( $elm$core$List$append, - model.amounts, + model.h, _List_fromArray( [adding])); return _Utils_update( model, - {amounts: updatedAmounts, nextAmountId: nextAmountId}); - case 'UpdateAmount': + {h: updatedAmounts, I: nextAmountId}); + case 4: var updatingAmount = msg.a; var updatedAmounts = A2( $elm$core$List$map, function (existing) { - return _Utils_eq(existing.id, updatingAmount.id) ? updatingAmount : existing; + return _Utils_eq(existing.a, updatingAmount.a) ? updatingAmount : existing; }, - model.amounts); + model.h); return _Utils_update( model, - {amounts: updatedAmounts}); + {h: updatedAmounts}); default: var removingId = msg.a; var updatedAmounts = A2( $elm$core$List$filter, function (existing) { - return !_Utils_eq(existing.id, removingId); + return !_Utils_eq(existing.a, removingId); }, - model.amounts); + model.h); return _Utils_update( model, - {amounts: updatedAmounts}); + {h: updatedAmounts}); } }); -var $author$project$Main$AddAmount = {$: 'AddAmount'}; -var $author$project$Main$AddPerson = {$: 'AddPerson'}; +var $author$project$Main$AddAmount = {$: 3}; +var $author$project$Main$AddPerson = {$: 0}; var $elm$html$Html$a = _VirtualDom_node('a'); var $elm$html$Html$button = _VirtualDom_node('button'); var $elm$html$Html$div = _VirtualDom_node('div'); @@ -5336,7 +5330,7 @@ var $elm$html$Html$Attributes$id = $elm$html$Html$Attributes$stringProperty('id'); var $elm$html$Html$main_ = _VirtualDom_node('main'); var $elm$virtual_dom$VirtualDom$Normal = function (a) { - return {$: 'Normal', a: a}; + return {$: 0, a: a}; }; var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; var $elm$html$Html$Events$on = F2( @@ -5361,10 +5355,10 @@ var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text; var $elm$html$Html$Attributes$title = $elm$html$Html$Attributes$stringProperty('title'); var $author$project$Main$RemoveAmount = function (a) { - return {$: 'RemoveAmount', a: a}; + return {$: 5, a: a}; }; var $author$project$Main$UpdateAmount = function (a) { - return {$: 'UpdateAmount', a: a}; + return {$: 4, a: a}; }; var $elm$html$Html$Attributes$for = $elm$html$Html$Attributes$stringProperty('htmlFor'); var $elm$core$String$fromFloat = _String_fromNumber; @@ -5382,7 +5376,7 @@ return _Utils_Tuple2(x, true); }; var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) { - return {$: 'MayStopPropagation', a: a}; + return {$: 1, a: a}; }; var $elm$html$Html$Events$stopPropagationOn = F2( function (event, decoder) { @@ -5413,10 +5407,10 @@ }; var $elm$html$Html$option = _VirtualDom_node('option'); var $author$project$Main$personNamePlaceholder = function (person) { - return 'Person ' + $elm$core$String$fromInt(person.id); + return 'Person ' + $elm$core$String$fromInt(person.a); }; var $author$project$Main$personNameWithDefault = function (person) { - return $elm$core$String$isEmpty(person.name) ? $author$project$Main$personNamePlaceholder(person) : person.name; + return $elm$core$String$isEmpty(person.f) ? $author$project$Main$personNamePlaceholder(person) : person.f; }; var $elm$html$Html$Attributes$placeholder = $elm$html$Html$Attributes$stringProperty('placeholder'); var $elm$html$Html$select = _VirtualDom_node('select'); @@ -5428,7 +5422,7 @@ var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value'); var $elm$core$Maybe$withDefault = F2( function (_default, maybe) { - if (maybe.$ === 'Just') { + if (!maybe.$) { var value = maybe.a; return value; } else { @@ -5437,23 +5431,23 @@ }); var $author$project$Main$viewAmountItem = F2( function (model, amount) { - var selectedPersonOption = $elm$core$String$fromInt(amount.personId); - var removeThisAmount = $author$project$Main$RemoveAmount(amount.id); + var selectedPersonOption = $elm$core$String$fromInt(amount.o); + var removeThisAmount = $author$project$Main$RemoveAmount(amount.a); var nonEmptyPeopleOptions = A2( $elm$core$List$map, function (person) { return { - text: $author$project$Main$personNameWithDefault(person), - value: $elm$core$String$fromInt(person.id) + Y: $author$project$Main$personNameWithDefault(person), + Z: $elm$core$String$fromInt(person.a) }; }, - model.people); + model.m); var handleUnitPriceInput = function (unitPriceStr) { return function (unitPrice) { return $author$project$Main$UpdateAmount( _Utils_update( amount, - {unitPrice: unitPrice})); + {t: unitPrice})); }( A2( $elm$core$Maybe$withDefault, @@ -5466,7 +5460,7 @@ _Utils_update( amount, { - quantity: $elm$core$Basics$floor(quantity) + j: $elm$core$Basics$floor(quantity) })); }( A2( @@ -5479,7 +5473,7 @@ return $author$project$Main$UpdateAmount( _Utils_update( amount, - {personId: personId})); + {o: personId})); }( A2( $elm$core$Maybe$withDefault, @@ -5490,9 +5484,9 @@ return $author$project$Main$UpdateAmount( _Utils_update( amount, - {name: name})); + {f: name})); }; - var emptyPersonOption = {text: 'Everyone', value: '0'}; + var emptyPersonOption = {Y: 'Everyone', Z: '0'}; var peopleOptions = A2($elm$core$List$cons, emptyPersonOption, nonEmptyPeopleOptions); return A2( $elm$html$Html$div, @@ -5508,10 +5502,10 @@ _List_fromArray( [ $elm$html$Html$Attributes$id( - 'amount_quantity_input_' + $elm$core$String$fromInt(amount.id)), + 'amount_quantity_input_' + $elm$core$String$fromInt(amount.a)), $elm$html$Html$Attributes$type_('number'), $elm$html$Html$Attributes$value( - $elm$core$String$fromInt(amount.quantity)), + $elm$core$String$fromInt(amount.j)), $elm$html$Html$Events$onInput(handleQuantityInput), $elm$html$Html$Attributes$step('1'), $elm$html$Html$Attributes$min('0'), @@ -5524,7 +5518,7 @@ _List_fromArray( [ $elm$html$Html$Attributes$for( - 'amount_quantity_input_' + $elm$core$String$fromInt(amount.id)), + 'amount_quantity_input_' + $elm$core$String$fromInt(amount.a)), A2($elm$html$Html$Attributes$style, 'margin-right', '8px') ]), _List_fromArray( @@ -5536,12 +5530,12 @@ _List_fromArray( [ $elm$html$Html$Attributes$id( - 'amount_name_input_' + $elm$core$String$fromInt(amount.id)), + 'amount_name_input_' + $elm$core$String$fromInt(amount.a)), $elm$html$Html$Attributes$type_('text'), - $elm$html$Html$Attributes$value(amount.name), + $elm$html$Html$Attributes$value(amount.f), $elm$html$Html$Events$onInput(handleNameInput), $elm$html$Html$Attributes$placeholder( - 'Item ' + $elm$core$String$fromInt(amount.id)), + 'Item ' + $elm$core$String$fromInt(amount.a)), $elm$html$Html$Attributes$maxlength(16), A2($elm$html$Html$Attributes$style, 'margin-right', '8px'), A2($elm$html$Html$Attributes$style, 'flex-grow', '1') @@ -5552,7 +5546,7 @@ _List_fromArray( [ $elm$html$Html$Attributes$for( - 'amount_unit_price_input_' + $elm$core$String$fromInt(amount.id)) + 'amount_unit_price_input_' + $elm$core$String$fromInt(amount.a)) ]), _List_fromArray( [ @@ -5563,10 +5557,10 @@ _List_fromArray( [ $elm$html$Html$Attributes$id( - 'amount_unit_price_input_' + $elm$core$String$fromInt(amount.id)), + 'amount_unit_price_input_' + $elm$core$String$fromInt(amount.a)), $elm$html$Html$Attributes$type_('number'), $elm$html$Html$Attributes$value( - $elm$core$String$fromFloat(amount.unitPrice)), + $elm$core$String$fromFloat(amount.t)), $elm$html$Html$Events$onInput(handleUnitPriceInput), $elm$html$Html$Attributes$placeholder('0.00'), $elm$html$Html$Attributes$step('0.01'), @@ -5581,7 +5575,7 @@ _List_fromArray( [ $elm$html$Html$Attributes$id( - 'amount_person_input_' + $elm$core$String$fromInt(amount.id)), + 'amount_person_input_' + $elm$core$String$fromInt(amount.a)), $elm$html$Html$Attributes$value(selectedPersonOption), $elm$html$Html$Events$onInput(handlePersonInput), A2($elm$html$Html$Attributes$style, 'width', '90px'), @@ -5589,7 +5583,7 @@ A2( $elm$html$Html$Attributes$style, 'font-style', - (!amount.personId) ? 'italic' : 'normal') + (!amount.o) ? 'italic' : 'normal') ]), A2( $elm$core$List$map, @@ -5598,11 +5592,11 @@ $elm$html$Html$option, _List_fromArray( [ - $elm$html$Html$Attributes$value(person.value) + $elm$html$Html$Attributes$value(person.Z) ]), _List_fromArray( [ - $elm$html$Html$text(person.text) + $elm$html$Html$text(person.Y) ])); }, peopleOptions)), @@ -5621,18 +5615,18 @@ ])); }); var $author$project$Main$RemovePerson = function (a) { - return {$: 'RemovePerson', a: a}; + return {$: 2, a: a}; }; var $author$project$Main$UpdatePerson = function (a) { - return {$: 'UpdatePerson', a: a}; + return {$: 1, a: a}; }; var $author$project$Main$viewPersonItem = function (person) { - var removeThisPerson = $author$project$Main$RemovePerson(person.id); + var removeThisPerson = $author$project$Main$RemovePerson(person.a); var handleNameInput = function (name) { return $author$project$Main$UpdatePerson( _Utils_update( person, - {name: name})); + {f: name})); }; return A2( $elm$html$Html$div, @@ -5648,9 +5642,9 @@ _List_fromArray( [ $elm$html$Html$Attributes$id( - 'person_name_input_' + $elm$core$String$fromInt(person.id)), + 'person_name_input_' + $elm$core$String$fromInt(person.a)), $elm$html$Html$Attributes$type_('text'), - $elm$html$Html$Attributes$value(person.name), + $elm$html$Html$Attributes$value(person.f), $elm$html$Html$Events$onInput(handleNameInput), $elm$html$Html$Attributes$placeholder( $author$project$Main$personNamePlaceholder(person)), @@ -5701,73 +5695,73 @@ A2( $elm$core$List$map, function (amount) { - return amount.quantity * amount.priceInCents; + return amount.j * amount.P; }, A2( $elm$core$List$map, function (amount) { return { - priceInCents: $author$project$Main$priceToCents(amount.unitPrice), - quantity: amount.quantity + P: $author$project$Main$priceToCents(amount.t), + j: amount.j }; }, - model.amounts)))); + model.h)))); var personTotalInCents = function (personId) { return $elm$core$List$sum( A2( $elm$core$List$map, function (amount) { - return amount.quantity * amount.priceInCents; + return amount.j * amount.P; }, A2( $elm$core$List$map, function (amount) { return { - priceInCents: $author$project$Main$priceToCents(amount.unitPrice), - quantity: amount.quantity + P: $author$project$Main$priceToCents(amount.t), + j: amount.j }; }, A2( $elm$core$List$filter, function (amount) { - return _Utils_eq(amount.personId, personId); + return _Utils_eq(amount.o, personId); }, - model.amounts)))); + model.h)))); }; - var peopleQtt = $elm$core$List$length(model.people); + var peopleQtt = $elm$core$List$length(model.m); var peopleCalcsForItems = A2( $elm$core$List$map, function (calcs) { return { - id: calcs.id, - nameWithDefault: calcs.nameWithDefault, - subtotalInCents: calcs.subtotalInCents, - subtotalWithCurrency: $author$project$Main$centsToPriceWithCurrency(calcs.subtotalInCents) + a: calcs.a, + s: calcs.s, + B: calcs.B, + X: $author$project$Main$centsToPriceWithCurrency(calcs.B) }; }, A2( $elm$core$List$filter, function (calcs) { - return (!(!calcs.id)) || ((!calcs.id) && (calcs.subtotalInCents > 0)); + return (!(!calcs.a)) || ((!calcs.a) && (calcs.B > 0)); }, A2( $elm$core$List$map, function (person) { return { - id: person.id, - nameWithDefault: $author$project$Main$personNameWithDefault(person), - subtotalInCents: personTotalInCents(person.id) + a: person.a, + s: $author$project$Main$personNameWithDefault(person), + B: personTotalInCents(person.a) }; }, A2( $elm$core$List$cons, - {id: 0, name: ''}, - model.people)))); + {a: 0, f: ''}, + model.m)))); var subtotalInCents = $elm$core$List$sum( A2( $elm$core$List$map, function (calcs) { - return calcs.subtotalInCents; + return calcs.B; }, peopleCalcsForItems)); var totalTipInCents = subtotalInCents * 0.1; @@ -5777,19 +5771,19 @@ $elm$core$List$map, function (calcs) { return { - id: calcs.id, - nameWithDefault: calcs.nameWithDefault, - percentual: $author$project$Main$fakeIntToDecimalStrOfTwoPlaces(calcs.percentualInt), - percentualInt: calcs.percentualInt + a: calcs.a, + s: calcs.s, + S: $author$project$Main$fakeIntToDecimalStrOfTwoPlaces(calcs.O), + O: calcs.O }; }, A2( $elm$core$List$map, function (calcs) { return { - id: calcs.id, - nameWithDefault: calcs.nameWithDefault, - percentualInt: $elm$core$Basics$floor(((calcs.subtotalInCents + eachTipInCents) * 10000) / totalInCents) + a: calcs.a, + s: calcs.s, + O: $elm$core$Basics$floor(((calcs.B + eachTipInCents) * 10000) / totalInCents) }; }, peopleCalcsForItems)); @@ -5820,7 +5814,7 @@ A2( $elm$core$List$map, function (result) { - return (!result.id) ? A2( + return (!result.a) ? A2( $elm$html$Html$li, _List_Nil, _List_fromArray( @@ -5837,14 +5831,14 @@ _List_Nil, _List_fromArray( [ - $elm$html$Html$text(result.subtotalWithCurrency) + $elm$html$Html$text(result.X) ])) ])) : A2( $elm$html$Html$li, _List_Nil, _List_fromArray( [ - $elm$html$Html$text(result.nameWithDefault + (': ' + result.subtotalWithCurrency)) + $elm$html$Html$text(result.s + (': ' + result.X)) ])); }, peopleCalcsForItems)) @@ -5915,7 +5909,7 @@ A2( $elm$core$List$map, function (result) { - return (!result.id) ? A2( + return (!result.a) ? A2( $elm$html$Html$li, _List_Nil, _List_fromArray( @@ -5932,14 +5926,14 @@ _List_Nil, _List_fromArray( [ - $elm$html$Html$text(result.percentual + '%') + $elm$html$Html$text(result.S + '%') ])) ])) : A2( $elm$html$Html$li, _List_Nil, _List_fromArray( [ - $elm$html$Html$text(result.nameWithDefault + (': ' + (result.percentual + '%'))) + $elm$html$Html$text(result.s + (': ' + (result.S + '%'))) ])); }, sharingsInPercentage)) @@ -6014,7 +6008,7 @@ A2( $elm$html$Html$div, _List_Nil, - A2($elm$core$List$map, $author$project$Main$viewPersonItem, model.people)), + A2($elm$core$List$map, $author$project$Main$viewPersonItem, model.m)), A2( $elm$html$Html$button, _List_fromArray( @@ -6098,7 +6092,7 @@ function (amount) { return A2($author$project$Main$viewAmountItem, model, amount); }, - model.amounts)), + model.h)), A2( $elm$html$Html$button, _List_fromArray( @@ -6223,9 +6217,9 @@ ])); }; var $author$project$Main$main = $elm$browser$Browser$sandbox( - {init: $author$project$Main$init, update: $author$project$Main$update, view: $author$project$Main$view}); + {aJ: $author$project$Main$init, aQ: $author$project$Main$update, aR: $author$project$Main$view}); _Platform_export({'Main':{'init':$author$project$Main$main( - $elm$json$Json$Decode$succeed(_Utils_Tuple0))(0)}});}(this)); + $elm$json$Json$Decode$succeed(0))(0)}});}(this)); var app = Elm.Main.init({ node: document.getElementById("elm") }); }