Initial import
BIN
libs/fonts-icon-adhi/icomoon.eot
Normal file
27
libs/fonts-icon-adhi/icomoon.svg
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="check" d="M954.857 636.571q0-22.857-16-38.857l-491.429-491.429q-16-16-38.857-16t-38.857 16l-284.571 284.571q-16 16-16 38.857t16 38.857l77.714 77.714q16 16 38.857 16t38.857-16l168-168.571 374.857 375.429q16 16 38.857 16t38.857-16l77.714-77.714q16-16 16-38.857z" />
|
||||
<glyph unicode="" glyph-name="note" d="M204 958.2c-9-2.8-18-8.2-40.6-24.6-30-21.8-36.8-28.4-43.6-42.6-4.8-10-5.8-14.6-5.8-27.2 0-8.4 1.4-19 3-23.6 2.6-7.6 18.2-32.2 20.4-32.2s147.2 107.2 148 109.4c1.4 3.4-16.4 25.4-25.2 31.2-15.2 10-40.4 14.4-56.2 9.6zM278.2 899c-8-5.8-15.6-11.6-16.6-12.6-1.4-1.4 13.6-23.2 42.6-62.6 27.8-37.8 44.6-62.6 44.8-65.6 0-6.8-13.4-17.6-18.8-15-3.2 1.4-85 110.4-92 122.6-1.2 2-5.4-0.2-17.8-9-9-6.6-16-13-15.8-14.4 0.2-1.2 20.4-29.8 45-63.2 24.4-33.4 44.4-62.2 44.4-63.8 0-4.2-15.2-15.8-19.4-15-2 0.4-23.2 27.8-47.6 61-24.2 33.2-45 61.4-46 62.4-1.6 1.6-7.4-1.6-19.6-10.4-9.6-6.8-17.4-12.8-17.2-13.4 0-0.6 22.6-32 50.4-69.8l50.6-69 72.8-26.6c40-14.6 73.8-26.6 75.4-26.6 1.4 0 3.8 2 5.4 4.6 2.4 3.8 2.2 15-0.8 80.6-2.4 51.8-4.2 77.6-6 80.8-2.2 4-94.2 130.6-97.6 134.4-0.8 0.8-8-3.4-16.2-9.4zM382 742c3.4-3.4 4-6.6 4-19.4 0-8.6 0.6-26.8 1.2-40.6l1.2-25-16.4-11.6-16.2-11.6-36.4 12.4c-36.6 12.4-46 17.6-45 24.2 0.6 3.6 96.6 75.4 101.2 75.6 1.2 0 4.2-1.8 6.4-4zM358 872.6c0-0.6 17-24 38-51.8l37.8-50.6 154.6-0.6c154.4-0.6 154.6-0.6 166.4-5.2 32.8-12.4 54.6-35.2 64.6-67.4 3.4-11.4 3.6-26 3.6-295v-283l-4.4-14c-2.4-7.6-7.2-18.4-10.6-23.6-14.6-23-42-41.2-68-45.4-8.2-1.2-91.6-2-225-2-233.4 0-227.8-0.2-251.6 12.4-26 13.8-46.8 42.8-51.4 71.6-1.2 8.2-2 108.8-2 277.6v264.6l-39.4 52c-29.4 39-39.8 51.4-41 49-1-1.6-1.4-165.2-1.2-363.6l0.6-360.6 5.4-14.6c14.4-39.6 44.4-68.8 82.6-81l14-4.4h289c277.2 0 289.4 0.2 300 3.8 44.2 15 76.6 48.6 87 90.4 2.6 10.6 3 56.6 2.6 378l-0.6 365.8-4.6 13c-11.4 31.2-34.8 58-63 72-29.4 14.4-19 14-263.8 14-120.8 0-219.6-0.6-219.6-1.4zM441.6 662.2c-5.8-5.2-6.6-7-6.6-16.2s0.8-11 6.6-16.2l6.4-5.8h144c107.2 0 145.2 0.6 149 2.4 14.4 6.6 14.4 32.6 0 39.2-3.8 1.8-41.8 2.4-149 2.4h-144l-6.4-5.8zM294.8 542.4c-5.8-4.6-8.8-10.8-8.8-18.4s3-13.8 8.8-18.4c4-3.2 18.6-3.6 222.8-3.6 237.6 0 226.8-0.6 232 11 5.2 11.4 1.6 25.2-7.8 30.2-4.8 2.4-38.8 2.8-224.2 2.8-204.2 0-218.8-0.4-222.8-3.6zM294.8 420.4c-5.8-4.6-8.8-10.8-8.8-18.4s3-13.8 8.8-18.4c4-3.2 18.6-3.6 222.8-3.6 237.6 0 226.8-0.6 232 11 5.2 11.4 1.6 25.2-7.8 30.2-4.8 2.4-38.8 2.8-224.2 2.8-204.2 0-218.8-0.4-222.8-3.6zM296.2 299.2c-13-7.2-13.2-32.2-0.4-39.2 2.6-1.4 76.6-2 223.6-2 205 0 219.8 0.4 223.8 3.6 6 4.8 8.8 11 8.8 19.4 0 5.8-1.6 9-6.8 14.2l-6.8 6.8h-218.6c-177.8-0.2-219.6-0.6-223.6-2.8zM296.2 177.2c-13-7.2-13.2-32.2-0.4-39.2 2.6-1.4 76.6-2 223.6-2 205 0 219.8 0.4 223.8 3.6 6 4.8 8.8 11 8.8 19.4 0 5.8-1.6 9-6.8 14.2l-6.8 6.8h-218.6c-177.8-0.2-219.6-0.6-223.6-2.8z" />
|
||||
<glyph unicode="" glyph-name="speaker" d="M630.432 630.432c-11.488 8.8-27.968 6.528-36.672-4.992-8.832-11.552-6.56-27.968 4.928-36.704 34.944-26.304 61.728-80.704 61.536-144.48 0.256-70.976-33.024-129.952-73.376-152.288-12.64-7.104-17.056-23.168-9.952-35.776 4.832-8.48 13.728-13.248 22.848-13.248 4.384 0 8.832 1.088 12.928 3.36 61.504 35.424 99.744 111.52 100 197.92-0.16 77.888-31.328 147.040-82.24 186.208zM822.496 872.864c-11.52 8.768-27.936 6.56-36.736-4.928-8.768-11.52-6.592-27.968 5.024-36.736h-0.064c96.096-72.864 164.128-215.264 163.968-379.936 0.192-183.104-84-338.4-196.96-401.792-12.672-7.104-17.088-23.136-9.952-35.712 4.832-8.576 13.76-13.248 22.912-13.248 4.352 0 8.8 1.024 12.896 3.296 134.016 76.544 223.264 248.896 223.52 447.456-0.192 178.784-72.544 335.904-184.608 421.6zM858.144 447.36c-0.16 122.88-49.664 231.264-127.872 291.168-11.488 8.832-27.968 6.528-36.704-4.992-8.768-11.488-6.528-27.968 4.992-36.736v0.064c62.208-47.040 107.36-140.768 107.232-249.504 0.192-120.992-55.808-222.848-128.544-263.52-12.64-7.136-17.056-23.104-9.92-35.744 4.832-8.512 13.76-13.312 22.88-13.312 4.384 0 8.832 1.088 12.896 3.36 93.856 53.76 154.848 172.768 155.040 309.216zM-58.24 622.656v-390.016h236.992l337.408-281.184v960l-341.44-289.184-232.96 0.384z" />
|
||||
<glyph unicode="" glyph-name="edit" horiz-adv-x="960" d="M102.318 960h529.356c52.068 0 104.136-43.39 104.136-104.136v-138.847l-43.39-112.814v60.746h-633.492v-60.746h633.492l-60.746-138.847h-572.746v-60.746h546.712l-60.746-138.847h-485.966v-69.424h477.288l-17.356-234.305 199.593 208.271 17.356 34.712v-164.881c0-52.068-43.39-104.136-104.136-104.136h-529.356c-52.068 0-104.136 43.39-104.136 104.136v824.407c0 52.068 43.39 104.136 104.136 104.136zM536.216 14.102l17.356 234.305 260.339 607.458c60.746 17.356 112.814-8.678 147.525-60.746l-260.339-607.458-164.881-164.881zM779.199 725.695c43.39 0 78.102-17.356 112.814-52.068l52.068 112.814c-34.712 34.712-69.424 52.068-112.814 52.068l-52.068-112.814zM588.284 274.441c0 0 8.678 8.678 8.678 8.678 8.678 8.678 17.356 0 17.356-8.678v0l156.203 373.153c-8.678 0-17.356 0-26.034 0l-156.203-364.475zM631.674 265.763c8.678 0 17.356 0 26.034-8.678l156.203 373.153c-8.678 8.678-17.356 8.678-26.034 8.678l-156.203-373.153zM675.064 248.407c8.678 0 8.678 0 8.678 0s8.678 0 8.678-8.678c0 0 0-8.678 0-17.356l156.203 364.475c-8.678 8.678-17.356 17.356-26.034 17.356l-156.203-364.475zM562.25 109.559l34.712-17.356 86.78 86.78c8.678 26.034 8.678 34.712 8.678 43.39 0 0 0 0-8.678 8.678 0 0-8.678 0-8.678 0-8.678 0-17.356-17.356-26.034-26.034 8.678 17.356 8.678 34.712 0 43.39 0 0-8.678 8.678-8.678 8.678s-8.678 0-8.678 0-17.356-8.678-26.034-26.034c8.678 17.356 8.678 34.712 0 43.39 0 0 0 0-8.678 0 0 0-8.678 0-8.678 0-8.678-8.678-17.356-17.356-26.034-34.712l-8.678-121.492zM622.996 196.339h-34.712v-69.424h8.678l17.356 17.356 17.356 52.068z" />
|
||||
<glyph unicode="" glyph-name="add" d="M512 940.679c-289.391 0-512-222.609-512-512s222.609-512 512-512c289.391 0 512 222.609 512 512s-222.609 512-512 512zM912.696 428.679v0c0-44.522-44.522-89.043-89.043-89.043h-244.87v-244.87c0-44.522-44.522-89.043-89.043-89.043v0c-44.522 0-89.043 44.522-89.043 89.043v244.87h-244.87c-44.522 0-89.043 44.522-89.043 89.043v0c0 44.522 44.522 89.043 89.043 89.043h244.87v244.87c0 44.522 44.522 89.043 89.043 89.043v0c44.522 0 89.043-44.522 89.043-89.043v-244.87h244.87c44.522 0 89.043-44.522 89.043-89.043z" />
|
||||
<glyph unicode="" glyph-name="del" horiz-adv-x="816" d="M743.367 717.261h-707.491v-670.255c0-93.091 74.473-148.945 148.945-148.945h428.218c93.091 0 148.945 74.473 148.945 148.945v670.255zM54.495 866.206h316.509v37.236c0 18.618 18.618 37.236 37.236 37.236v0c18.618 0 37.236-18.618 37.236-37.236v-37.236h316.509c37.236 0 55.855-18.618 55.855-55.855v0c0-37.236-18.618-55.855-55.855-55.855h-707.491c-37.236 0-55.855 18.618-55.855 55.855v0c0 37.236 18.618 55.855 55.855 55.855zM203.44 605.552v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM333.767 605.552v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM482.713 605.552v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM613.040 605.552v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM687.513 661.406v-614.4c0-37.236-37.236-74.473-74.473-74.473h-428.218c-37.236 0-74.473 37.236-74.473 74.473v614.4h577.164z" />
|
||||
<glyph unicode="" glyph-name="print" horiz-adv-x="1028" d="M70.117 814.323c-23.372 0-70.117-23.372-70.117-70.117v-327.213c0-23.372 23.372-70.117 70.117-70.117h116.862v93.489c0 46.745 46.745 93.489 93.489 93.489h444.075c46.745 0 93.489-46.745 93.489-93.489v-93.489h116.862c23.372 0 70.117 23.372 70.117 70.117v327.213c0 23.372-23.372 70.117-70.117 70.117h-864.777zM93.489 767.578c23.372 0 46.745-23.372 46.745-46.745s-23.372-46.745-46.745-46.745c-23.372 0-46.745 23.372-46.745 46.745s23.372 46.745 46.745 46.745zM233.723 767.578c23.372 0 46.745-23.372 46.745-46.745s-23.372-46.745-46.745-46.745c-23.372 0-46.745 23.372-46.745 46.745s23.372 46.745 46.745 46.745zM233.723 931.184h537.564c46.745 0 70.117-23.372 70.117-70.117h-677.798c0 46.745 23.372 70.117 70.117 70.117zM303.84 487.11c-46.745 0-70.117-23.372-70.117-70.117v-420.702c0-46.745 23.372-70.117 70.117-70.117h420.702c46.745 0 70.117 23.372 70.117 70.117v420.702c0 46.745-23.372 70.117-70.117 70.117h-420.702zM280.468 416.993h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 346.876h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 276.759h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 206.642h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 136.525h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 66.408h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372z" />
|
||||
<glyph unicode="" glyph-name="save" horiz-adv-x="1027" d="M54.028-84.586h918.475c27.014 0 54.028 27.014 54.028 54.028v837.433c0 0 0 27.014 0 27.014l-108.056 108.056c0 0-27.014 0-27.014 0h-54.028v-378.195c0-27.014-27.014-27.014-27.014-27.014h-648.335c-27.014 0-27.014 27.014-27.014 27.014v378.195h-54.028c-27.014 0-54.028-27.014-54.028-54.028v-918.475c0-27.014 27.014-54.028 54.028-54.028zM216.112 158.539h594.307c27.014 0 27.014 0 27.014-27.014v-27.014c0-27.014 0-27.014-27.014-27.014h-594.307c-27.014 0-27.014 0-27.014 27.014v27.014c0 27.014 0 27.014 27.014 27.014zM216.112 320.623h594.307c27.014 0 27.014 0 27.014-27.014v-27.014c0-27.014 0-27.014-27.014-27.014h-594.307c-27.014 0-27.014 0-27.014 27.014v27.014c0 27.014 0 27.014 27.014 27.014zM432.223 941.944h297.154v-324.168h-297.154v324.168zM189.098 941.944h162.084v-324.168h-162.084v324.168zM162.084 428.679h702.363c27.014 0 54.028-27.014 54.028-54.028v-351.181h-810.419v351.181c0 27.014 27.014 54.028 54.028 54.028z" />
|
||||
<glyph unicode="" glyph-name="unvalidasi" d="M307.2 906.546l238.933-238.933 238.933 238.933c68.267 68.267 170.667 68.267 238.933 0v0c68.267-68.267 68.267-170.667 0-238.933l-238.933-238.933 238.933-238.933c68.267-68.267 68.267-170.667 0-238.933v0c-68.267-68.267-170.667-68.267-238.933 0l-238.933 238.933-238.933-238.933c-68.267-68.267-170.667-68.267-238.933 0v0c-68.267 68.267-68.267 170.667 0 238.933l238.933 238.933-238.933 238.933c-68.267 68.267-68.267 170.667 0 238.933v0c68.267 68.267 170.667 68.267 238.933 0z" />
|
||||
<glyph unicode="" glyph-name="v1" horiz-adv-x="989" d="M1.919 341.736c115.925-77.283 193.208-173.887 212.528-289.811 154.566 270.491 328.453 463.698 521.66 521.66-57.962 77.283-19.321 231.849 19.321 386.415-231.849-154.566-425.057-367.094-560.302-656.906 0 154.566-77.283 270.491-173.887 367.094 38.642-115.925 38.642-231.849-19.321-309.132zM832.712-64v502.34l-115.925-19.321v57.962l270.491 38.642v-579.623h-154.566z" />
|
||||
<glyph unicode="" glyph-name="v2" horiz-adv-x="1007" d="M0 335.466c111.856-74.571 186.427-167.784 223.712-279.64 149.141 279.64 316.925 466.067 521.995 503.352-55.928 74.571-18.643 223.712 18.643 372.853-223.712-149.141-410.139-372.853-559.28-652.493-18.643 149.141-74.571 260.997-186.427 372.853 37.285-130.499 37.285-223.712-18.643-316.925zM577.923-74.673v74.571l74.571 93.213c0 0 18.643 18.643 37.285 37.285 93.213 111.856 149.141 186.427 149.141 223.712 0 18.643 0 37.285-18.643 55.928s-37.285 18.643-55.928 18.643-55.928-18.643-74.571-37.285c-18.643-18.643-18.643-55.928-18.643-74.571v0h-74.571c0 55.928 18.643 93.213 55.928 130.499s74.571 55.928 149.141 55.928c55.928 0 111.856-18.643 149.141-55.928s55.928-74.571 55.928-130.499c0-18.643 0-37.285 0-55.928s-18.643-37.285-18.643-55.928c-18.643-18.643-37.285-55.928-55.928-74.571-18.643-37.285-55.928-74.571-111.856-111.856h223.712v-74.571h-410.139z" />
|
||||
<glyph unicode="" glyph-name="skip" d="M510.080 457.728l456.128-500.448v956.608l-456.128-456.16zM462.336-42.72v956.608l-456.16-456.16 456.16-500.448z" />
|
||||
<glyph unicode="" glyph-name="process" d="M212.526 597.172l1.176-0.22c15.656 30.924 36.178 60.184 62.152 86.168 112.016 111.968 283.562 127.584 412.544 47.236l-108.34-108.3 422.642-89.18-46.536 225.602-42.338 197.39-100.688-100.772c-198.178 147.31-479.242 131.702-659.050-48.024-88.528-88.524-136.944-201.68-146.13-317.276l170.314-35.952c0.792 49.244 11.988 98.188 34.254 143.328zM845.764 441.072c-0.828-48.812-12.026-97.496-34.198-142.328l-1.184 0.306c-15.702-31.054-36.168-60.314-62.104-86.206-112.016-112.064-283.646-127.546-412.586-47.37l107.466 107.512-422.256 89.226 29.964-145.432 59.44-276.648 100.64 100.644c198.136-147.312 479.202-131.698 659.010 48.112 88.31 88.264 136.724 200.93 146.086 316.232l-170.278 35.952z" />
|
||||
<glyph unicode="" glyph-name="import" horiz-adv-x="1200" d="M496.064 956.018c-10.092-6.869-9.135 8.772-9.495-154.729l-0.321-145.057h-96.562c-119.726 0-113.205 2.161-81.89-27.171 58.405-54.71 279.575-259.1 282.357-260.936 5.495-3.622 15.959-2.977 21.796 1.344 4.129 3.055 237.736 219.124 283.131 261.876 28.308 26.658 34.337 24.887-84.597 24.887h-96.349l-0.321 145.057c-0.36 163.501 0.597 147.86-9.495 154.729l-4.048 2.758h-200.158l-4.048-2.758zM126.712 325.481c-112.521-77.989-112.872-78.295-122.421-106.951-6.5-19.503-6.68-17.799 13.426-127.946 9.873-54.095 18.765-100.655 19.755-103.464 7.796-22.099 30.826-42.034 55.431-47.985 7.433-1.798 52.295-1.942 510.349-1.636l502.201 0.339 7.962 2.839c24.917 8.883 44.975 29.052 50.776 51.055 1.065 4.042 9.699 50.068 19.185 102.279 19.314 106.318 19.191 105.094 12.715 124.519-9.618 28.869-10.506 29.643-122.967 107.497l-94.8 65.628h-65.355c-35.942 0-65.316-0.414-65.274-0.918s46.596-35.093 103.449-76.861l103.374-75.942-13.117-0.39c-7.211-0.216-54.593 0.207-105.289 0.942-102.348 1.479-96.46 1.843-104.409-6.419-1.663-1.726-14.99-32.32-31.921-73.265l-29.064-70.303h-341.053l-29.064 70.303c-16.859 40.771-30.262 71.543-31.909 73.256-7.211 7.49-0.447 7.043-116.116 7.712l-105.7 0.612 102.873 74.718c56.58 41.095 102.906 75.132 102.945 75.636s-29.307 0.918-65.217 0.918h-65.289l-95.475-66.174z" />
|
||||
<glyph unicode="" glyph-name="barcode" d="M0 832h128v-640h-128zM192 832h64v-640h-64zM320 832h64v-640h-64zM512 832h64v-640h-64zM768 832h64v-640h-64zM960 832h64v-640h-64zM640 832h32v-640h-32zM448 832h32v-640h-32zM864 832h32v-640h-32zM0 128h64v-64h-64zM192 128h64v-64h-64zM320 128h64v-64h-64zM640 128h64v-64h-64zM960 128h64v-64h-64zM768 128h128v-64h-128zM448 128h128v-64h-128z" />
|
||||
<glyph unicode="" glyph-name="searchh" d="M64 960h384v-64h-384zM576 960h384v-64h-384zM952 640h-56v256h-256v-256h-256v256h-256v-256h-56c-39.6 0-72-32.4-72-72v-560c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v376h128v-376c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v560c0 39.6-32.4 72-72 72zM348 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM924 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
|
||||
<glyph unicode="" glyph-name="search" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/fonts-icon-adhi/icomoon.ttf
Normal file
BIN
libs/fonts-icon-adhi/icomoon.woff
Normal file
BIN
libs/fonts/icomoon.eot
Normal file
11
libs/fonts/icomoon.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="delta" d="M515.072 849.408l-386.048-765.952h795.648l-409.6 765.952zM490.496 734.72l290.816-576.512h-579.584l288.768 576.512z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 602 B |
BIN
libs/fonts/icomoon.ttf
Normal file
BIN
libs/fonts/icomoon.woff
Normal file
BIN
libs/image/1.jpg
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
libs/image/background.png
Normal file
|
After Width: | Height: | Size: 511 KiB |
BIN
libs/image/body.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
libs/image/engko.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
libs/image/engsi.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
libs/image/flag-ina_48.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
libs/image/flag-uk_48.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
libs/image/flag-us_48.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
libs/image/flag2-ina-si.jpg
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
libs/image/hb.png
Normal file
|
After Width: | Height: | Size: 506 KiB |
BIN
libs/image/human-body.jpg
Normal file
|
After Width: | Height: | Size: 9.0 MiB |
BIN
libs/image/image01.jpg
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
libs/image/inako.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
libs/image/inasi.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
libs/image/logoone.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
libs/image/onetext.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
libs/image/sample/a.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/a_n.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/a_y.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/b.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
libs/image/sample/b_n.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
libs/image/sample/b_y.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
libs/image/sample/c.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/c_n.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/c_y.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/d.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/d_n.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/d_y.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/e.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/e_n.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
libs/image/sample/e_y.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
29
libs/my-icon.css
Normal file
@@ -0,0 +1,29 @@
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('fonts/icomoon.eot?c3noan');
|
||||
src: url('fonts/icomoon.eot?c3noan#iefix') format('embedded-opentype'),
|
||||
url('fonts/icomoon.ttf?c3noan') format('truetype'),
|
||||
url('fonts/icomoon.woff?c3noan') format('woff'),
|
||||
url('fonts/icomoon.svg?c3noan#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-delta:before {
|
||||
content: "\e900";
|
||||
}
|
||||
113
libs/one_global.js
Normal file
@@ -0,0 +1,113 @@
|
||||
window.BASE_URL = ""
|
||||
|
||||
function one_money(inp, format) {
|
||||
return numeral(inp).format(format ? format : '0,000')
|
||||
}
|
||||
window.one_money = one_money
|
||||
|
||||
function one_token() {
|
||||
return localStorage.getItem('token')
|
||||
}
|
||||
window.one_token = one_token
|
||||
|
||||
function one_user() {
|
||||
return JSON.parse(localStorage.getItem('user'))
|
||||
}
|
||||
window.one_user = one_user
|
||||
|
||||
function one_float(inp) {
|
||||
try {
|
||||
let val = parseFloat(inp)
|
||||
if (isNaN(val)) return 0.0
|
||||
return val
|
||||
} catch (e) {
|
||||
return 0.0
|
||||
}
|
||||
}
|
||||
window.one_float = one_float
|
||||
|
||||
function one_logout(urllogout) {
|
||||
window.urllogout = urllogout
|
||||
window.urllogout = "/home"
|
||||
|
||||
let logout = async function (token) {
|
||||
try {
|
||||
var resp = await axios.post(BASE_URL + '/one-api/v1/system/auth/logout',
|
||||
{ token: token });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
let x = async () => {
|
||||
try {
|
||||
let resp = await logout(window.one_token())
|
||||
if (resp.status != "OK") {
|
||||
alert('error')
|
||||
} else {
|
||||
window.localStorage.removeItem("token")
|
||||
window.localStorage.removeItem("user")
|
||||
location.replace(window.urllogout)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_login_status", 3)
|
||||
context.commit("update_login_error_message", e.message)
|
||||
}
|
||||
}
|
||||
|
||||
x()
|
||||
|
||||
|
||||
// window.location = urllogout
|
||||
}
|
||||
window.one_logout = one_logout
|
||||
|
||||
var one_moment = function (d) {
|
||||
return moment(d, "YYYY-MM-DD hh:mm:ss").fromNow()
|
||||
}
|
||||
window.oneMoment = one_moment
|
||||
window.one_moment = one_moment
|
||||
|
||||
// NavBar APIs
|
||||
// async function one_get_menu() {
|
||||
// try {
|
||||
// var resp = await axios.post(BASE_URL + '/one-api/mockup/system/menu/get_menu');
|
||||
// if (resp.status != 200) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: resp.statusText
|
||||
// };
|
||||
// }
|
||||
// let data = resp.data;
|
||||
// return data;
|
||||
// } catch(e) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: e.message
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
// window.one_get_menu = one_get_menu
|
||||
|
||||
|
||||
async function xno(input) {
|
||||
try {
|
||||
var resp = await axios.get(BASE_URL + '/one-api/v1/su/xno/show/' + input)
|
||||
return resp.data
|
||||
} catch (e) {
|
||||
return input;
|
||||
}
|
||||
}
|
||||
window.xno = xno
|
||||
|
||||
122
libs/one_global_clinic.js
Normal file
@@ -0,0 +1,122 @@
|
||||
window.one_money = one_money
|
||||
window.one_token = one_token
|
||||
window.one_float = one_float
|
||||
window.do_print_ticket = do_print_ticket
|
||||
|
||||
window.BASE_URL = ""
|
||||
|
||||
window.BASE_URL_QUEUE = window.BASE_URL + ":9090/ticket/";
|
||||
window.WS_SERVICE = "ws://localhost:6025";
|
||||
window.PRINTER = "POS";
|
||||
|
||||
|
||||
|
||||
// isLoggedIn()
|
||||
|
||||
function one_money(inp) {
|
||||
return numeral(inp).format('0,000.00')
|
||||
}
|
||||
|
||||
function one_token() {
|
||||
//sipe add null token redirect ke logout
|
||||
var tkn = localStorage.getItem('token')
|
||||
if (tkn == null ) one_logout("/one-ui/")
|
||||
return localStorage.getItem('token')
|
||||
}
|
||||
function one_logout(urllogout){
|
||||
window.localStorage.removeItem("token")
|
||||
window.localStorage.removeItem("user")
|
||||
window.location = urllogout
|
||||
}
|
||||
window.one_logout = one_logout
|
||||
|
||||
function one_float(inp) {
|
||||
try {
|
||||
let val = parseFloat(inp)
|
||||
if (isNaN(val)) return 0.0
|
||||
return val
|
||||
} catch(e) {
|
||||
return 0.0
|
||||
}
|
||||
}
|
||||
|
||||
function isLoggedIn() {
|
||||
let s = localStorage.getItem("one_clinic_user")
|
||||
console.log(s)
|
||||
if (s == null) {
|
||||
window.location = "/one-ui/test/vuex/one-fo-clinic-login"
|
||||
return false
|
||||
}
|
||||
|
||||
s = JSON.parse(s)
|
||||
if (window.location.href.match(/one-fo-clinic-login/))
|
||||
window.location = s.user.M_UserGroupDashboard
|
||||
}
|
||||
|
||||
// Printing
|
||||
window.zpl_socket = new WebSocket(WS_SERVICE);
|
||||
window.zpl_socket.onmessage = function(msg) {
|
||||
console.log('message',msg);
|
||||
};
|
||||
window.zpl_socket.onopen= function(msg) {
|
||||
console.log('open',msg);
|
||||
|
||||
};
|
||||
window.zpl_socket.onerror= function(msg) {
|
||||
console.log('error',msg);
|
||||
};
|
||||
window.printer_ready = false;
|
||||
|
||||
function svc_name(svc) {
|
||||
switch(svc) {
|
||||
case "UMUM":
|
||||
return "Pasien Umum";
|
||||
case "COM" :
|
||||
return "Pasien Rekanan";
|
||||
case "KLINIK" :
|
||||
return "Pasien Klinik";
|
||||
case "ONLINE" :
|
||||
return "Pasien Online";
|
||||
case "RES" :
|
||||
return "Pengambilan Hasil";
|
||||
case "APPDR" :
|
||||
return "Mobile Dokter";
|
||||
case "MEMBER" :
|
||||
return "Pasien Member";
|
||||
default :
|
||||
return "OTHER";
|
||||
}
|
||||
}
|
||||
function do_print_ticket(inp,fn_cb) {
|
||||
var set_center =String.fromCharCode(0x1b,0x61,0x01) ;
|
||||
var set_font_size_big = String.fromCharCode(0x1b,0x21,0x10);
|
||||
var set_font_size = "";
|
||||
var set_font_size_large = String.fromCharCode(0x1d,0x21,0x21);
|
||||
var set_cutter =String.fromCharCode(0x1d, 0x56, 0x41, 0x03);
|
||||
var reset_mode = String.fromCharCode(0x1b,0x40);
|
||||
var nomor_sebelumnya = inp.prev_number;
|
||||
var sisa_antrian = inp.remaining_queue;
|
||||
var hari = inp.queue_day;
|
||||
|
||||
var fmt_data = reset_mode +
|
||||
set_font_size_big +
|
||||
set_center + "PRAMITA LAB - Cik Di Tiro\n" +
|
||||
set_center + "\n" +
|
||||
set_center + svc_name(inp.serviceCode) + "\n" +
|
||||
"\n" + set_font_size_large +
|
||||
set_center + inp.number + "\n" +
|
||||
"\n" + reset_mode +
|
||||
set_center + "Nomor sebelumnya " + nomor_sebelumnya + "\n" +
|
||||
set_center + "Sisa Antrian " + sisa_antrian + "\n" +
|
||||
set_center + hari + " " + inp.queue_date + " " + inp.queue_time + "\n" +
|
||||
set_center + "Terima Kasih\n\n\n" ;
|
||||
|
||||
fmt_data = fmt_data + set_cutter;
|
||||
var data_print = {
|
||||
printer : PRINTER,
|
||||
type : "zpl",
|
||||
data : fmt_data
|
||||
};
|
||||
window.zpl_socket.send(JSON.stringify(data_print));
|
||||
fn_cb();
|
||||
}
|
||||
77
libs/one_print_antrian.js
Normal file
@@ -0,0 +1,77 @@
|
||||
var G_WS_SERVICE = "ws://localhost:6025";
|
||||
var G_PRINTER = "POS";
|
||||
|
||||
var g_cln_printer_ready = false;
|
||||
var g_cln_socket = new WebSocket(G_WS_SERVICE);
|
||||
socket.onmessage = function(msg) {
|
||||
|
||||
};
|
||||
socket.onopen = function() {
|
||||
|
||||
};
|
||||
socket.onerror = function(msg) {
|
||||
|
||||
};
|
||||
function cln_svc_name(svc) {
|
||||
switch(svc) {
|
||||
case "UMUM":
|
||||
return "Pasien Umum";
|
||||
case "COM" :
|
||||
return "Pasien Rekanan";
|
||||
case "KLINIK" :
|
||||
return "Pasien Klinik";
|
||||
case "ONLINE" :
|
||||
return "Pasien Online";
|
||||
case "RES" :
|
||||
return "Pengambilan Hasil";
|
||||
case "APPDR" :
|
||||
return "Mobile Dokter";
|
||||
case "MEMBER" :
|
||||
return "Pasien Member";
|
||||
default :
|
||||
return "OTHER";
|
||||
}
|
||||
}
|
||||
// inp
|
||||
// prev_number
|
||||
// remaining_queue
|
||||
// queue_day
|
||||
// serviceCode
|
||||
// number
|
||||
// queue_date
|
||||
// queue_time
|
||||
function one_print_antrian(inp,fn_cb) {
|
||||
var set_center =String.fromCharCode(0x1b,0x61,0x01) ;
|
||||
var set_font_size_big = String.fromCharCode(0x1b,0x21,0x10);
|
||||
var set_font_size = "";
|
||||
var set_font_size_large = String.fromCharCode(0x1d,0x21,0x21);
|
||||
var set_cutter =String.fromCharCode(0x1d, 0x56, 0x41, 0x03);
|
||||
var reset_mode = String.fromCharCode(0x1b,0x40);
|
||||
var nomor_sebelumnya = inp.prev_number;
|
||||
var sisa_antrian = inp.remaining_queue;
|
||||
var hari = inp.queue_day;
|
||||
|
||||
var fmt_data = reset_mode +
|
||||
set_font_size_big +
|
||||
set_center + "PRAMITA LAB - Cik Di Tiro\n" +
|
||||
set_center + "\n" +
|
||||
set_center + cln_svc_name(inp.serviceCode) + "\n" +
|
||||
"\n" + set_font_size_large +
|
||||
set_center + inp.number + "\n" +
|
||||
"\n" + reset_mode +
|
||||
set_center + "Nomor sebelumnya " + nomor_sebelumnya + "\n" +
|
||||
set_center + "Sisa Antrian " + sisa_antrian + "\n" +
|
||||
set_center + hari + " " + inp.queue_date + " " + inp.queue_time + "\n" +
|
||||
set_center + "Terima Kasih\n\n\n" ;
|
||||
|
||||
fmt_data = fmt_data + set_cutter;
|
||||
var data_print = {
|
||||
printer : G_PRINTER,
|
||||
type : "zpl",
|
||||
data : fmt_data
|
||||
};
|
||||
socket.send(JSON.stringify(data_print));
|
||||
fn_cb();
|
||||
}
|
||||
|
||||
window.one_print_antrian = one_print_antrian;
|
||||
379
libs/one_print_barcode-toha.js
Normal file
@@ -0,0 +1,379 @@
|
||||
var G_BC_WS_SERVICE = "ws://localhost:6025";
|
||||
var G_BC_PRINTER = "zebra";
|
||||
|
||||
var g_bc_cln_printer_ready = false;
|
||||
var g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
g_bc_cln_socket.onmessage = function(msg) {
|
||||
|
||||
};
|
||||
g_bc_cln_socket.onopen = function() {
|
||||
|
||||
};
|
||||
g_bc_cln_socket.onerror = function(msg) {
|
||||
|
||||
};
|
||||
function cln_svc_name(svc) {
|
||||
switch(svc) {
|
||||
case "UMUM":
|
||||
return "Pasien Umum";
|
||||
case "COM" :
|
||||
return "Pasien Rekanan";
|
||||
case "KLINIK" :
|
||||
return "Pasien Klinik";
|
||||
case "ONLINE" :
|
||||
return "Pasien Online";
|
||||
case "RES" :
|
||||
return "Pengambilan Hasil";
|
||||
case "APPDR" :
|
||||
return "Mobile Dokter";
|
||||
case "MEMBER" :
|
||||
return "Pasien Member";
|
||||
default :
|
||||
return "OTHER";
|
||||
}
|
||||
}
|
||||
|
||||
function one_print_barcode_pk(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/pk',{
|
||||
params: {barcodeId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
for(var i=0; i < resp.data.rows.length ; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
var print_data_lab =
|
||||
"CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
|
||||
+ " ^CF0,25"+ "\n"
|
||||
+ " ^FO35,20^FD"+ r.M_PatientName +"^FS"+ "\n"
|
||||
|
||||
+ " ^CF0,20"+ "\n"
|
||||
+ " ^FO35,197^FD"+ r.T_OrderHeaderM_PatientAge +"^FS"+ "\n"
|
||||
|
||||
|
||||
+ " ^CF0,20"+ "\n"
|
||||
+ " ^FO35,220^FD"+ r.T_SampleTypeName +"^FS"+ "\n"
|
||||
+ " ^FO220,220^FD"+ r.T_OrderHeaderDate +"^FS"+ "\n"
|
||||
|
||||
+ " ^CF0^A0B,30"+ "\n"
|
||||
+ " ^FO2,80^FD"+ r.T_OrderHeaderLabNumber +"^FS"+ "\n"
|
||||
|
||||
// + " ^BY2,2,120"+ "\n"
|
||||
// + "^FO25,80^BCN,,N,N^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
+ "^FO35,50^BY2^BC,140,N,N,N,A^FD"+ r.T_BarcodeLabBarcode + "^FS^"+ "\n"
|
||||
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n";
|
||||
console.log(print_data_lab);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_lab
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_pk_bkpadhi(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/pk',{
|
||||
params: {barcodeId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
for(var i=0; i < resp.data.rows.length ; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
var print_data_lab = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT20,220^A0B,23,24^FH\^FD"+ r.T_BarcodeLabBarcode +"^FS"+ "\n"
|
||||
+ "^FT50,220^A0N,23,24^FH\^FD"+ r.T_SampleTypeName +"^FS"+ "\n"
|
||||
+ "^FT50,50^A0N,28,28^FH\^FD"+ r.M_PatientName +"^FS"+ "\n"
|
||||
// + "^BY1,2,120^FT44,188^BCN,,N,N"+ "\n"
|
||||
// + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
+ "^BY2,2,120"+ "\n"
|
||||
+ "^FO35,70^BCN,,N,N^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
|
||||
// + "^FO40,70^BY1^BCN,100,N,N,N"+ "\n"
|
||||
// + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
// + "^FO44,70^BY2^B1N,N,100,N,N"+ "\n"
|
||||
// + "^FDL-191106003EL111^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n";
|
||||
console.log(print_data_lab);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_lab
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function one_print_barcode_so(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data= resp.data.rows[0];
|
||||
var print_data_so = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD"+ data.sex_code +"/"+ data.datereg +"("+ data.age +")^FS"+ "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD"+ data.city+"^FS"+ "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.alamat + "^FS"+ "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD"+ data.M_PatientName +"^FS"+ "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N"+ "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n"
|
||||
console.log(print_data_so);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_so
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_so_group(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so_group',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows;
|
||||
var print_data_so_group = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD"+ data.sexcode +"/"+ data.datereg +"("+ data.age +")^FS"+ "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD"+ data.city+"^FS"+ "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.alamat + "^FS"+ "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD"+ data.M_PatientName +"^FS"+ "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N"+ "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n"
|
||||
console.log(print_data_so_group);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_so_group
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_amplop_so_group(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so_group',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows;
|
||||
var print_data_amplop_so_group = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW719"+ "\n"
|
||||
+ "^LL0480"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT18,65^A0N,31,31^FH\^GB700,1,3^FS"+ "\n"
|
||||
+ "^FT18,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS"+ "\n"
|
||||
+ "^FT18,130^A0N,31,31^FH\^FDTGL REG^FS"+ "\n"
|
||||
+ "^FT18,160^A0N,31,31^FH\^FDNAMA^FS"+ "\n"
|
||||
+ "^FT18,190^A0N,31,31^FH\^FDUMUR^FS"+ "\n"
|
||||
+ "^FT18,220^A0N,31,31^FH\^FDALAMAT^FS"+ "\n"
|
||||
+ "^FT18,290^A0N,31,31^FH\^FDPENGIRIM^FS"+ "\n"
|
||||
+ "^FT18,320^A0N,31,31^FH\^FDPSN GRUP^FS"+ "\n"
|
||||
|
||||
+ "^FT18,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT19,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT210,100^A0N,31,31^FH\^FD "+" : "+ data.noreg+"/"+ data.nolab+"^FS"+ "\n"
|
||||
+ "^FT210,130^A0N,31,31^FH\^FD "+" : "+data.datereg+"^FS"+ "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD "+" : "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD "+" : "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT210,190^A0N,31,31^FH\^FD "+" : "+ data.age+"^FS"+ "\n"
|
||||
+ "^FT210,220^A0N,31,31^FH\^FD "+" : "+ data.alamat+"^FS"+ "\n"
|
||||
+ "^FT210,255^A0N,31,31^FH\^FD "+" "+ data.city+"^FS"+ "\n"
|
||||
+ "^FT210,290^A0N,31,31^FH\^FD "+" : "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
+ "^FT212,290^A0N,31,31^FH\^FD "+" : "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
|
||||
+ "^FT210,325^A0N,31,31^FH\^FD "+" : "+ data.patienttype+"^FS"+ "\n"
|
||||
+ "^BY3,3,45^FT240,380^BCN,Y,N,N,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n";
|
||||
|
||||
|
||||
console.log(print_data_amplop_so_group);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_amplop_so_group
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_amplop_so (inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows[0];
|
||||
var print_data_amplop_so = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW719"+ "\n"
|
||||
+ "^LL0480"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
|
||||
|
||||
+ "^FT18,65^A0N,31,31^FH\^GB700,1,3^FS"+ "\n"
|
||||
+ "^FT18,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS"+ "\n"
|
||||
+ "^FT18,130^A0N,31,31^FH\^FDTGL REG^FS"+ "\n"
|
||||
+ "^FT18,160^A0N,31,31^FH\^FDNAMA^FS"+ "\n"
|
||||
+ "^FT18,190^A0N,31,31^FH\^FDUMUR^FS"+ "\n"
|
||||
+ "^FT18,220^A0N,31,31^FH\^FDALAMAT^FS"+ "\n"
|
||||
+ "^FT18,290^A0N,31,31^FH\^FDPENGIRIM^FS"+ "\n"
|
||||
+ "^FT18,320^A0N,31,31^FH\^FDPSN GRUP^FS"+ "\n"
|
||||
|
||||
+ "^FT18,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT19,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT210,100^A0N,31,31^FH\^FD "+" : "+ data.noreg+"/"+ data.nolab+"^FS"+ "\n"
|
||||
+ "^FT210,130^A0N,31,31^FH\^FD "+" : "+data.datereg+"^FS"+ "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD "+" : "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD "+" : "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT210,190^A0N,31,31^FH\^FD "+" : "+ data.age+"^FS"+ "\n"
|
||||
+ "^FT210,220^A0N,31,31^FH\^FD "+" : "+ data.alamat+"^FS"+ "\n"
|
||||
+ "^FT210,255^A0N,31,31^FH\^FD "+" "+ data.city+"^FS"+ "\n"
|
||||
+ "^FT210,290^A0N,31,31^FH\^FD "+" : "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
+ "^FT212,290^A0N,31,31^FH\^FD "+" : "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
|
||||
|
||||
|
||||
+ "^FT210,325^A0N,31,31^FH\^FD "+" : "+ data.patienttype+"^FS"+ "\n"
|
||||
+ "^BY4,3,45^FT200,390^BCN,Y,N,N,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n";
|
||||
|
||||
console.log(print_data_amplop_so);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_amplop_so
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_formulir(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/formulir',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data= resp.data.rows ;
|
||||
var print_data_formulir = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD"+ data.sexcode +"/"+ data.datereg +"("+ data.age +")^FS"+ "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD"+ data.city+"^FS"+ "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.alamat + "^FS"+ "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD"+ data.M_PatientName +"^FS"+ "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N"+ "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^FT5,225^A0N,23,24^FH\^FD"+ data.M_DoctorName +"^FS"+ "\n"
|
||||
+ "^FT5,275^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n"
|
||||
console.log(print_data_formulir);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_formulir
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
window.one_print_barcode_pk= one_print_barcode_pk;
|
||||
window.one_print_barcode_so = one_print_barcode_so;
|
||||
window.one_print_barcode_so_group = one_print_barcode_so_group;
|
||||
window.one_print_barcode_amplop_so_group = one_print_barcode_amplop_so_group;
|
||||
window.one_print_barcode_amplop_so = one_print_barcode_amplop_so;
|
||||
window.one_print_barcode_formulir = one_print_barcode_formulir;
|
||||
711
libs/one_print_barcode.js
Normal file
@@ -0,0 +1,711 @@
|
||||
var G_BC_WS_SERVICE = "ws://localhost:6025";
|
||||
var G_BC_PRINTER = "zebra";
|
||||
|
||||
var g_bc_cln_printer_ready = false;
|
||||
var g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
g_bc_cln_socket.onmessage = function (msg) {
|
||||
|
||||
};
|
||||
g_bc_cln_socket.onopen = function () {
|
||||
|
||||
};
|
||||
g_bc_cln_socket.onerror = function (msg) {
|
||||
|
||||
};
|
||||
function cln_svc_name(svc) {
|
||||
switch (svc) {
|
||||
case "UMUM":
|
||||
return "Pasien Umum";
|
||||
case "COM":
|
||||
return "Pasien Rekanan";
|
||||
case "KLINIK":
|
||||
return "Pasien Klinik";
|
||||
case "ONLINE":
|
||||
return "Pasien Online";
|
||||
case "RES":
|
||||
return "Pengambilan Hasil";
|
||||
case "APPDR":
|
||||
return "Mobile Dokter";
|
||||
case "MEMBER":
|
||||
return "Pasien Member";
|
||||
default:
|
||||
return "OTHER";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function one_print_barcode_pk(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/pk', {
|
||||
params: { barcodeId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var cat_print_data_lab = "";
|
||||
for (var i = 0; i < resp.data.rows.length; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
var print_data_lab =
|
||||
"CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW440" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT140,219^A0I,25,16^FH\^FD" + r.M_PatientDOB + ' / ' + r.Gender + "^FS" + "\n"
|
||||
+ "^FT100,20^A0I,25,16^FH\^FD" + r.T_OrderHeaderDate + "^FS" + "\n"
|
||||
+ "^FT380,46^A0I,25,24^FH\^FD" + r.M_PatientNIP + ' / ' + r.T_SampleTypeName + "^FS" + "\n"
|
||||
+ "^FT380,20^A0I,25,24^FH\^FD" + r.CorporateName + "^FS" + "\n"
|
||||
+ "^FT395,219^A0I,28,21^FH\^FD" + r.M_PatientName + "^FS" + "\n"
|
||||
+ "^FO75,75^BY2^BC,120,N,N,N,A^FD" + r.T_BarcodeLabBarcode + "^FS^" + "\n"
|
||||
//+ "^BY2,2,141^FT365,46^BCI,,N,N"+ "\n"
|
||||
// + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
+ "^FT396,29^A0R,31,31^FH\^FD" + r.Full_T_OrderHeaderLabNumber + "^FS" + "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n"
|
||||
;
|
||||
console.log(print_data_lab);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_lab
|
||||
};
|
||||
cat_print_data_lab += print_data_lab;
|
||||
//console.log(print_data_lab)
|
||||
//g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}
|
||||
var all_data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: cat_print_data_lab
|
||||
};
|
||||
setTimeout(function () {
|
||||
g_bc_cln_socket.send(JSON.stringify(all_data_print));
|
||||
}, 500);
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_pkv2(inp) {
|
||||
// print berdasarkan count data yang sama
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/pkv2', {
|
||||
params: { barcodeId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var cat_print_data_lab = "";
|
||||
for (var i = 0; i < resp.data.rows.length; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
var print_data_lab =
|
||||
"CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW440" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT140,219^A0I,25,16^FH\^FD" + r.M_PatientDOB + ' / ' + r.Gender + "^FS" + "\n"
|
||||
+ "^FT100,20^A0I,25,16^FH\^FD" + r.T_OrderHeaderDate + "^FS" + "\n"
|
||||
+ "^FT380,46^A0I,25,24^FH\^FD" + r.M_PatientNIP + ' / ' + r.T_SampleTypeName + "^FS" + "\n"
|
||||
+ "^FT380,20^A0I,25,24^FH\^FD" + r.CorporateName + "^FS" + "\n"
|
||||
+ "^FT395,219^A0I,28,21^FH\^FD" + r.M_PatientName + "^FS" + "\n"
|
||||
+ "^FO75,75^BY2^BC,120,N,N,N,A^FD" + r.T_BarcodeLabBarcode + "^FS^" + "\n"
|
||||
//+ "^BY2,2,141^FT365,46^BCI,,N,N"+ "\n"
|
||||
// + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
+ "^FT396,29^A0R,31,31^FH\^FD" + r.Full_T_OrderHeaderLabNumber + "^FS" + "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n"
|
||||
;
|
||||
console.log(print_data_lab);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_lab
|
||||
};
|
||||
cat_print_data_lab += print_data_lab;
|
||||
//console.log(print_data_lab)
|
||||
//g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}
|
||||
var all_data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: cat_print_data_lab
|
||||
};
|
||||
setTimeout(function () {
|
||||
g_bc_cln_socket.send(JSON.stringify(all_data_print));
|
||||
}, 500);
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function one_print_barcode_pk_2020(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/pk', {
|
||||
params: { barcodeId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
for (var i = 0; i < resp.data.rows.length; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
var print_data_lab =
|
||||
"CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW400" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
|
||||
+ " ^CF0,25" + "\n"
|
||||
+ " ^FO35,20^FD" + r.M_PatientName + "^FS" + "\n"
|
||||
|
||||
+ " ^CF0,20" + "\n"
|
||||
+ " ^FO35,197^FD" + r.M_PatientDOB + "^FS" + "\n"
|
||||
|
||||
|
||||
+ " ^CF0,20" + "\n"
|
||||
+ " ^FO35,220^FD" + r.T_SampleTypeName + "^FS" + "\n"
|
||||
+ " ^FO220,220^FD" + r.T_OrderHeaderDate + "^FS" + "\n"
|
||||
|
||||
+ " ^CF0^A0B,30" + "\n"
|
||||
+ " ^FO2,80^FD" + r.T_OrderHeaderLabNumber + "^FS" + "\n"
|
||||
|
||||
// + " ^BY2,2,120"+ "\n"
|
||||
// + "^FO25,80^BCN,,N,N^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
+ "^FO35,50^BY2^BC,140,N,N,N,A^FD" + r.T_BarcodeLabBarcode + "^FS^" + "\n"
|
||||
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n";
|
||||
console.log(print_data_lab);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_lab
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_pk_bkpadhi(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/pk', {
|
||||
params: { barcodeId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
for (var i = 0; i < resp.data.rows.length; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
var print_data_lab = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW400" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT20,220^A0B,23,24^FH\^FD" + r.T_BarcodeLabBarcode + "^FS" + "\n"
|
||||
+ "^FT50,220^A0N,23,24^FH\^FD" + r.T_SampleTypeName + "^FS" + "\n"
|
||||
+ "^FT50,50^A0N,28,28^FH\^FD" + r.M_PatientName + "^FS" + "\n"
|
||||
// + "^BY1,2,120^FT44,188^BCN,,N,N"+ "\n"
|
||||
// + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
+ "^BY2,2,120" + "\n"
|
||||
+ "^FO35,70^BCN,,N,N^FD" + r.T_BarcodeLabBarcode + "^FS" + "\n"
|
||||
|
||||
// + "^FO40,70^BY1^BCN,100,N,N,N"+ "\n"
|
||||
// + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
// + "^FO44,70^BY2^B1N,N,100,N,N"+ "\n"
|
||||
// + "^FDL-191106003EL111^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n";
|
||||
console.log(print_data_lab);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_lab
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function one_print_barcode_so(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so', {
|
||||
params: { orderId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows[0];
|
||||
var print_data_so = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW400" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD" + data.sex_code + "/" + data.datereg + "(" + data.age + ")^FS" + "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS" + "\n"
|
||||
// + "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n"
|
||||
console.log(print_data_so);
|
||||
let xdate = new Date()
|
||||
console.log(xdate)
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_so
|
||||
};
|
||||
console.log("oye update ada tesnya")
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
function one_print_barcode_sov1(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/sov1', {
|
||||
params: { orderId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
// var data = resp.data.rows[0];
|
||||
var cat_print_data_so = "";
|
||||
for (var i = 0; i < resp.data.rows.length; i++) {
|
||||
var data = resp.data.rows[i];
|
||||
var print_data_so = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW400" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD" + data.sex_code + "/" + data.datereg + "(" + data.age + ")^FS" + "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS" + "\n"
|
||||
// + "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n"
|
||||
console.log(print_data_so);
|
||||
cat_print_data_so += print_data_so;
|
||||
let xdate = new Date()
|
||||
console.log(xdate)
|
||||
}
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: cat_print_data_so
|
||||
};
|
||||
// var data_print = {
|
||||
// printer: G_BC_PRINTER,
|
||||
// type: "zpl",
|
||||
// data: print_data_so
|
||||
// };
|
||||
console.log("oye update ada tesnya")
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_sov2(inp) {
|
||||
// print berdasarkan count data yang sama
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/sov2', {
|
||||
params: { orderId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
// var data = resp.data.rows[0];
|
||||
var cat_print_data_so = "";
|
||||
for (var i = 0; i < resp.data.rows.length; i++) {
|
||||
var data = resp.data.rows[i];
|
||||
var print_data_so = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW400" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD" + data.sex_code + "/" + data.datereg + "(" + data.age + ")^FS" + "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS" + "\n"
|
||||
// + "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n"
|
||||
console.log(print_data_so);
|
||||
cat_print_data_so += print_data_so;
|
||||
let xdate = new Date()
|
||||
console.log(xdate)
|
||||
}
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: cat_print_data_so
|
||||
};
|
||||
// var data_print = {
|
||||
// printer: G_BC_PRINTER,
|
||||
// type: "zpl",
|
||||
// data: print_data_so
|
||||
// };
|
||||
console.log("oye update ada tesnya")
|
||||
// g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
setTimeout(function () {
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print))
|
||||
}, 500);
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_so_group(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so', {
|
||||
params: { orderId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows[0];
|
||||
var print_data_so_group = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW400" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT3,50^A0N,28,28^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT3,80^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^FT3,110^A0N,28,28^FH\^FD" + data.nolab + "^FS" + "\n"
|
||||
+ "^FT5,140^A0N,23,24^FH\^FD" + data.sexcode + "/" + data.datereg + "(" + data.age + ")^FS" + "\n"
|
||||
+ "^FT5,170^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD" + data.alamat + "^FS" + "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n"
|
||||
console.log(print_data_so_group);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_so_group
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_amplop_so_group(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so_group', {
|
||||
params: { orderId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows;
|
||||
var print_data_amplop_so_group = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW719" + "\n"
|
||||
+ "^LL0480" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT18,65^A0N,31,31^FH\^GB700,1,3^FS" + "\n"
|
||||
+ "^FT18,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS" + "\n"
|
||||
+ "^FT18,130^A0N,31,31^FH\^FDTGL REG^FS" + "\n"
|
||||
+ "^FT18,160^A0N,31,31^FH\^FDNAMA^FS" + "\n"
|
||||
+ "^FT18,190^A0N,31,31^FH\^FDUMUR^FS" + "\n"
|
||||
+ "^FT18,220^A0N,31,31^FH\^FDALAMAT^FS" + "\n"
|
||||
+ "^FT18,290^A0N,31,31^FH\^FDPENGIRIM^FS" + "\n"
|
||||
+ "^FT18,320^A0N,31,31^FH\^FDPSN GRUP^FS" + "\n"
|
||||
|
||||
+ "^FT18,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT19,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT210,100^A0N,31,31^FH\^FD " + " : " + data.noreg + "/" + data.nolab + "^FS" + "\n"
|
||||
+ "^FT210,130^A0N,31,31^FH\^FD " + " : " + data.datereg + "^FS" + "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^FT210,190^A0N,31,31^FH\^FD " + " : " + data.age + "^FS" + "\n"
|
||||
+ "^FT210,220^A0N,31,31^FH\^FD " + " : " + data.alamat + "^FS" + "\n"
|
||||
+ "^FT210,255^A0N,31,31^FH\^FD " + " " + data.city + "^FS" + "\n"
|
||||
+ "^FT210,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n"
|
||||
+ "^FT212,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n"
|
||||
|
||||
+ "^FT210,325^A0N,31,31^FH\^FD " + " : " + data.patienttype + "^FS" + "\n"
|
||||
+ "^BY3,3,45^FT240,380^BCN,Y,N,N,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS" + "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n";
|
||||
|
||||
|
||||
console.log(print_data_amplop_so_group);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_amplop_so_group
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_amplop_so(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/so', {
|
||||
params: { orderId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows[0];
|
||||
var print_data_amplop_so = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW719" + "\n"
|
||||
+ "^LL0480" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
|
||||
|
||||
+ "^FT18,65^A0N,31,31^FH\^GB700,1,3^FS" + "\n"
|
||||
+ "^FT18,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS" + "\n"
|
||||
+ "^FT18,130^A0N,31,31^FH\^FDTGL REG^FS" + "\n"
|
||||
+ "^FT18,160^A0N,31,31^FH\^FDNAMA^FS" + "\n"
|
||||
+ "^FT18,190^A0N,31,31^FH\^FDUMUR^FS" + "\n"
|
||||
+ "^FT18,220^A0N,31,31^FH\^FDALAMAT^FS" + "\n"
|
||||
+ "^FT18,290^A0N,31,31^FH\^FDPENGIRIM^FS" + "\n"
|
||||
+ "^FT18,320^A0N,31,31^FH\^FDPSN GRUP^FS" + "\n"
|
||||
|
||||
+ "^FT18,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT19,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n"
|
||||
+ "^FT210,100^A0N,31,31^FH\^FD " + " : " + data.noreg + "/" + data.nolab + "^FS" + "\n"
|
||||
+ "^FT210,130^A0N,31,31^FH\^FD " + " : " + data.datereg + "^FS" + "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^FT210,190^A0N,31,31^FH\^FD " + " : " + data.age + "^FS" + "\n"
|
||||
+ "^FT210,220^A0N,31,31^FH\^FD " + " : " + data.alamat + "^FS" + "\n"
|
||||
+ "^FT210,255^A0N,31,31^FH\^FD " + " " + data.city + "^FS" + "\n"
|
||||
+ "^FT210,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n"
|
||||
+ "^FT212,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n"
|
||||
|
||||
|
||||
|
||||
+ "^FT210,325^A0N,31,31^FH\^FD " + " : " + data.patienttype + "^FS" + "\n"
|
||||
+ "^BY4,3,45^FT200,390^BCN,Y,N,N,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS" + "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n";
|
||||
|
||||
console.log(print_data_amplop_so);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_amplop_so
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_formulir(inp) {
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/formulir', {
|
||||
params: { orderId: inp }
|
||||
})
|
||||
.then(function (resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows;
|
||||
var print_data_formulir = "CT~~CD,~CC^~CT~" + "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n"
|
||||
+ "^XA" + "\n"
|
||||
+ "^MMT" + "\n"
|
||||
+ "^PW400" + "\n"
|
||||
+ "^LL0240" + "\n"
|
||||
+ "^LS0" + "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD" + data.sexcode + "/" + data.datereg + "(" + data.age + ")^FS" + "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS" + "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n"
|
||||
+ "^PQ1,0,1,Y^XZ" + "\n"
|
||||
console.log(print_data_formulir);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_formulir
|
||||
};
|
||||
setTimeout(function () {
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}, 500);
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
function one_print_qrcode_form(inp) {
|
||||
let url_header = window.location.protocol + '//cpone.aplikasi.web.id'
|
||||
console.log(inp)
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
var print_data_formulir = "^XA" + "\n"
|
||||
+ "^FO15,5" + "\n"
|
||||
+ "^BQN,2,4,H" + "\n"
|
||||
+ "^FD>" + inp.url_qrform + "^FS" + "\n"
|
||||
|
||||
+ "^CFA,20" + "\n"
|
||||
+ "^FO200,30^FDNama : (P)^FS" + "\n"
|
||||
+ "^FO200,60^FD" + inp.name + "^FS" + "\n"
|
||||
+ "^FO200,90^FDKode Form :^FS" + "\n"
|
||||
+ "^FO200,120^FD" + inp.form_code + "^FS" + "\n"
|
||||
+ "^FO200,150^FDTgl. Registrasi : ^FS" + "\n"
|
||||
+ "^FO200,180^FD" + inp.register_date + "^FS" + "\n"
|
||||
|
||||
|
||||
|
||||
+ "^XZ"
|
||||
|
||||
console.log(print_data_formulir)
|
||||
var print_data
|
||||
console.log(print_data_formulir);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_formulir
|
||||
};
|
||||
setTimeout(function () {
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}, 500);
|
||||
}
|
||||
|
||||
|
||||
function one_print_qrcode(inp) {
|
||||
let url_header = window.location.protocol + '//cpone.aplikasi.web.id'
|
||||
console.log(inp)
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
var print_data_formulir = "^XA" + "\n"
|
||||
+ "^FO15,5" + "\n"
|
||||
+ "^BQN,2,4,H" + "\n"
|
||||
+ "^FD>" + url_header + "/one-ui/test/vuex/cpone-control-card/?noreg=" + inp.no_lab + "&id=" + inp.id + "^FS" + "\n"
|
||||
|
||||
+ "^CFA,20" + "\n"
|
||||
+ "^FO200,30^FDNama : (P)^FS" + "\n"
|
||||
+ "^FO200,60^FD" + inp.name + "^FS" + "\n"
|
||||
+ "^FO200,90^FDNo Lab :^FS" + "\n"
|
||||
+ "^FO200,120^FD" + inp.no_lab + "^FS" + "\n"
|
||||
+ "^FO200,150^FDTgl. Registrasi : ^FS" + "\n"
|
||||
+ "^FO200,180^FD" + inp.register_date + "^FS" + "\n"
|
||||
|
||||
|
||||
|
||||
+ "^XZ"
|
||||
|
||||
console.log(print_data_formulir)
|
||||
var print_data
|
||||
console.log(print_data_formulir);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_formulir
|
||||
};
|
||||
setTimeout(function () {
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}, 500);
|
||||
}
|
||||
|
||||
|
||||
function one_print_qrcode_patient(inp) {
|
||||
console.log(inp)
|
||||
g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
var print_data_formulir = "^XA" + "\n"
|
||||
+ "^FO15,5" + "\n"
|
||||
+ "^BQN,2,8,H" + "\n"
|
||||
+ "^FD>" + inp.no_lab + "^FS" + "\n"
|
||||
|
||||
+ "^CFA,20" + "\n"
|
||||
+ "^FO200,30^FDNama : ^FS" + "\n"
|
||||
+ "^FO200,60^FD" + inp.name + "^FS" + "\n"
|
||||
+ "^FO200,90^FDNo Lab :^FS" + "\n"
|
||||
+ "^FO200,120^FD" + inp.no_lab + "^FS" + "\n"
|
||||
+ "^FO200,150^FDTgl. Registrasi : ^FS" + "\n"
|
||||
+ "^FO200,180^FD" + inp.register_date + "^FS" + "\n"
|
||||
|
||||
+ "^XZ"
|
||||
|
||||
console.log(print_data_formulir)
|
||||
var print_data
|
||||
console.log(print_data_formulir);
|
||||
var data_print = {
|
||||
printer: G_BC_PRINTER,
|
||||
type: "zpl",
|
||||
data: print_data_formulir
|
||||
};
|
||||
setTimeout(function () {
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}, 500);
|
||||
}
|
||||
|
||||
window.one_print_barcode_pk = one_print_barcode_pk;
|
||||
window.one_print_barcode_pkv2 = one_print_barcode_pkv2;
|
||||
window.one_print_barcode_so = one_print_barcode_so;
|
||||
window.one_print_barcode_sov1 = one_print_barcode_sov1;
|
||||
window.one_print_barcode_sov2 = one_print_barcode_sov2;
|
||||
window.one_print_barcode_so_group = one_print_barcode_so_group;
|
||||
window.one_print_barcode_amplop_so_group = one_print_barcode_amplop_so_group;
|
||||
window.one_print_barcode_amplop_so = one_print_barcode_amplop_so;
|
||||
window.one_print_barcode_formulir = one_print_barcode_formulir;
|
||||
window.one_print_qrcode = one_print_qrcode;
|
||||
window.one_print_qrcode_patient = one_print_qrcode_patient;
|
||||
window.one_print_qrcode_form = one_print_qrcode_form;
|
||||
269
libs/one_print_barcode_bkp.js
Normal file
@@ -0,0 +1,269 @@
|
||||
var G_BC_WS_SERVICE = "ws://localhost:6025";
|
||||
var G_BC_PRINTER = "zebra";
|
||||
|
||||
var g_bc_cln_printer_ready = false;
|
||||
var g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE);
|
||||
g_bc_cln_socket.onmessage = function(msg) {
|
||||
|
||||
};
|
||||
g_bc_cln_socket.onopen = function() {
|
||||
|
||||
};
|
||||
g_bc_cln_socket.onerror = function(msg) {
|
||||
|
||||
};
|
||||
function cln_svc_name(svc) {
|
||||
switch(svc) {
|
||||
case "UMUM":
|
||||
return "Pasien Umum";
|
||||
case "COM" :
|
||||
return "Pasien Rekanan";
|
||||
case "KLINIK" :
|
||||
return "Pasien Klinik";
|
||||
case "ONLINE" :
|
||||
return "Pasien Online";
|
||||
case "RES" :
|
||||
return "Pengambilan Hasil";
|
||||
case "APPDR" :
|
||||
return "Mobile Dokter";
|
||||
case "MEMBER" :
|
||||
return "Pasien Member";
|
||||
default :
|
||||
return "OTHER";
|
||||
}
|
||||
}
|
||||
function one_print_barcode_pk(inp) {
|
||||
axios.get('/one-api/v1/su/barcode/pk',{
|
||||
params: {barcodeId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
for(var i=0; i < resp.data.rows.length ; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
var print_data_lab = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT25,220^A0B,23,24^FH\^FD"+ r.T_BarcodeLabBarcode +"^FS"+ "\n"
|
||||
+ "^FT50,220^A0N,23,24^FH\^FD"+ r.T_SampleTypeName +"^FS"+ "\n"
|
||||
+ "^FT50,50^A0N,28,28^FH\^FD"+ r.M_PatientName +"^FS"+ "\n"
|
||||
+ "^BY2,2,120^FT44,188^BCN,,N,N"+ "\n"
|
||||
+ "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
// + "^FO40,70^BY1^BCN,100,N,N,N"+ "\n"
|
||||
// + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n"
|
||||
// + "^FO44,70^BY2^B1N,N,100,N,N"+ "\n"
|
||||
// + "^FDL-191106003EL111^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n";
|
||||
console.log(print_data_lab);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_lab
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
}
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_so(inp) {
|
||||
axios.get('/one-api/v1/su/barcode/so',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data= resp.data.rows[0];
|
||||
var print_data_so = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD"+ data.sex_code +"/"+ data.datereg +"("+ data.age +")^FS"+ "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD"+ data.city+"^FS"+ "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.alamat + "^FS"+ "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD"+ data.M_PatientName +"^FS"+ "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N"+ "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^FT5,225^A0N,23,24^FH\^FD"+ data.M_CompanyName +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n"
|
||||
console.log(print_data_so);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_so
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_so_group(inp) {
|
||||
axios.get('/one-api/v1/su/barcode/so_group',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows;
|
||||
var print_data_so_group = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW400"+ "\n"
|
||||
+ "^LL0240"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT5,150^A0N,23,24^FH\^FD"+ data.sexcode +"/"+ data.datereg +"("+ data.age +")^FS"+ "\n"
|
||||
+ "^FT5,200^A0N,23,24^FH\^FD"+ data.city+"^FS"+ "\n"
|
||||
+ "^FT5,175^A0N,23,24^FH\^FD" + data.alamat + "^FS"+ "\n"
|
||||
+ "^FT3,125^A0N,28,28^FH\^FD"+ data.M_PatientName +"^FS"+ "\n"
|
||||
+ "^BY2,2,45^FT22,70^BCN,,Y,N"+ "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n"
|
||||
console.log(print_data_so_group);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_so_group
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_amplop_so_group(inp) {
|
||||
axios.get('/one-api/v1/su/barcode/so_group',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows;
|
||||
var print_data_amplop_so_group = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW719"+ "\n"
|
||||
+ "^LL0480"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT1,65^A0N,31,31^FH\^GB700,1,3^FS"+ "\n"
|
||||
+ "^FT1,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS"+ "\n"
|
||||
+ "^FT1,130^A0N,31,31^FH\^FDTGL REG^FS"+ "\n"
|
||||
+ "^FT1,160^A0N,31,31^FH\^FDNAMA^FS"+ "\n"
|
||||
+ "^FT1,190^A0N,31,31^FH\^FDUMUR^FS"+ "\n"
|
||||
+ "^FT1,220^A0N,31,31^FH\^FDALAMAT^FS"+ "\n"
|
||||
+ "^FT1,300^A0N,31,31^FH\^FDPENGIRIM^FS"+ "\n"
|
||||
+ "^FT1,330^A0N,31,31^FH\^FDPSN GRUP^FS"+ "\n"
|
||||
|
||||
+ "^FT1,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT2,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT200,100^A0N,31,31^FH\^FD "+": "+ data.nolab+"/"+ data.noreg+"^FS"+ "\n"
|
||||
+ "^FT200,130^A0N,31,31^FH\^FD "+": "+data.datereg+"^FS"+ "\n"
|
||||
+ "^FT200,160^A0N,31,31^FH\^FD "+": "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT202,160^A0N,31,31^FH\^FD "+": "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT200,190^A0N,31,31^FH\^FD "+": "+ data.age+"^FS"+ "\n"
|
||||
+ "^FT200,220^A0N,31,31^FH\^FD "+": "+ data.alamat+"^FS"+ "\n"
|
||||
+ "^FT200,255^A0N,31,31^FH\^FD "+" "+ data.city+"^FS"+ "\n"
|
||||
+ "^FT200,300^A0N,31,31^FH\^FD "+": "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
+ "^FT202,300^A0N,31,31^FH\^FD "+": "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
|
||||
+ "^FT200,330^A0N,31,31^FH\^FD "+": "+ data.M_CompanyName+"^FS"+ "\n"
|
||||
+ "^BY4,3,45^FT200,390^BCN,Y,N,N,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n";
|
||||
|
||||
console.log(print_data_amplop_so_group);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_amplop_so_group
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
function one_print_barcode_amplop_so (inp) {
|
||||
axios.get('/one-api/v1/su/barcode/so',{
|
||||
params: {orderId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data = resp.data.rows[0];
|
||||
var print_data_amplop_so = "CT~~CD,~CC^~CT~"+ "\n"
|
||||
+ "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ"+ "\n"
|
||||
+ "^XA"+ "\n"
|
||||
+ "^MMT"+ "\n"
|
||||
+ "^PW719"+ "\n"
|
||||
+ "^LL0480"+ "\n"
|
||||
+ "^LS0"+ "\n"
|
||||
+ "^FT1,65^A0N,31,31^FH\^GB700,1,3^FS"+ "\n"
|
||||
+ "^FT1,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS"+ "\n"
|
||||
+ "^FT1,130^A0N,31,31^FH\^FDTGL REG^FS"+ "\n"
|
||||
+ "^FT1,160^A0N,31,31^FH\^FDNAMA^FS"+ "\n"
|
||||
+ "^FT1,190^A0N,31,31^FH\^FDUMUR^FS"+ "\n"
|
||||
+ "^FT1,220^A0N,31,31^FH\^FDALAMAT^FS"+ "\n"
|
||||
+ "^FT1,300^A0N,31,31^FH\^FDPENGIRIM^FS"+ "\n"
|
||||
+ "^FT1,330^A0N,31,31^FH\^FDPSN GRUP^FS"+ "\n"
|
||||
|
||||
+ "^FT1,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT2,60^A0N,31,31^FH\^FD"+ data.test +"^FS"+ "\n"
|
||||
+ "^FT200,100^A0N,31,31^FH\^FD "+": "+ data.nolab+"/"+ data.noreg+"^FS"+ "\n"
|
||||
+ "^FT200,130^A0N,31,31^FH\^FD "+": "+data.datereg+"^FS"+ "\n"
|
||||
+ "^FT200,160^A0N,31,31^FH\^FD "+": "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT202,160^A0N,31,31^FH\^FD "+": "+data.M_PatientName+"^FS"+ "\n"
|
||||
+ "^FT200,190^A0N,31,31^FH\^FD "+": "+ data.age+"^FS"+ "\n"
|
||||
+ "^FT200,220^A0N,31,31^FH\^FD "+": "+ data.alamat+"^FS"+ "\n"
|
||||
+ "^FT200,255^A0N,31,31^FH\^FD "+" "+ data.city+"^FS"+ "\n"
|
||||
+ "^FT200,300^A0N,31,31^FH\^FD "+": "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
+ "^FT202,300^A0N,31,31^FH\^FD "+": "+ data.M_DoctorName+"^FS"+ "\n"
|
||||
|
||||
+ "^FT200,330^A0N,31,31^FH\^FD "+": "+ data.M_CompanyName+"^FS"+ "\n"
|
||||
+ "^BY4,3,45^FT200,390^BCN,Y,N,N,N" + "\n"
|
||||
+ "^FD" + data.nolab + "^FS"+ "\n"
|
||||
+ "^PQ1,0,1,Y^XZ"+ "\n";
|
||||
|
||||
console.log(print_data_amplop_so);
|
||||
var data_print = {
|
||||
printer : G_BC_PRINTER,
|
||||
type : "zpl",
|
||||
data : print_data_amplop_so
|
||||
};
|
||||
g_bc_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
window.one_print_barcode_pk= one_print_barcode_pk;
|
||||
window.one_print_barcode_so = one_print_barcode_so;
|
||||
window.one_print_barcode_so_group = one_print_barcode_so_group;
|
||||
window.one_print_barcode_amplop_so_group = one_print_barcode_amplop_so_group;
|
||||
window.one_print_barcode_amplop_so = one_print_barcode_amplop_so;
|
||||
55
libs/one_print_robo.js
Normal file
@@ -0,0 +1,55 @@
|
||||
var G_ROBO_WS_SERVICE = "ws://" + window.location.hostname + ":6026";
|
||||
|
||||
var g_robo_cln_socket = new WebSocket(G_ROBO_WS_SERVICE);
|
||||
var g_robo_cln_printer_ready = false;
|
||||
var g_robo_cln_socket = new WebSocket(G_ROBO_WS_SERVICE);
|
||||
g_robo_cln_socket.onmessage = function(msg) {
|
||||
};
|
||||
g_robo_cln_socket.onopen = function() {
|
||||
|
||||
};
|
||||
g_robo_cln_socket.onerror = function(msg) {
|
||||
|
||||
};
|
||||
|
||||
function one_print_robo(inp) {
|
||||
g_robo_cln_socket = new WebSocket(G_ROBO_WS_SERVICE);
|
||||
axios.get('/one-api/v1/su/barcode/pk',{
|
||||
params: {barcodeId: inp}
|
||||
})
|
||||
.then( function(resp) {
|
||||
if (resp.data.status == "OK") {
|
||||
var data_print = {};
|
||||
for(var i=0; i < resp.data.rows.length ; i++) {
|
||||
var r = resp.data.rows[i];
|
||||
if (i==0) {
|
||||
data_print = {
|
||||
type : "robo",
|
||||
name : r.M_PatientName,
|
||||
age : r.T_OrderHeaderM_PatientAge,
|
||||
date : r.T_OrderHeaderDate,
|
||||
regno : r.T_OrderHeaderLabNumber,
|
||||
sex : r.Sex,
|
||||
pid: r.M_PatientNoReg,
|
||||
data : []
|
||||
};
|
||||
}
|
||||
data_print.data.push( {
|
||||
sample: r.T_SampleTypeName,
|
||||
no : r.T_BarcodeLabBarcode,
|
||||
code : r.T_SampleTypeSuffix
|
||||
});
|
||||
}
|
||||
g_robo_cln_socket.send(JSON.stringify(data_print));
|
||||
} else {
|
||||
console.log("ERR", resp.data);
|
||||
}
|
||||
})
|
||||
.catch( function(e) {
|
||||
console.log('Err Get Barcode', e);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
window.one_print_robo = one_print_robo;
|
||||
10
libs/vendor/Chart.min.js
vendored
Normal file
9
libs/vendor/axios.min.js
vendored
Normal file
BIN
libs/vendor/css/Iceland-Regular.ttf
vendored
Normal file
139
libs/vendor/css/google-fonts.css
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
/* fallback */
|
||||
@font-face {
|
||||
font-family: "Material Icons";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(./material-icon.woff2) format("woff2");
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: "Material Icons";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
-webkit-font-feature-settings: "liga";
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* ICONS BY ADHI */
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('../../fonts-icon-adhi/icomoon.eot?cea4mb');
|
||||
src: url('../../fonts-icon-adhi/icomoon.eot?cea4mb#iefix') format('embedded-opentype'),
|
||||
url('../../fonts-icon-adhi/icomoon.ttf?cea4mb') format('truetype'),
|
||||
url('../../fonts-icon-adhi/icomoon.woff?cea4mb') format('woff'),
|
||||
url('../../fonts-icon-adhi/icomoon.svg?cea4mb#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-check:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-note:before {
|
||||
content: "\e901";
|
||||
}
|
||||
.icon-speaker:before {
|
||||
content: "\e902";
|
||||
}
|
||||
.icon-edit:before {
|
||||
content: "\e903";
|
||||
}
|
||||
.icon-add:before {
|
||||
content: "\e904";
|
||||
}
|
||||
.icon-del:before {
|
||||
content: "\e905";
|
||||
}
|
||||
.icon-print:before {
|
||||
content: "\e906";
|
||||
}
|
||||
.icon-save:before {
|
||||
content: "\e907";
|
||||
}
|
||||
.icon-unvalidasi:before {
|
||||
content: "\e908";
|
||||
}
|
||||
.icon-v1:before {
|
||||
content: "\e909";
|
||||
}
|
||||
.icon-v2:before {
|
||||
content: "\e90a";
|
||||
}
|
||||
.icon-skip:before {
|
||||
content: "\e90b";
|
||||
}
|
||||
.icon-process:before {
|
||||
content: "\e90c";
|
||||
}
|
||||
.icon-import:before {
|
||||
content: "\e90d";
|
||||
}
|
||||
.icon-barcode:before {
|
||||
content: "\e937";
|
||||
}
|
||||
.icon-searchh:before {
|
||||
content: "\e985";
|
||||
}
|
||||
.icon-search:before {
|
||||
content: "\e986";
|
||||
}
|
||||
|
||||
.one-btn-icon {
|
||||
min-width: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
.scroll-container {
|
||||
scroll-padding: 50px 0 0 50px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
/* this targets the default scrollbar (compulsory) */
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #73baf3;
|
||||
}
|
||||
|
||||
/* the new scrollbar will have a flat appearance with the set background color */
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #2196f3;
|
||||
}
|
||||
|
||||
/* this will style the thumb, ignoring the track */
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
background-color: #0079da;
|
||||
}
|
||||
|
||||
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: black;
|
||||
}
|
||||
106
libs/vendor/css/google-fonts.css-scroll
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/* fallback */
|
||||
@font-face {
|
||||
font-family: "Material Icons";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(./material-icon.woff2) format("woff2");
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: "Material Icons";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
-webkit-font-feature-settings: "liga";
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* ICONS BY ADHI */
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('../../fonts-icon-adhi/icomoon.eot?cea4mb');
|
||||
src: url('../../fonts-icon-adhi/icomoon.eot?cea4mb#iefix') format('embedded-opentype'),
|
||||
url('../../fonts-icon-adhi/icomoon.ttf?cea4mb') format('truetype'),
|
||||
url('../../fonts-icon-adhi/icomoon.woff?cea4mb') format('woff'),
|
||||
url('../../fonts-icon-adhi/icomoon.svg?cea4mb#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-check:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-note:before {
|
||||
content: "\e901";
|
||||
}
|
||||
.icon-speaker:before {
|
||||
content: "\e902";
|
||||
}
|
||||
.icon-edit:before {
|
||||
content: "\e903";
|
||||
}
|
||||
.icon-add:before {
|
||||
content: "\e904";
|
||||
}
|
||||
.icon-del:before {
|
||||
content: "\e905";
|
||||
}
|
||||
.icon-print:before {
|
||||
content: "\e906";
|
||||
}
|
||||
.icon-save:before {
|
||||
content: "\e907";
|
||||
}
|
||||
.icon-unvalidasi:before {
|
||||
content: "\e908";
|
||||
}
|
||||
.icon-v1:before {
|
||||
content: "\e909";
|
||||
}
|
||||
.icon-v2:before {
|
||||
content: "\e90a";
|
||||
}
|
||||
.icon-skip:before {
|
||||
content: "\e90b";
|
||||
}
|
||||
.icon-process:before {
|
||||
content: "\e90c";
|
||||
}
|
||||
.icon-import:before {
|
||||
content: "\e90d";
|
||||
}
|
||||
.icon-barcode:before {
|
||||
content: "\e937";
|
||||
}
|
||||
.icon-searchh:before {
|
||||
content: "\e985";
|
||||
}
|
||||
.icon-search:before {
|
||||
content: "\e986";
|
||||
}
|
||||
|
||||
.one-btn-icon {
|
||||
min-width: 0 !important;
|
||||
}
|
||||
287
libs/vendor/css/icomoon-fonts.css
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('icomoon.eot?rubct6');
|
||||
src: url('icomoon.eot?rubct6#iefix') format('embedded-opentype'),
|
||||
url('icomoon.ttf?rubct6') format('truetype'),
|
||||
url('icomoon.woff?rubct6') format('woff'),
|
||||
url('icomoon.svg?rubct6#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'icomoon-search';
|
||||
src: url('icomoon-search.eot?rubct6');
|
||||
src: url('icomoon-search.eot?rubct6#iefix') format('embedded-opentype'),
|
||||
url('icomoon-search.ttf?rubct6') format('truetype'),
|
||||
url('icomoon-search.woff?rubct6') format('woff'),
|
||||
url('icomoon-search.svg?rubct6#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Iceland';
|
||||
src:
|
||||
url('Iceland-Regular.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
[class^="iconsearch-"], [class*=" iconsearch-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon-search' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-add:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-delete:before {
|
||||
content: "\e901";
|
||||
}
|
||||
.icon-print:before {
|
||||
content: "\e902";
|
||||
}
|
||||
.icon-save:before {
|
||||
content: "\e903";
|
||||
}
|
||||
|
||||
.icon-unval:before {
|
||||
content: "\e905";
|
||||
}
|
||||
.icon-v:before {
|
||||
content: "\e906";
|
||||
}
|
||||
.icon-vv:before {
|
||||
content: "\e907";
|
||||
}
|
||||
|
||||
|
||||
.iconsearch-searchh:before {
|
||||
content: "\e985";
|
||||
}
|
||||
.iconsearch-search:before {
|
||||
content: "\e986";
|
||||
}
|
||||
|
||||
|
||||
.v-input .v-label {
|
||||
height: 20px!important;
|
||||
line-height: 14px!important;
|
||||
}
|
||||
|
||||
.v-text-field--outline .v-label {
|
||||
top: 15px!important;
|
||||
}
|
||||
|
||||
.v-text-field--outline input {
|
||||
margin-top: 18px!important;
|
||||
}
|
||||
|
||||
.v-text-field input {
|
||||
|
||||
line-height: 29px!important;
|
||||
padding: 0!important;
|
||||
|
||||
}
|
||||
|
||||
.v-select.v-text-field--enclosed:not(.v-text-field--single-line) .v-select__selections {
|
||||
padding-top: 0px!important;
|
||||
}
|
||||
|
||||
.v-select__selection--comma{
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
.v-text-field.v-text-field--enclosed .v-input__append-inner{
|
||||
margin-top:8px!important;
|
||||
}
|
||||
|
||||
.mini-select .v-select__selection--comma {
|
||||
margin: 18px 4px 2px 0!important;
|
||||
}
|
||||
|
||||
|
||||
.v-select__selection--comma {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
margin: 4px 4px 7px 0!important;
|
||||
}
|
||||
|
||||
.v-text-field--box>.v-input__control>.v-input__slot, .v-text-field--full-width>.v-input__control>.v-input__slot, .v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
align-items: stretch;
|
||||
min-height: 48px!important;
|
||||
}
|
||||
|
||||
|
||||
.icon-medium{
|
||||
color: #64b5f6;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
justify-content: center;
|
||||
margin: 4px 8px;
|
||||
outline: 0;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
transition: .3s cubic-bezier(.25,.8,.5,1),color 1ms;
|
||||
width: 52px;
|
||||
height: 48px;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.icon-medium-outline{
|
||||
color: #64b5f6;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
border-radius: 2px;
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
justify-content: center;
|
||||
margin: 4px 8px;
|
||||
outline: 0;
|
||||
border: 1px solid #64b5f6;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
transition: .3s cubic-bezier(.25,.8,.5,1),color 1ms;
|
||||
width: 52px;
|
||||
height: 48px;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.icon-medium-fill{
|
||||
color: #fff;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
border-radius: 2px;
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
justify-content: center;
|
||||
margin: 4px 8px;
|
||||
outline: 0;
|
||||
background-color:#64b5f6;
|
||||
border: 1px solid #64b5f6;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
transition: .3s cubic-bezier(.25,.8,.5,1),color 1ms;
|
||||
width: 52px;
|
||||
height: 45px;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
will-change: box-shadow;
|
||||
/*box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);*/
|
||||
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
|
||||
}
|
||||
|
||||
.icon-medium-fill-base{
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
border-radius: 2px;
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
justify-content: center;
|
||||
margin: 4px 8px;
|
||||
outline: 0;
|
||||
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
transition: .3s cubic-bezier(.25,.8,.5,1),color 1ms;
|
||||
width: 52px;
|
||||
height: 45px;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
will-change: box-shadow;
|
||||
/*box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);*/
|
||||
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
|
||||
}
|
||||
|
||||
.icon-medium-fill:hover{
|
||||
filter: alpha(opacity=80);
|
||||
/* IE */
|
||||
-moz-opacity: 0.8;
|
||||
/* Mozilla */
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.icon-medium-fill:active {
|
||||
background-color: #03A9F4;
|
||||
will-change: box-shadow;
|
||||
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
|
||||
|
||||
}
|
||||
|
||||
.mono {
|
||||
font-family: "Roboto Mono", monospace;
|
||||
font-weight: 500;
|
||||
}
|
||||
.input-custom-mini{
|
||||
width:30px;height:30px;text-align:center;
|
||||
}
|
||||
.input-custom-mini:focus,.input-custom-mini:active{
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
.v-text-field--outline.v-text-field--single-line input {
|
||||
margin-top: 7px!important;
|
||||
}
|
||||
|
||||
.icon-medium-fill-base-small {
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
border-radius: 2px;
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
justify-content: center;
|
||||
margin: 2px 4px;
|
||||
outline: 0;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
transition: .3s cubic-bezier(.25,.8,.5,1),color 1ms;
|
||||
width: 40px;
|
||||
height: 36px;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
will-change: box-shadow;
|
||||
/* box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); */
|
||||
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
|
||||
}
|
||||
BIN
libs/vendor/css/icomoon-search.eot
vendored
Normal file
12
libs/vendor/css/icomoon-search.svg
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="searchh" d="M64 960h384v-64h-384zM576 960h384v-64h-384zM952 640h-56v256h-256v-256h-256v256h-256v-256h-56c-39.6 0-72-32.4-72-72v-560c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v376h128v-376c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v560c0 39.6-32.4 72-72 72zM348 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM924 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
|
||||
<glyph unicode="" glyph-name="search" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
BIN
libs/vendor/css/icomoon-search.ttf
vendored
Normal file
BIN
libs/vendor/css/icomoon-search.woff
vendored
Normal file
BIN
libs/vendor/css/icomoon.eot
vendored
Normal file
18
libs/vendor/css/icomoon.svg
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="add" d="M512 960c-289.391 0-512-222.609-512-512s222.609-512 512-512c289.391 0 512 222.609 512 512s-222.609 512-512 512zM912.696 448v0c0-44.522-44.522-89.043-89.043-89.043h-244.87v-244.87c0-44.522-44.522-89.043-89.043-89.043v0c-44.522 0-89.043 44.522-89.043 89.043v244.87h-244.87c-44.522 0-89.043 44.522-89.043 89.043v0c0 44.522 44.522 89.043 89.043 89.043h244.87v244.87c0 44.522 44.522 89.043 89.043 89.043v0c44.522 0 89.043-44.522 89.043-89.043v-244.87h244.87c44.522 0 89.043-44.522 89.043-89.043z" />
|
||||
<glyph unicode="" glyph-name="del" horiz-adv-x="816" d="M743.367 736.582h-707.491v-670.255c0-93.091 74.473-148.945 148.945-148.945h428.218c93.091 0 148.945 74.473 148.945 148.945v670.255zM54.495 885.527h316.509v37.236c0 18.618 18.618 37.236 37.236 37.236v0c18.618 0 37.236-18.618 37.236-37.236v-37.236h316.509c37.236 0 55.855-18.618 55.855-55.855v0c0-37.236-18.618-55.855-55.855-55.855h-707.491c-37.236 0-55.855 18.618-55.855 55.855v0c0 37.236 18.618 55.855 55.855 55.855zM203.44 624.873v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM333.767 624.873v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM482.713 624.873v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM613.040 624.873v0c18.618 0 18.618-18.618 18.618-18.618v-539.927c0-18.618-18.618-18.618-18.618-18.618v0c-18.618 0-18.618 18.618-18.618 18.618v539.927c0 18.618 18.618 18.618 18.618 18.618zM687.513 680.727v-614.4c0-37.236-37.236-74.473-74.473-74.473h-428.218c-37.236 0-74.473 37.236-74.473 74.473v614.4h577.164z" />
|
||||
<glyph unicode="" glyph-name="print" horiz-adv-x="1028" d="M70.117 833.644c-23.372 0-70.117-23.372-70.117-70.117v-327.213c0-23.372 23.372-70.117 70.117-70.117h116.862v93.489c0 46.745 46.745 93.489 93.489 93.489h444.075c46.745 0 93.489-46.745 93.489-93.489v-93.489h116.862c23.372 0 70.117 23.372 70.117 70.117v327.213c0 23.372-23.372 70.117-70.117 70.117h-864.777zM93.489 786.899c23.372 0 46.745-23.372 46.745-46.745s-23.372-46.745-46.745-46.745c-23.372 0-46.745 23.372-46.745 46.745s23.372 46.745 46.745 46.745zM233.723 786.899c23.372 0 46.745-23.372 46.745-46.745s-23.372-46.745-46.745-46.745c-23.372 0-46.745 23.372-46.745 46.745s23.372 46.745 46.745 46.745zM233.723 950.505h537.564c46.745 0 70.117-23.372 70.117-70.117h-677.798c0 46.745 23.372 70.117 70.117 70.117zM303.84 506.431c-46.745 0-70.117-23.372-70.117-70.117v-420.702c0-46.745 23.372-70.117 70.117-70.117h420.702c46.745 0 70.117 23.372 70.117 70.117v420.702c0 46.745-23.372 70.117-70.117 70.117h-420.702zM280.468 436.314h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 366.197h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 296.080h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 225.963h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 155.846h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372zM280.468 85.729h467.447c0 0 23.372 0 23.372-23.372v0c0 0 0-23.372-23.372-23.372h-467.447c0 0-23.372 0-23.372 23.372v0c0 0 0 23.372 23.372 23.372z" />
|
||||
<glyph unicode="" glyph-name="save" horiz-adv-x="1027" d="M54.028-65.265h918.475c27.014 0 54.028 27.014 54.028 54.028v837.433c0 0 0 27.014 0 27.014l-108.056 108.056c0 0-27.014 0-27.014 0h-54.028v-378.195c0-27.014-27.014-27.014-27.014-27.014h-648.335c-27.014 0-27.014 27.014-27.014 27.014v378.195h-54.028c-27.014 0-54.028-27.014-54.028-54.028v-918.475c0-27.014 27.014-54.028 54.028-54.028zM216.112 177.86h594.307c27.014 0 27.014 0 27.014-27.014v-27.014c0-27.014 0-27.014-27.014-27.014h-594.307c-27.014 0-27.014 0-27.014 27.014v27.014c0 27.014 0 27.014 27.014 27.014zM216.112 339.944h594.307c27.014 0 27.014 0 27.014-27.014v-27.014c0-27.014 0-27.014-27.014-27.014h-594.307c-27.014 0-27.014 0-27.014 27.014v27.014c0 27.014 0 27.014 27.014 27.014zM432.223 961.265h297.154v-324.168h-297.154v324.168zM189.098 961.265h162.084v-324.168h-162.084v324.168zM162.084 448h702.363c27.014 0 54.028-27.014 54.028-54.028v-351.181h-810.419v351.181c0 27.014 27.014 54.028 54.028 54.028z" />
|
||||
<glyph unicode="" glyph-name="search" horiz-adv-x="998" d="M39.897 783.448c70.621 158.897 264.828 229.517 406.069 141.241 158.897-70.621 229.517-264.828 141.241-406.069-17.655-17.655-17.655-35.31-35.31-52.966 17.655 0 17.655-17.655 35.31-17.655l229.517-229.517-105.931-105.931-229.517 229.517c-17.655 17.655-17.655 17.655-17.655 35.31-88.276-52.966-194.207-52.966-282.483-17.655-158.897 70.621-229.517 264.828-141.241 406.069zM498.932 448v0c0 0 17.655 17.655 35.31 17.655 0 0 17.655 17.655 17.655 35.31 52.966 105.931 0 229.517-105.931 282.483s-229.517 0-282.483-105.931c-52.966-105.931 0-229.517 105.931-282.483 70.621-35.31 158.897-17.655 211.862 17.655 0 17.655 17.655 17.655 17.655 35.31zM852.035 200.828l17.655-17.655-105.931-105.931-17.655 17.655 105.931 105.931zM887.346 165.517l17.655-17.655-105.931-105.931-17.655 17.655 105.931 105.931zM922.656 130.207l17.655-17.655-105.931-105.931-17.655 17.655 105.931 105.931zM957.966 94.897l17.655-17.655-105.931-105.931-17.655 17.655 105.931 105.931zM993.277 59.586c17.655-35.31 17.655-70.621 0-105.931v0c-35.31-35.31-70.621-35.31-105.931 0l105.931 105.931z" />
|
||||
<glyph unicode="" glyph-name="unvalidasi" d="M307.2 925.867l238.933-238.933 238.933 238.933c68.267 68.267 170.667 68.267 238.933 0v0c68.267-68.267 68.267-170.667 0-238.933l-238.933-238.933 238.933-238.933c68.267-68.267 68.267-170.667 0-238.933v0c-68.267-68.267-170.667-68.267-238.933 0l-238.933 238.933-238.933-238.933c-68.267-68.267-170.667-68.267-238.933 0v0c-68.267 68.267-68.267 170.667 0 238.933l238.933 238.933-238.933 238.933c-68.267 68.267-68.267 170.667 0 238.933v0c68.267 68.267 170.667 68.267 238.933 0z" />
|
||||
<glyph unicode="" glyph-name="v1" horiz-adv-x="989" d="M1.919 361.057c115.925-77.283 193.208-173.887 212.528-289.811 154.566 270.491 328.453 463.698 521.66 521.66-57.962 77.283-19.321 231.849 19.321 386.415-231.849-154.566-425.057-367.094-560.302-656.906 0 154.566-77.283 270.491-173.887 367.094 38.642-115.925 38.642-231.849-19.321-309.132zM832.712-44.679v502.34l-115.925-19.321v57.962l270.491 38.642v-579.623h-154.566z" />
|
||||
<glyph unicode="" glyph-name="v2" horiz-adv-x="1007" d="M0 354.787c111.856-74.571 186.427-167.784 223.712-279.64 149.141 279.64 316.925 466.067 521.995 503.352-55.928 74.571-18.643 223.712 18.643 372.853-223.712-149.141-410.139-372.853-559.28-652.493-18.643 149.141-74.571 260.997-186.427 372.853 37.285-130.499 37.285-223.712-18.643-316.925zM577.923-55.352v74.571l74.571 93.213c0 0 18.643 18.643 37.285 37.285 93.213 111.856 149.141 186.427 149.141 223.712 0 18.643 0 37.285-18.643 55.928s-37.285 18.643-55.928 18.643-55.928-18.643-74.571-37.285c-18.643-18.643-18.643-55.928-18.643-74.571v0h-74.571c0 55.928 18.643 93.213 55.928 130.499s74.571 55.928 149.141 55.928c55.928 0 111.856-18.643 149.141-55.928s55.928-74.571 55.928-130.499c0-18.643 0-37.285 0-55.928s-18.643-37.285-18.643-55.928c-18.643-18.643-37.285-55.928-55.928-74.571-18.643-37.285-55.928-74.571-111.856-111.856h223.712v-74.571h-410.139z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 8.0 KiB |
BIN
libs/vendor/css/icomoon.ttf
vendored
Normal file
BIN
libs/vendor/css/icomoon.woff
vendored
Normal file
BIN
libs/vendor/css/material-icon.woff2
vendored
Normal file
1
libs/vendor/css/vuetify-old.min.css
vendored
Normal file
10654
libs/vendor/css/vuetify.css
vendored
Normal file
1
libs/vendor/css/vuetify.css.map
vendored
Normal file
5
libs/vendor/css/vuetify.min.css
vendored
Normal file
1
libs/vendor/html5-qrcode.min.js
vendored
Normal file
477
libs/vendor/httpVueLoader.js
vendored
Normal file
@@ -0,0 +1,477 @@
|
||||
(function umd(root,factory){
|
||||
if(typeof module==='object' && typeof exports === 'object' )
|
||||
module.exports=factory()
|
||||
else if(typeof define==='function' && define.amd)
|
||||
define([],factory)
|
||||
else
|
||||
root.httpVueLoader=factory()
|
||||
})(this,function factory() {
|
||||
'use strict';
|
||||
|
||||
var scopeIndex = 0;
|
||||
|
||||
StyleContext.prototype = {
|
||||
|
||||
withBase: function(callback) {
|
||||
|
||||
var tmpBaseElt;
|
||||
if ( this.component.baseURI ) {
|
||||
|
||||
// firefox and chrome need the <base> to be set while inserting or modifying <style> in a document.
|
||||
tmpBaseElt = document.createElement('base');
|
||||
tmpBaseElt.href = this.component.baseURI;
|
||||
|
||||
var headElt = this.component.getHead();
|
||||
headElt.insertBefore(tmpBaseElt, headElt.firstChild);
|
||||
}
|
||||
|
||||
callback.call(this);
|
||||
|
||||
if ( tmpBaseElt )
|
||||
this.component.getHead().removeChild(tmpBaseElt);
|
||||
},
|
||||
|
||||
scopeStyles: function(styleElt, scopeName) {
|
||||
|
||||
function process() {
|
||||
|
||||
var sheet = styleElt.sheet;
|
||||
var rules = sheet.cssRules;
|
||||
|
||||
for ( var i = 0; i < rules.length; ++i ) {
|
||||
|
||||
var rule = rules[i];
|
||||
if ( rule.type !== 1 )
|
||||
continue;
|
||||
|
||||
var scopedSelectors = [];
|
||||
|
||||
rule.selectorText.split(/\s*,\s*/).forEach(function(sel) {
|
||||
|
||||
scopedSelectors.push(scopeName+' '+sel);
|
||||
var segments = sel.match(/([^ :]+)(.+)?/);
|
||||
scopedSelectors.push(segments[1] + scopeName + (segments[2]||''));
|
||||
});
|
||||
|
||||
var scopedRule = scopedSelectors.join(',') + rule.cssText.substr(rule.selectorText.length);
|
||||
sheet.deleteRule(i);
|
||||
sheet.insertRule(scopedRule, i);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// firefox may fail sheet.cssRules with InvalidAccessError
|
||||
process();
|
||||
} catch (ex) {
|
||||
|
||||
if ( ex instanceof DOMException && ex.code === DOMException.INVALID_ACCESS_ERR ) {
|
||||
|
||||
styleElt.sheet.disabled = true;
|
||||
styleElt.addEventListener('load', function onStyleLoaded() {
|
||||
|
||||
styleElt.removeEventListener('load', onStyleLoaded);
|
||||
|
||||
// firefox need this timeout otherwise we have to use document.importNode(style, true)
|
||||
setTimeout(function() {
|
||||
|
||||
process();
|
||||
styleElt.sheet.disabled = false;
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
throw ex;
|
||||
}
|
||||
},
|
||||
|
||||
compile: function() {
|
||||
|
||||
var hasTemplate = this.template !== null;
|
||||
|
||||
var scoped = this.elt.hasAttribute('scoped');
|
||||
|
||||
if ( scoped ) {
|
||||
|
||||
// no template, no scopable style needed
|
||||
if ( !hasTemplate )
|
||||
return;
|
||||
|
||||
// firefox does not tolerate this attribute
|
||||
this.elt.removeAttribute('scoped');
|
||||
}
|
||||
|
||||
this.withBase(function() {
|
||||
|
||||
this.component.getHead().appendChild(this.elt);
|
||||
});
|
||||
|
||||
if ( scoped )
|
||||
this.scopeStyles(this.elt, '['+this.component.getScopeId()+']');
|
||||
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
getContent: function() {
|
||||
|
||||
return this.elt.textContent;
|
||||
},
|
||||
|
||||
setContent: function(content) {
|
||||
|
||||
this.withBase(function() {
|
||||
|
||||
this.elt.textContent = content;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function StyleContext(component, elt) {
|
||||
|
||||
this.component = component;
|
||||
this.elt = elt;
|
||||
}
|
||||
|
||||
|
||||
ScriptContext.prototype = {
|
||||
|
||||
getContent: function() {
|
||||
|
||||
return this.elt.textContent;
|
||||
},
|
||||
|
||||
setContent: function(content) {
|
||||
|
||||
this.elt.textContent = content;
|
||||
},
|
||||
|
||||
compile: function(module) {
|
||||
|
||||
var childModuleRequire = function(childURL) {
|
||||
|
||||
return httpVueLoader.require(resolveURL(this.component.baseURI, childURL));
|
||||
}.bind(this);
|
||||
|
||||
var childLoader = function(childURL, childName) {
|
||||
|
||||
return httpVueLoader(resolveURL(this.component.baseURI, childURL), childName);
|
||||
}.bind(this);
|
||||
|
||||
try {
|
||||
Function('exports', 'require', 'httpVueLoader', 'module', this.getContent()).call(this.module.exports, this.module.exports, childModuleRequire, childLoader, this.module);
|
||||
} catch(ex) {
|
||||
|
||||
if ( !('lineNumber' in ex) ) {
|
||||
|
||||
return Promise.reject(ex);
|
||||
}
|
||||
var vueFileData = responseText.replace(/\r?\n/g, '\n');
|
||||
var lineNumber = vueFileData.substr(0, vueFileData.indexOf(script)).split('\n').length + ex.lineNumber - 1;
|
||||
throw new (ex.constructor)(ex.message, url, lineNumber);
|
||||
}
|
||||
|
||||
return Promise.resolve(this.module.exports)
|
||||
.then(httpVueLoader.scriptExportsHandler.bind(this))
|
||||
.then(function(exports) {
|
||||
|
||||
this.module.exports = exports;
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
function ScriptContext(component, elt) {
|
||||
|
||||
this.component = component;
|
||||
this.elt = elt;
|
||||
this.module = { exports:{} };
|
||||
}
|
||||
|
||||
|
||||
TemplateContext.prototype = {
|
||||
|
||||
getContent: function() {
|
||||
|
||||
return this.elt.innerHTML;
|
||||
},
|
||||
|
||||
setContent: function(content) {
|
||||
|
||||
this.elt.innerHTML = content;
|
||||
},
|
||||
|
||||
getRootElt: function() {
|
||||
|
||||
var tplElt = this.elt.content || this.elt;
|
||||
|
||||
if ( 'firstElementChild' in tplElt )
|
||||
return tplElt.firstElementChild;
|
||||
|
||||
for ( tplElt = tplElt.firstChild; tplElt !== null; tplElt = tplElt.nextSibling )
|
||||
if ( tplElt.nodeType === Node.ELEMENT_NODE )
|
||||
return tplElt;
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
compile: function() {
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
};
|
||||
|
||||
function TemplateContext(component, elt) {
|
||||
|
||||
this.component = component;
|
||||
this.elt = elt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Component.prototype = {
|
||||
|
||||
getHead: function() {
|
||||
|
||||
return document.head || document.getElementsByTagName('head')[0];
|
||||
},
|
||||
|
||||
getScopeId: function() {
|
||||
|
||||
if ( this._scopeId === '' ) {
|
||||
|
||||
this._scopeId = 'data-s-' + (scopeIndex++).toString(36);
|
||||
this.template.getRootElt().setAttribute(this._scopeId, '');
|
||||
}
|
||||
return this._scopeId;
|
||||
},
|
||||
|
||||
load: function(componentURL) {
|
||||
|
||||
return httpVueLoader.httpRequest(componentURL)
|
||||
.then(function(responseText) {
|
||||
|
||||
this.baseURI = componentURL.substr(0, componentURL.lastIndexOf('/')+1);
|
||||
var doc = document.implementation.createHTMLDocument('');
|
||||
|
||||
// IE requires the <base> to come with <style>
|
||||
doc.body.innerHTML = (this.baseURI ? '<base href="'+this.baseURI+'">' : '') + responseText;
|
||||
|
||||
for ( var it = doc.body.firstChild; it; it = it.nextSibling ) {
|
||||
|
||||
switch ( it.nodeName ) {
|
||||
case 'TEMPLATE':
|
||||
this.template = new TemplateContext(this, it);
|
||||
break;
|
||||
case 'SCRIPT':
|
||||
this.script = new ScriptContext(this, it);
|
||||
break;
|
||||
case 'STYLE':
|
||||
this.styles.push(new StyleContext(this, it));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
_normalizeSection: function(eltCx) {
|
||||
|
||||
var p;
|
||||
|
||||
if ( eltCx === null || !eltCx.elt.hasAttribute('src') ) {
|
||||
|
||||
p = Promise.resolve(null);
|
||||
} else {
|
||||
|
||||
p = httpVueLoader.httpRequest(eltCx.elt.getAttribute('src'))
|
||||
.then(function(content) {
|
||||
|
||||
eltCx.elt.removeAttribute('src');
|
||||
return content;
|
||||
});
|
||||
}
|
||||
|
||||
return p
|
||||
.then(function(content) {
|
||||
|
||||
if ( eltCx !== null && eltCx.elt.hasAttribute('lang') ) {
|
||||
|
||||
var lang = eltCx.elt.getAttribute('lang');
|
||||
eltCx.elt.removeAttribute('lang');
|
||||
return httpVueLoader.langProcessor[lang.toLowerCase()].call(this, content === null ? eltCx.getContent() : content);
|
||||
}
|
||||
return content;
|
||||
}.bind(this))
|
||||
.then(function(content) {
|
||||
|
||||
if ( content !== null )
|
||||
eltCx.setContent(content);
|
||||
});
|
||||
},
|
||||
|
||||
normalize: function() {
|
||||
|
||||
return Promise.all(Array.prototype.concat(
|
||||
this._normalizeSection(this.template),
|
||||
this._normalizeSection(this.script),
|
||||
this.styles.map(this._normalizeSection)
|
||||
))
|
||||
.then(function() {
|
||||
|
||||
return this;
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
compile: function() {
|
||||
|
||||
return Promise.all(Array.prototype.concat(
|
||||
this.template && this.template.compile(),
|
||||
this.script && this.script.compile(),
|
||||
this.styles.map(function(style) { return style.compile(); })
|
||||
))
|
||||
.then(function() {
|
||||
|
||||
return this;
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
function Component(name) {
|
||||
|
||||
this.name = name;
|
||||
this.template = null;
|
||||
this.script = null;
|
||||
this.styles = [];
|
||||
this._scopeId = '';
|
||||
}
|
||||
|
||||
function identity(value) {
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
function parseComponentURL(url) {
|
||||
|
||||
var comp = url.match(/(.*?)([^/]+?)\/?(\.vue)?(\?.*|#.*|$)/);
|
||||
return {
|
||||
name: comp[2],
|
||||
url: comp[1] + comp[2] + (comp[3] === undefined ? '/index.vue' : comp[3]) + comp[4]
|
||||
};
|
||||
}
|
||||
|
||||
function resolveURL(baseURL, url) {
|
||||
|
||||
if (url.substr(0, 2) === './' || url.substr(0, 3) === '../') {
|
||||
return baseURL + url;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
httpVueLoader.load = function(url, name) {
|
||||
|
||||
return function() {
|
||||
|
||||
return new Component(name).load(url)
|
||||
.then(function(component) {
|
||||
|
||||
return component.normalize();
|
||||
})
|
||||
.then(function(component) {
|
||||
|
||||
return component.compile();
|
||||
})
|
||||
.then(function(component) {
|
||||
|
||||
var exports = component.script !== null ? component.script.module.exports : {};
|
||||
|
||||
if ( component.template !== null )
|
||||
exports.template = component.template.getContent();
|
||||
|
||||
if ( exports.name === undefined )
|
||||
if ( component.name !== undefined )
|
||||
exports.name = component.name;
|
||||
|
||||
exports._baseURI = component.baseURI;
|
||||
|
||||
return exports;
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
httpVueLoader.register = function(Vue, url) {
|
||||
|
||||
var comp = parseComponentURL(url);
|
||||
Vue.component(comp.name, httpVueLoader.load(comp.url));
|
||||
};
|
||||
|
||||
httpVueLoader.install = function(Vue) {
|
||||
|
||||
Vue.mixin({
|
||||
|
||||
beforeCreate: function () {
|
||||
|
||||
var components = this.$options.components;
|
||||
|
||||
for ( var componentName in components ) {
|
||||
|
||||
if ( typeof(components[componentName]) === 'string' && components[componentName].substr(0, 4) === 'url:' ) {
|
||||
|
||||
var comp = parseComponentURL(components[componentName].substr(4));
|
||||
|
||||
var componentURL = ('_baseURI' in this.$options) ? resolveURL(this.$options._baseURI, comp.url) : comp.url;
|
||||
|
||||
if ( isNaN(componentName) )
|
||||
components[componentName] = httpVueLoader.load(componentURL, componentName);
|
||||
else
|
||||
components[componentName] = Vue.component(comp.name, httpVueLoader.load(componentURL, comp.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
httpVueLoader.require = function(moduleName) {
|
||||
|
||||
return window[moduleName];
|
||||
};
|
||||
|
||||
httpVueLoader.httpRequest = function(url) {
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url);
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
|
||||
if ( xhr.readyState === 4 ) {
|
||||
|
||||
if ( xhr.status >= 200 && xhr.status < 300 )
|
||||
resolve(xhr.responseText);
|
||||
else
|
||||
reject(xhr.status);
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send(null);
|
||||
});
|
||||
};
|
||||
|
||||
httpVueLoader.langProcessor = {
|
||||
html: identity,
|
||||
js: identity,
|
||||
css: identity
|
||||
};
|
||||
|
||||
httpVueLoader.scriptExportsHandler = identity;
|
||||
|
||||
function httpVueLoader(url, name) {
|
||||
|
||||
var comp = parseComponentURL(url);
|
||||
return httpVueLoader.load(comp.url, name);
|
||||
}
|
||||
|
||||
return httpVueLoader;
|
||||
});
|
||||
17107
libs/vendor/lodash.js
vendored
Normal file
1
libs/vendor/map/.babelrc
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
libs/vendor/map/vue-google-maps.js
vendored
Normal file
86
libs/vendor/merge-images.js
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global.mergeImages = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
// Defaults
|
||||
var defaultOptions = {
|
||||
format: 'image/png',
|
||||
quality: 0.92,
|
||||
width: undefined,
|
||||
height: undefined,
|
||||
Canvas: undefined,
|
||||
crossOrigin: undefined
|
||||
};
|
||||
|
||||
// Return Promise
|
||||
var mergeImages = function (sources, options) {
|
||||
if ( sources === void 0 ) sources = [];
|
||||
if ( options === void 0 ) options = {};
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
options = Object.assign({}, defaultOptions, options);
|
||||
|
||||
// Setup browser/Node.js specific variables
|
||||
var canvas = options.Canvas ? new options.Canvas() : window.document.createElement('canvas');
|
||||
var Image = options.Image || window.Image;
|
||||
|
||||
// Load sources
|
||||
var images = sources.map(function (source) { return new Promise(function (resolve, reject) {
|
||||
// Convert sources to objects
|
||||
if (source.constructor.name !== 'Object') {
|
||||
source = { src: source };
|
||||
}
|
||||
|
||||
// Resolve source and img when loaded
|
||||
var img = new Image();
|
||||
img.crossOrigin = options.crossOrigin;
|
||||
img.onerror = function () { return reject(new Error('Couldn\'t load image')); };
|
||||
img.onload = function () { return resolve(Object.assign({}, source, { img: img })); };
|
||||
img.src = source.src;
|
||||
}); });
|
||||
|
||||
// Get canvas context
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
// When sources have loaded
|
||||
resolve(Promise.all(images)
|
||||
.then(function (images) {
|
||||
// Set canvas dimensions
|
||||
var getSize = function (dim) { return options[dim] || Math.max.apply(Math, images.map(function (image) { return image.img[dim]; })); };
|
||||
canvas.width = getSize('width');
|
||||
canvas.height = getSize('height');
|
||||
|
||||
// Draw images to canvas
|
||||
images.forEach(function (image) {
|
||||
ctx.globalAlpha = image.opacity ? image.opacity : 1;
|
||||
return ctx.drawImage(image.img, image.x || 0, image.y || 0);
|
||||
});
|
||||
|
||||
if (options.Canvas && options.format === 'image/jpeg') {
|
||||
// Resolve data URI for node-canvas jpeg async
|
||||
return new Promise(function (resolve, reject) {
|
||||
canvas.toDataURL(options.format, {
|
||||
quality: options.quality,
|
||||
progressive: false
|
||||
}, function (err, jpeg) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
resolve(jpeg);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Resolve all other data URIs sync
|
||||
return canvas.toDataURL(options.format, options.quality);
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
return mergeImages;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=index.umd.js.map
|
||||
81
libs/vendor/moment-locale-id.js
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
//! moment.js locale configuration
|
||||
|
||||
;(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined'
|
||||
&& typeof require === 'function' ? factory(require('../moment')) :
|
||||
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
||||
factory(global.moment)
|
||||
}(this, (function (moment) { 'use strict';
|
||||
|
||||
|
||||
var id = moment.defineLocale('id', {
|
||||
months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
|
||||
monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
|
||||
weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
|
||||
weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
|
||||
weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
|
||||
longDateFormat : {
|
||||
LT : 'HH.mm',
|
||||
LTS : 'HH.mm.ss',
|
||||
L : 'DD/MM/YYYY',
|
||||
LL : 'D MMMM YYYY',
|
||||
LLL : 'D MMMM YYYY [pukul] HH.mm',
|
||||
LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
|
||||
},
|
||||
meridiemParse: /pagi|siang|sore|malam/,
|
||||
meridiemHour : function (hour, meridiem) {
|
||||
if (hour === 12) {
|
||||
hour = 0;
|
||||
}
|
||||
if (meridiem === 'pagi') {
|
||||
return hour;
|
||||
} else if (meridiem === 'siang') {
|
||||
return hour >= 11 ? hour : hour + 12;
|
||||
} else if (meridiem === 'sore' || meridiem === 'malam') {
|
||||
return hour + 12;
|
||||
}
|
||||
},
|
||||
meridiem : function (hours, minutes, isLower) {
|
||||
if (hours < 11) {
|
||||
return 'pagi';
|
||||
} else if (hours < 15) {
|
||||
return 'siang';
|
||||
} else if (hours < 19) {
|
||||
return 'sore';
|
||||
} else {
|
||||
return 'malam';
|
||||
}
|
||||
},
|
||||
calendar : {
|
||||
sameDay : '[Hari ini pukul] LT',
|
||||
nextDay : '[Besok pukul] LT',
|
||||
nextWeek : 'dddd [pukul] LT',
|
||||
lastDay : '[Kemarin pukul] LT',
|
||||
lastWeek : 'dddd [lalu pukul] LT',
|
||||
sameElse : 'L'
|
||||
},
|
||||
relativeTime : {
|
||||
future : 'dalam %s',
|
||||
past : '%s yang lalu',
|
||||
s : 'beberapa detik',
|
||||
ss : '%d detik',
|
||||
m : 'semenit',
|
||||
mm : '%d menit',
|
||||
h : 'sejam',
|
||||
hh : '%d jam',
|
||||
d : 'sehari',
|
||||
dd : '%d hari',
|
||||
M : 'sebulan',
|
||||
MM : '%d bulan',
|
||||
y : 'setahun',
|
||||
yy : '%d tahun'
|
||||
},
|
||||
week : {
|
||||
dow : 1, // Monday is the first day of the week.
|
||||
doy : 7 // The week that contains Jan 1st is the first week of the year.
|
||||
}
|
||||
});
|
||||
|
||||
return id;
|
||||
|
||||
})));
|
||||
1
libs/vendor/moment.min.js
vendored
Normal file
8
libs/vendor/numeral.min.js
vendored
Normal file
21
libs/vendor/qrcanvas/LICENSE
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Gerald
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
95
libs/vendor/qrcanvas/README.md
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
# QRCanvas
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
This is a QRCode generator written in pure javascript.
|
||||
|
||||
Based on [Kazuhiko Arase's QRCode](http://www.d-project.com/).
|
||||
|
||||
The only requirement is that the browser works with a `canvas`,
|
||||
which is supported by most modern browsers.
|
||||
|
||||
## Usage
|
||||
|
||||
### With bundlers
|
||||
|
||||
Install as a dependency:
|
||||
|
||||
```sh
|
||||
$ yarn add qrcanvas
|
||||
# or
|
||||
$ npm install qrcanvas -S
|
||||
```
|
||||
|
||||
Use as a module:
|
||||
|
||||
``` js
|
||||
import { qrcanvas } from 'qrcanvas';
|
||||
|
||||
const canvas = qrcanvas({
|
||||
data: 'hello, world'
|
||||
});
|
||||
document.body.appendChild(canvas);
|
||||
```
|
||||
|
||||
### Browser
|
||||
|
||||
Load from CDN:
|
||||
|
||||
``` html
|
||||
<div id="qrcode"></div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/qrcanvas@3"></script>
|
||||
```
|
||||
|
||||
The module is mounted to a global variable named `qrcanvas`:
|
||||
|
||||
``` js
|
||||
const canvas = qrcanvas.qrcanvas({
|
||||
data: 'hello, world'
|
||||
});
|
||||
document.getElementById('qrcode').appendChild(canvas);
|
||||
```
|
||||
|
||||
### Node.js
|
||||
|
||||
[node-canvas](https://github.com/Automattic/node-canvas) is required in Node.js.
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```sh
|
||||
$ yarn add qrcanvas canvas
|
||||
```
|
||||
|
||||
``` js
|
||||
const fs = require('fs');
|
||||
const { qrcanvas, setCanvasModule } = require('qrcanvas');
|
||||
|
||||
// Enable node-canvas
|
||||
setCanvasModule(require('canvas'));
|
||||
|
||||
const canvas = qrcanvas({
|
||||
data: 'hello, world'
|
||||
});
|
||||
// canvas is an instance of `node-canvas`
|
||||
canvas.pngStream().pipe(fs.createWriteStream('qrcode.png'));
|
||||
```
|
||||
|
||||
## Documents
|
||||
|
||||
- [Docs](https://github.com/gera2ld/qrcanvas/wiki)
|
||||
- [Demo](https://gera2ld.github.io/qrcanvas/)
|
||||
- [Examples](https://gera2ld.github.io/qrcanvas/examples/)
|
||||
|
||||
## Related
|
||||
|
||||
- [qrcanvas-vue](https://github.com/gera2ld/qrcanvas-vue)
|
||||
- [qrcanvas-react](https://github.com/gera2ld/qrcanvas-react)
|
||||
|
||||
## Snapshots
|
||||
|
||||

|
||||
|
||||

|
||||
732
libs/vendor/qrcanvas/lib/qrcanvas.common.js
vendored
Normal file
@@ -0,0 +1,732 @@
|
||||
/*! qrcanvas v3.1.2 | ISC License */
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');
|
||||
var _extends = require('@babel/runtime/helpers/extends');
|
||||
var qrcode = require('qrcode-generator');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
||||
|
||||
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
|
||||
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
||||
var qrcode__default = /*#__PURE__*/_interopDefaultLegacy(qrcode);
|
||||
|
||||
var COLOR_BLACK = '#000';
|
||||
var COLOR_WHITE = '#fff';
|
||||
|
||||
var helpers = {
|
||||
createCanvas: createCanvas,
|
||||
isCanvas: isCanvas,
|
||||
isDrawable: isDrawable,
|
||||
getCanvas: getCanvas,
|
||||
updateCanvas: updateCanvas,
|
||||
drawCanvas: drawCanvas,
|
||||
drawText: drawText
|
||||
};
|
||||
|
||||
function createCanvas(width, height) {
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
return canvas;
|
||||
}
|
||||
|
||||
function isCanvas(el) {
|
||||
return el instanceof HTMLCanvasElement;
|
||||
}
|
||||
|
||||
function isDrawable(el) {
|
||||
return isCanvas(el) || el instanceof HTMLImageElement;
|
||||
}
|
||||
/**
|
||||
* @desc Create a new canvas.
|
||||
* @param {Int} width Width of the canvas.
|
||||
* @param {Int} height Height of the canvas.
|
||||
* @return {Canvas}
|
||||
*/
|
||||
|
||||
|
||||
function getCanvas(width, height) {
|
||||
return helpers.createCanvas(width, height == null ? width : height);
|
||||
}
|
||||
|
||||
function updateCanvas(canvas, width, height) {
|
||||
if (canvas) {
|
||||
canvas.width = width;
|
||||
canvas.height = height == null ? width : height;
|
||||
return canvas;
|
||||
}
|
||||
|
||||
return getCanvas(width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc Draw to the canvas with given image or colors.
|
||||
* @param {Canvas} canvas The canvas to initialize.
|
||||
* @param {Image | String | Array} data
|
||||
* @param {Object} options
|
||||
* cellSize: {Int}
|
||||
* clear: {Boolean}
|
||||
*/
|
||||
function drawCanvas(canvas, data, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var _options = options,
|
||||
cellSize = _options.cellSize,
|
||||
context = _options.context,
|
||||
_options$clear = _options.clear,
|
||||
clear = _options$clear === void 0 ? true : _options$clear;
|
||||
var width = canvas.width,
|
||||
height = canvas.height;
|
||||
var queue = [data];
|
||||
var ctx = context || canvas.getContext('2d');
|
||||
if (clear) ctx.clearRect(0, 0, width, height);
|
||||
ctx.globalCompositeOperation = 'source-over';
|
||||
|
||||
while (queue.length) {
|
||||
var item = queue.shift();
|
||||
|
||||
if (Array.isArray(item)) {
|
||||
queue = item.concat(queue);
|
||||
} else if (item) {
|
||||
var obj = void 0;
|
||||
|
||||
if (helpers.isDrawable(item)) {
|
||||
obj = {
|
||||
image: item
|
||||
};
|
||||
} else if (typeof item === 'string') {
|
||||
obj = {
|
||||
style: item
|
||||
};
|
||||
} else {
|
||||
obj = item;
|
||||
}
|
||||
|
||||
var x = (obj.col == null ? obj.x : obj.col * cellSize) || 0;
|
||||
var y = (obj.row == null ? obj.y : obj.row * cellSize) || 0;
|
||||
if (x < 0) x += width;
|
||||
if (y < 0) y += width;
|
||||
var w = ('cols' in obj ? obj.cols * cellSize : obj.w) || width;
|
||||
var h = ('rows' in obj ? obj.rows * cellSize : obj.h) || width;
|
||||
|
||||
if (obj.image) {
|
||||
ctx.drawImage(obj.image, x, y, w, h);
|
||||
} else {
|
||||
ctx.fillStyle = obj.style || 'black';
|
||||
ctx.fillRect(x, y, w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
||||
function drawText(text, options) {
|
||||
var _ref = options || {},
|
||||
_ref$fontSize = _ref.fontSize,
|
||||
fontSize = _ref$fontSize === void 0 ? 64 : _ref$fontSize,
|
||||
_ref$fontStyle = _ref.fontStyle,
|
||||
fontStyle = _ref$fontStyle === void 0 ? '' : _ref$fontStyle,
|
||||
_ref$fontFamily = _ref.fontFamily,
|
||||
fontFamily = _ref$fontFamily === void 0 ? 'Cursive' : _ref$fontFamily,
|
||||
_ref$color = _ref.color,
|
||||
color = _ref$color === void 0 ? null : _ref$color,
|
||||
_ref$pad = _ref.pad,
|
||||
pad = _ref$pad === void 0 ? 8 : _ref$pad,
|
||||
_ref$padColor = _ref.padColor,
|
||||
padColor = _ref$padColor === void 0 ? COLOR_WHITE : _ref$padColor,
|
||||
_ref$mode = _ref.mode,
|
||||
mode = _ref$mode === void 0 ? 1 : _ref$mode;
|
||||
|
||||
var canvas = getCanvas(1);
|
||||
var ctx = canvas.getContext('2d');
|
||||
var padColorArr;
|
||||
|
||||
if (padColor) {
|
||||
ctx.fillStyle = padColor;
|
||||
ctx.fillRect(0, 0, 1, 1);
|
||||
|
||||
var _ctx$getImageData = ctx.getImageData(0, 0, 1, 1);
|
||||
|
||||
padColorArr = _ctx$getImageData.data;
|
||||
if (!padColorArr[3]) padColorArr = null;
|
||||
}
|
||||
|
||||
var height = fontSize + 2 * pad;
|
||||
var font = [fontStyle, fontSize + "px", fontFamily].filter(Boolean).join(' ');
|
||||
|
||||
var resetContext = function resetContext() {
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.font = font;
|
||||
};
|
||||
|
||||
resetContext();
|
||||
var width = Math.ceil(ctx.measureText(text).width) + 2 * pad;
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
resetContext();
|
||||
|
||||
var fillText = function fillText() {
|
||||
ctx.fillStyle = color || COLOR_BLACK;
|
||||
ctx.fillText(text, width / 2, height / 2);
|
||||
};
|
||||
|
||||
if (mode === 1) {
|
||||
ctx.fillStyle = padColor;
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
fillText();
|
||||
} else {
|
||||
fillText();
|
||||
|
||||
if (padColorArr) {
|
||||
(function () {
|
||||
var imageData = ctx.getImageData(0, 0, width, height);
|
||||
var data = imageData.data;
|
||||
var total = width * height;
|
||||
var padded = [];
|
||||
var offset = 0;
|
||||
|
||||
var _loop = function _loop(loop) {
|
||||
var current = [];
|
||||
var unique = {};
|
||||
padded[offset] = current;
|
||||
offset = 1 - offset;
|
||||
var last = padded[offset];
|
||||
|
||||
if (!last) {
|
||||
last = [];
|
||||
|
||||
for (var i = 0; i < total; i += 1) {
|
||||
last.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
last.forEach(function (i) {
|
||||
if (data[4 * i + 3]) {
|
||||
[i % width ? i - 1 : -1, (i + 1) % width ? i + 1 : -1, i - width, i + width].forEach(function (j) {
|
||||
var k = 4 * j;
|
||||
|
||||
if (k >= 0 && k <= data.length && !unique[j]) {
|
||||
unique[j] = 1;
|
||||
current.push(j);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
current.forEach(function (i) {
|
||||
var j = 4 * i;
|
||||
|
||||
if (!data[j + 3]) {
|
||||
for (var k = 0; k < 4; k += 1) {
|
||||
data[j + k] = padColorArr[k];
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
for (var loop = 0; loop < pad; loop += 1) {
|
||||
_loop();
|
||||
}
|
||||
|
||||
ctx.putImageData(imageData, 0, 0);
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
||||
var effects = {
|
||||
"default": renderDefault,
|
||||
round: renderRound,
|
||||
fusion: renderFusion,
|
||||
spot: renderSpot
|
||||
};
|
||||
|
||||
function renderDefault(_ref) {
|
||||
var foreground = _ref.foreground,
|
||||
cellSize = _ref.cellSize,
|
||||
isDark = _ref.isDark,
|
||||
count = _ref.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var context = canvasMask.getContext('2d');
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref2) {
|
||||
var i = _ref2.i,
|
||||
j = _ref2.j,
|
||||
x = _ref2.x,
|
||||
y = _ref2.y;
|
||||
|
||||
if (isDark(i, j)) {
|
||||
context.fillRect(x, y, cellSize, cellSize);
|
||||
}
|
||||
});
|
||||
var canvasFg = getCanvas(width);
|
||||
drawCanvas(canvasFg, foreground, {
|
||||
cellSize: cellSize
|
||||
});
|
||||
var ctx = canvasFg.getContext('2d');
|
||||
ctx.globalCompositeOperation = 'destination-in';
|
||||
ctx.drawImage(canvasMask, 0, 0);
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function renderRound(_ref3, maskOptions) {
|
||||
var foreground = _ref3.foreground,
|
||||
cellSize = _ref3.cellSize,
|
||||
isDark = _ref3.isDark,
|
||||
count = _ref3.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var _maskOptions$value = maskOptions.value,
|
||||
value = _maskOptions$value === void 0 ? 1 : _maskOptions$value;
|
||||
var radius = value * cellSize / 2;
|
||||
var context = canvasMask.getContext('2d');
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref4) {
|
||||
var i = _ref4.i,
|
||||
j = _ref4.j,
|
||||
x = _ref4.x,
|
||||
y = _ref4.y;
|
||||
|
||||
if (isDark(i, j)) {
|
||||
context.beginPath();
|
||||
context.moveTo(x + 0.5 * cellSize, y);
|
||||
drawCorner(context, x + cellSize, y, x + cellSize, y + 0.5 * cellSize, radius);
|
||||
drawCorner(context, x + cellSize, y + cellSize, x + 0.5 * cellSize, y + cellSize, radius);
|
||||
drawCorner(context, x, y + cellSize, x, y + 0.5 * cellSize, radius);
|
||||
drawCorner(context, x, y, x + 0.5 * cellSize, y, radius); // context.closePath();
|
||||
|
||||
context.fill();
|
||||
}
|
||||
});
|
||||
var canvasFg = getCanvas(width);
|
||||
drawCanvas(canvasFg, foreground, {
|
||||
cellSize: cellSize
|
||||
});
|
||||
var ctx = canvasFg.getContext('2d');
|
||||
ctx.globalCompositeOperation = 'destination-in';
|
||||
ctx.drawImage(canvasMask, 0, 0);
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function renderFusion(_ref5, maskOptions) {
|
||||
var foreground = _ref5.foreground,
|
||||
cellSize = _ref5.cellSize,
|
||||
isDark = _ref5.isDark,
|
||||
count = _ref5.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var context = canvasMask.getContext('2d');
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
var _maskOptions$value2 = maskOptions.value,
|
||||
value = _maskOptions$value2 === void 0 ? 1 : _maskOptions$value2;
|
||||
var radius = value * cellSize / 2;
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref6) {
|
||||
var i = _ref6.i,
|
||||
j = _ref6.j,
|
||||
x = _ref6.x,
|
||||
y = _ref6.y;
|
||||
var corners = [0, 0, 0, 0]; // NW, NE, SE, SW
|
||||
|
||||
if (isDark(i - 1, j)) {
|
||||
corners[0] += 1;
|
||||
corners[1] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i + 1, j)) {
|
||||
corners[2] += 1;
|
||||
corners[3] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i, j - 1)) {
|
||||
corners[0] += 1;
|
||||
corners[3] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i, j + 1)) {
|
||||
corners[1] += 1;
|
||||
corners[2] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i, j)) {
|
||||
if (isDark(i - 1, j - 1)) corners[0] += 1;
|
||||
if (isDark(i - 1, j + 1)) corners[1] += 1;
|
||||
if (isDark(i + 1, j + 1)) corners[2] += 1;
|
||||
if (isDark(i + 1, j - 1)) corners[3] += 1;
|
||||
context.beginPath();
|
||||
context.moveTo(x + 0.5 * cellSize, y);
|
||||
drawCorner(context, x + cellSize, y, x + cellSize, y + 0.5 * cellSize, corners[1] ? 0 : radius);
|
||||
drawCorner(context, x + cellSize, y + cellSize, x + 0.5 * cellSize, y + cellSize, corners[2] ? 0 : radius);
|
||||
drawCorner(context, x, y + cellSize, x, y + 0.5 * cellSize, corners[3] ? 0 : radius);
|
||||
drawCorner(context, x, y, x + 0.5 * cellSize, y, corners[0] ? 0 : radius); // context.closePath();
|
||||
|
||||
context.fill();
|
||||
} else {
|
||||
if (corners[0] === 2) {
|
||||
fillCorner(context, x, y + 0.5 * cellSize, x, y, x + 0.5 * cellSize, y, radius);
|
||||
}
|
||||
|
||||
if (corners[1] === 2) {
|
||||
fillCorner(context, x + 0.5 * cellSize, y, x + cellSize, y, x + cellSize, y + 0.5 * cellSize, radius);
|
||||
}
|
||||
|
||||
if (corners[2] === 2) {
|
||||
fillCorner(context, x + cellSize, y + 0.5 * cellSize, x + cellSize, y + cellSize, x + 0.5 * cellSize, y + cellSize, radius);
|
||||
}
|
||||
|
||||
if (corners[3] === 2) {
|
||||
fillCorner(context, x + 0.5 * cellSize, y + cellSize, x, y + cellSize, x, y + 0.5 * cellSize, radius);
|
||||
}
|
||||
}
|
||||
});
|
||||
var canvasFg = getCanvas(width);
|
||||
drawCanvas(canvasFg, foreground, {
|
||||
cellSize: cellSize
|
||||
});
|
||||
var ctx = canvasFg.getContext('2d');
|
||||
ctx.globalCompositeOperation = 'destination-in';
|
||||
ctx.drawImage(canvasMask, 0, 0);
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function renderSpot(_ref7, maskOptions) {
|
||||
var foreground = _ref7.foreground,
|
||||
cellSize = _ref7.cellSize,
|
||||
isDark = _ref7.isDark,
|
||||
count = _ref7.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var value = maskOptions.value,
|
||||
_maskOptions$foregrou = maskOptions.foregroundLight,
|
||||
foregroundLight = _maskOptions$foregrou === void 0 ? COLOR_WHITE : _maskOptions$foregrou;
|
||||
var context = canvasMask.getContext('2d');
|
||||
var canvasLayer = getCanvas(width);
|
||||
var canvasFg = getCanvas(width);
|
||||
var ctxLayer = canvasLayer.getContext('2d');
|
||||
[{
|
||||
dark: true,
|
||||
foreground: foreground
|
||||
}, {
|
||||
dark: false,
|
||||
foreground: foregroundLight
|
||||
}].forEach(function (item) {
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
context.clearRect(0, 0, width, width);
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref8) {
|
||||
var i = _ref8.i,
|
||||
j = _ref8.j,
|
||||
x = _ref8.x,
|
||||
y = _ref8.y;
|
||||
|
||||
if (isDark(i, j) ^ +!item.dark) {
|
||||
var fillSize;
|
||||
|
||||
if (i <= 7 && j <= 7 || i <= 7 && count - j - 1 <= 7 || count - i - 1 <= 7 && j <= 7 || i + 5 <= count && i + 9 >= count && j + 5 <= count && j + 9 >= count || i === 7 || j === 7) {
|
||||
fillSize = 1 - 0.1 * value;
|
||||
} else {
|
||||
fillSize = 0.25;
|
||||
}
|
||||
|
||||
var offset = (1 - fillSize) / 2;
|
||||
context.fillRect(x + offset * cellSize, y + offset * cellSize, fillSize * cellSize, fillSize * cellSize);
|
||||
}
|
||||
});
|
||||
drawCanvas(canvasLayer, item.foreground, {
|
||||
cellSize: cellSize,
|
||||
context: ctxLayer
|
||||
});
|
||||
ctxLayer.globalCompositeOperation = 'destination-in';
|
||||
ctxLayer.drawImage(canvasMask, 0, 0);
|
||||
drawCanvas(canvasFg, canvasLayer, {
|
||||
cellSize: cellSize,
|
||||
clear: false
|
||||
});
|
||||
});
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function drawCells(_ref9, drawEach) {
|
||||
var cellSize = _ref9.cellSize,
|
||||
count = _ref9.count;
|
||||
|
||||
for (var i = 0; i < count; i += 1) {
|
||||
for (var j = 0; j < count; j += 1) {
|
||||
var x = j * cellSize;
|
||||
var y = i * cellSize;
|
||||
drawEach({
|
||||
i: i,
|
||||
j: j,
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function drawCorner(ctx, cornerX, cornerY, x, y, r) {
|
||||
if (r) {
|
||||
ctx.arcTo(cornerX, cornerY, x, y, r);
|
||||
} else {
|
||||
ctx.lineTo(cornerX, cornerY);
|
||||
ctx.lineTo(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
function fillCorner(context, startX, startY, cornerX, cornerY, destX, destY, radius) {
|
||||
context.beginPath();
|
||||
context.moveTo(startX, startY);
|
||||
drawCorner(context, cornerX, cornerY, destX, destY, radius);
|
||||
context.lineTo(cornerX, cornerY);
|
||||
context.lineTo(startX, startY); // context.closePath();
|
||||
|
||||
context.fill();
|
||||
}
|
||||
|
||||
// Enable UTF_8 support
|
||||
qrcode__default.stringToBytes = qrcode__default.stringToBytesFuncs['UTF-8'];
|
||||
var DEFAULTS = {
|
||||
background: 'white',
|
||||
foreground: 'black',
|
||||
typeNumber: 0,
|
||||
correctLevel: 'L',
|
||||
data: '',
|
||||
padding: 0,
|
||||
resize: true
|
||||
};
|
||||
|
||||
var QRCanvasRenderer = /*#__PURE__*/function () {
|
||||
function QRCanvasRenderer(options) {
|
||||
var _this = this;
|
||||
|
||||
this.options = _extends__default({}, DEFAULTS);
|
||||
this.cache = {};
|
||||
|
||||
this.isDark = function (i, j) {
|
||||
var _this$cache = _this.cache,
|
||||
qr = _this$cache.qr,
|
||||
count = _this$cache.count;
|
||||
if (i < 0 || i >= count || j < 0 || j >= count) return false;
|
||||
return qr.isDark(i, j);
|
||||
};
|
||||
|
||||
this.setOptions(options);
|
||||
}
|
||||
|
||||
var _proto = QRCanvasRenderer.prototype;
|
||||
|
||||
_proto.render = function render(canvas, config) {
|
||||
if (config === void 0) {
|
||||
config = {};
|
||||
}
|
||||
|
||||
var _this$options = this.options,
|
||||
background = _this$options.background,
|
||||
foreground = _this$options.foreground,
|
||||
padding = _this$options.padding,
|
||||
effect = _this$options.effect,
|
||||
logo = _this$options.logo,
|
||||
resize = _this$options.resize;
|
||||
var onRender = effects[effect.type] || effects["default"];
|
||||
var count = this.cache.count;
|
||||
var drawCanvas = helpers.drawCanvas;
|
||||
var _config = config,
|
||||
size = _config.size;
|
||||
var canvasOut;
|
||||
var canvasBg;
|
||||
var canvasFg; // Prepare output canvas, resize it if cellSize or size is provided.
|
||||
|
||||
{
|
||||
var _config2 = config,
|
||||
cellSize = _config2.cellSize;
|
||||
if (!canvas && !cellSize && !size) cellSize = 6;
|
||||
if (cellSize) size = count * cellSize + padding + padding;
|
||||
|
||||
if (size) {
|
||||
canvasOut = resize || !canvas ? helpers.updateCanvas(canvas, size) : canvas;
|
||||
} else {
|
||||
size = canvas.width;
|
||||
canvasOut = canvas;
|
||||
}
|
||||
}
|
||||
var contentSize = size - padding - padding; // Create foreground and background layers on canvas
|
||||
|
||||
{
|
||||
var _cellSize = Math.ceil(contentSize / count);
|
||||
|
||||
var sketchSize = _cellSize * count;
|
||||
canvasBg = helpers.getCanvas(_cellSize * count);
|
||||
drawCanvas(canvasBg, background, {
|
||||
cellSize: _cellSize
|
||||
});
|
||||
canvasFg = onRender(_extends__default({
|
||||
foreground: foreground,
|
||||
cellSize: _cellSize,
|
||||
isDark: this.isDark
|
||||
}, this.cache), this.options.effect); // draw logo
|
||||
|
||||
if (logo) {
|
||||
var logoLayer = _extends__default({}, logo);
|
||||
|
||||
if (!logo.w && !logo.h && !logo.cols && !logo.rows) {
|
||||
var _ref = logo.image,
|
||||
width = _ref.width,
|
||||
height = _ref.height;
|
||||
var imageRatio = width / height;
|
||||
var posRatio = Math.min((count - 18) / count, 0.38);
|
||||
var h = Math.min(height, sketchSize * posRatio, sketchSize * posRatio / imageRatio);
|
||||
var w = h * imageRatio;
|
||||
var x = (sketchSize - w) / 2;
|
||||
var y = (sketchSize - h) / 2;
|
||||
logoLayer.w = w;
|
||||
logoLayer.h = h;
|
||||
logoLayer.x = x;
|
||||
logoLayer.y = y;
|
||||
}
|
||||
|
||||
drawCanvas(canvasFg, logoLayer, {
|
||||
clear: false
|
||||
});
|
||||
}
|
||||
} // Combine the layers
|
||||
|
||||
drawCanvas(canvasOut, [{
|
||||
image: canvasBg
|
||||
}, {
|
||||
image: canvasFg,
|
||||
x: padding,
|
||||
y: padding,
|
||||
w: contentSize,
|
||||
h: contentSize
|
||||
}]);
|
||||
return canvasOut;
|
||||
};
|
||||
|
||||
_proto.setOptions = function setOptions(options) {
|
||||
this.options = _extends__default({}, this.options, options);
|
||||
this.normalizeEffect();
|
||||
this.normalizeLogo();
|
||||
var _this$options2 = this.options,
|
||||
typeNumber = _this$options2.typeNumber,
|
||||
data = _this$options2.data,
|
||||
logo = _this$options2.logo; // L / M / Q / H
|
||||
|
||||
var correctLevel = this.options.correctLevel;
|
||||
if (logo && ['Q', 'H'].indexOf(correctLevel) < 0) correctLevel = 'H';
|
||||
var qr = qrcode__default(typeNumber, correctLevel);
|
||||
qr.addData(data || '');
|
||||
qr.make();
|
||||
var count = qr.getModuleCount();
|
||||
this.cache = {
|
||||
qr: qr,
|
||||
count: count
|
||||
};
|
||||
};
|
||||
|
||||
_proto.normalizeEffect = function normalizeEffect() {
|
||||
var effect = this.options.effect;
|
||||
|
||||
if (typeof effect === 'string') {
|
||||
effect = {
|
||||
type: effect
|
||||
};
|
||||
}
|
||||
|
||||
this.options.effect = effect || {};
|
||||
};
|
||||
|
||||
_proto.normalizeLogo = function normalizeLogo() {
|
||||
var isDrawable = helpers.isDrawable,
|
||||
drawText = helpers.drawText;
|
||||
var logo = this.options.logo;
|
||||
|
||||
if (logo) {
|
||||
if (isDrawable(logo)) {
|
||||
logo = {
|
||||
image: logo
|
||||
};
|
||||
} else if (!isDrawable(logo.image)) {
|
||||
if (typeof logo === 'string') {
|
||||
logo = {
|
||||
text: logo
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof logo.text === 'string') {
|
||||
logo = {
|
||||
image: drawText(logo.text, logo.options)
|
||||
};
|
||||
} else {
|
||||
logo = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.options.logo = logo;
|
||||
};
|
||||
|
||||
return QRCanvasRenderer;
|
||||
}();
|
||||
|
||||
function qrcanvas(options) {
|
||||
var canvas = options.canvas,
|
||||
size = options.size,
|
||||
cellSize = options.cellSize,
|
||||
rest = _objectWithoutPropertiesLoose__default(options, ["canvas", "size", "cellSize"]);
|
||||
|
||||
var renderer = new QRCanvasRenderer(rest);
|
||||
return renderer.render(canvas, {
|
||||
size: size,
|
||||
cellSize: cellSize
|
||||
});
|
||||
}
|
||||
|
||||
function setCanvasModule(canvasModule) {
|
||||
var Canvas = canvasModule.Canvas,
|
||||
Image = canvasModule.Image,
|
||||
createCanvas = canvasModule.createCanvas;
|
||||
|
||||
var isCanvas = function isCanvas(el) {
|
||||
return el instanceof Canvas;
|
||||
};
|
||||
|
||||
var isDrawable = function isDrawable(el) {
|
||||
return isCanvas(el) || el instanceof Image;
|
||||
};
|
||||
|
||||
helpers.createCanvas = createCanvas;
|
||||
helpers.isCanvas = isCanvas;
|
||||
helpers.isDrawable = isDrawable;
|
||||
}
|
||||
|
||||
exports.effects = effects;
|
||||
exports.helpers = helpers;
|
||||
exports.qrcanvas = qrcanvas;
|
||||
exports.setCanvasModule = setCanvasModule;
|
||||
719
libs/vendor/qrcanvas/lib/qrcanvas.esm.js
vendored
Normal file
@@ -0,0 +1,719 @@
|
||||
/*! qrcanvas v3.1.2 | ISC License */
|
||||
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
||||
import _extends from '@babel/runtime/helpers/esm/extends';
|
||||
import qrcode from 'qrcode-generator';
|
||||
|
||||
var COLOR_BLACK = '#000';
|
||||
var COLOR_WHITE = '#fff';
|
||||
|
||||
var helpers = {
|
||||
createCanvas: createCanvas,
|
||||
isCanvas: isCanvas,
|
||||
isDrawable: isDrawable,
|
||||
getCanvas: getCanvas,
|
||||
updateCanvas: updateCanvas,
|
||||
drawCanvas: drawCanvas,
|
||||
drawText: drawText
|
||||
};
|
||||
|
||||
function createCanvas(width, height) {
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
return canvas;
|
||||
}
|
||||
|
||||
function isCanvas(el) {
|
||||
return el instanceof HTMLCanvasElement;
|
||||
}
|
||||
|
||||
function isDrawable(el) {
|
||||
return isCanvas(el) || el instanceof HTMLImageElement;
|
||||
}
|
||||
/**
|
||||
* @desc Create a new canvas.
|
||||
* @param {Int} width Width of the canvas.
|
||||
* @param {Int} height Height of the canvas.
|
||||
* @return {Canvas}
|
||||
*/
|
||||
|
||||
|
||||
function getCanvas(width, height) {
|
||||
return helpers.createCanvas(width, height == null ? width : height);
|
||||
}
|
||||
|
||||
function updateCanvas(canvas, width, height) {
|
||||
if (canvas) {
|
||||
canvas.width = width;
|
||||
canvas.height = height == null ? width : height;
|
||||
return canvas;
|
||||
}
|
||||
|
||||
return getCanvas(width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc Draw to the canvas with given image or colors.
|
||||
* @param {Canvas} canvas The canvas to initialize.
|
||||
* @param {Image | String | Array} data
|
||||
* @param {Object} options
|
||||
* cellSize: {Int}
|
||||
* clear: {Boolean}
|
||||
*/
|
||||
function drawCanvas(canvas, data, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var _options = options,
|
||||
cellSize = _options.cellSize,
|
||||
context = _options.context,
|
||||
_options$clear = _options.clear,
|
||||
clear = _options$clear === void 0 ? true : _options$clear;
|
||||
var width = canvas.width,
|
||||
height = canvas.height;
|
||||
var queue = [data];
|
||||
var ctx = context || canvas.getContext('2d');
|
||||
if (clear) ctx.clearRect(0, 0, width, height);
|
||||
ctx.globalCompositeOperation = 'source-over';
|
||||
|
||||
while (queue.length) {
|
||||
var item = queue.shift();
|
||||
|
||||
if (Array.isArray(item)) {
|
||||
queue = item.concat(queue);
|
||||
} else if (item) {
|
||||
var obj = void 0;
|
||||
|
||||
if (helpers.isDrawable(item)) {
|
||||
obj = {
|
||||
image: item
|
||||
};
|
||||
} else if (typeof item === 'string') {
|
||||
obj = {
|
||||
style: item
|
||||
};
|
||||
} else {
|
||||
obj = item;
|
||||
}
|
||||
|
||||
var x = (obj.col == null ? obj.x : obj.col * cellSize) || 0;
|
||||
var y = (obj.row == null ? obj.y : obj.row * cellSize) || 0;
|
||||
if (x < 0) x += width;
|
||||
if (y < 0) y += width;
|
||||
var w = ('cols' in obj ? obj.cols * cellSize : obj.w) || width;
|
||||
var h = ('rows' in obj ? obj.rows * cellSize : obj.h) || width;
|
||||
|
||||
if (obj.image) {
|
||||
ctx.drawImage(obj.image, x, y, w, h);
|
||||
} else {
|
||||
ctx.fillStyle = obj.style || 'black';
|
||||
ctx.fillRect(x, y, w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
||||
function drawText(text, options) {
|
||||
var _ref = options || {},
|
||||
_ref$fontSize = _ref.fontSize,
|
||||
fontSize = _ref$fontSize === void 0 ? 64 : _ref$fontSize,
|
||||
_ref$fontStyle = _ref.fontStyle,
|
||||
fontStyle = _ref$fontStyle === void 0 ? '' : _ref$fontStyle,
|
||||
_ref$fontFamily = _ref.fontFamily,
|
||||
fontFamily = _ref$fontFamily === void 0 ? 'Cursive' : _ref$fontFamily,
|
||||
_ref$color = _ref.color,
|
||||
color = _ref$color === void 0 ? null : _ref$color,
|
||||
_ref$pad = _ref.pad,
|
||||
pad = _ref$pad === void 0 ? 8 : _ref$pad,
|
||||
_ref$padColor = _ref.padColor,
|
||||
padColor = _ref$padColor === void 0 ? COLOR_WHITE : _ref$padColor,
|
||||
_ref$mode = _ref.mode,
|
||||
mode = _ref$mode === void 0 ? 1 : _ref$mode;
|
||||
|
||||
var canvas = getCanvas(1);
|
||||
var ctx = canvas.getContext('2d');
|
||||
var padColorArr;
|
||||
|
||||
if (padColor) {
|
||||
ctx.fillStyle = padColor;
|
||||
ctx.fillRect(0, 0, 1, 1);
|
||||
|
||||
var _ctx$getImageData = ctx.getImageData(0, 0, 1, 1);
|
||||
|
||||
padColorArr = _ctx$getImageData.data;
|
||||
if (!padColorArr[3]) padColorArr = null;
|
||||
}
|
||||
|
||||
var height = fontSize + 2 * pad;
|
||||
var font = [fontStyle, fontSize + "px", fontFamily].filter(Boolean).join(' ');
|
||||
|
||||
var resetContext = function resetContext() {
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.font = font;
|
||||
};
|
||||
|
||||
resetContext();
|
||||
var width = Math.ceil(ctx.measureText(text).width) + 2 * pad;
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
resetContext();
|
||||
|
||||
var fillText = function fillText() {
|
||||
ctx.fillStyle = color || COLOR_BLACK;
|
||||
ctx.fillText(text, width / 2, height / 2);
|
||||
};
|
||||
|
||||
if (mode === 1) {
|
||||
ctx.fillStyle = padColor;
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
fillText();
|
||||
} else {
|
||||
fillText();
|
||||
|
||||
if (padColorArr) {
|
||||
(function () {
|
||||
var imageData = ctx.getImageData(0, 0, width, height);
|
||||
var data = imageData.data;
|
||||
var total = width * height;
|
||||
var padded = [];
|
||||
var offset = 0;
|
||||
|
||||
var _loop = function _loop(loop) {
|
||||
var current = [];
|
||||
var unique = {};
|
||||
padded[offset] = current;
|
||||
offset = 1 - offset;
|
||||
var last = padded[offset];
|
||||
|
||||
if (!last) {
|
||||
last = [];
|
||||
|
||||
for (var i = 0; i < total; i += 1) {
|
||||
last.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
last.forEach(function (i) {
|
||||
if (data[4 * i + 3]) {
|
||||
[i % width ? i - 1 : -1, (i + 1) % width ? i + 1 : -1, i - width, i + width].forEach(function (j) {
|
||||
var k = 4 * j;
|
||||
|
||||
if (k >= 0 && k <= data.length && !unique[j]) {
|
||||
unique[j] = 1;
|
||||
current.push(j);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
current.forEach(function (i) {
|
||||
var j = 4 * i;
|
||||
|
||||
if (!data[j + 3]) {
|
||||
for (var k = 0; k < 4; k += 1) {
|
||||
data[j + k] = padColorArr[k];
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
for (var loop = 0; loop < pad; loop += 1) {
|
||||
_loop();
|
||||
}
|
||||
|
||||
ctx.putImageData(imageData, 0, 0);
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
||||
var effects = {
|
||||
"default": renderDefault,
|
||||
round: renderRound,
|
||||
fusion: renderFusion,
|
||||
spot: renderSpot
|
||||
};
|
||||
|
||||
function renderDefault(_ref) {
|
||||
var foreground = _ref.foreground,
|
||||
cellSize = _ref.cellSize,
|
||||
isDark = _ref.isDark,
|
||||
count = _ref.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var context = canvasMask.getContext('2d');
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref2) {
|
||||
var i = _ref2.i,
|
||||
j = _ref2.j,
|
||||
x = _ref2.x,
|
||||
y = _ref2.y;
|
||||
|
||||
if (isDark(i, j)) {
|
||||
context.fillRect(x, y, cellSize, cellSize);
|
||||
}
|
||||
});
|
||||
var canvasFg = getCanvas(width);
|
||||
drawCanvas(canvasFg, foreground, {
|
||||
cellSize: cellSize
|
||||
});
|
||||
var ctx = canvasFg.getContext('2d');
|
||||
ctx.globalCompositeOperation = 'destination-in';
|
||||
ctx.drawImage(canvasMask, 0, 0);
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function renderRound(_ref3, maskOptions) {
|
||||
var foreground = _ref3.foreground,
|
||||
cellSize = _ref3.cellSize,
|
||||
isDark = _ref3.isDark,
|
||||
count = _ref3.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var _maskOptions$value = maskOptions.value,
|
||||
value = _maskOptions$value === void 0 ? 1 : _maskOptions$value;
|
||||
var radius = value * cellSize / 2;
|
||||
var context = canvasMask.getContext('2d');
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref4) {
|
||||
var i = _ref4.i,
|
||||
j = _ref4.j,
|
||||
x = _ref4.x,
|
||||
y = _ref4.y;
|
||||
|
||||
if (isDark(i, j)) {
|
||||
context.beginPath();
|
||||
context.moveTo(x + 0.5 * cellSize, y);
|
||||
drawCorner(context, x + cellSize, y, x + cellSize, y + 0.5 * cellSize, radius);
|
||||
drawCorner(context, x + cellSize, y + cellSize, x + 0.5 * cellSize, y + cellSize, radius);
|
||||
drawCorner(context, x, y + cellSize, x, y + 0.5 * cellSize, radius);
|
||||
drawCorner(context, x, y, x + 0.5 * cellSize, y, radius); // context.closePath();
|
||||
|
||||
context.fill();
|
||||
}
|
||||
});
|
||||
var canvasFg = getCanvas(width);
|
||||
drawCanvas(canvasFg, foreground, {
|
||||
cellSize: cellSize
|
||||
});
|
||||
var ctx = canvasFg.getContext('2d');
|
||||
ctx.globalCompositeOperation = 'destination-in';
|
||||
ctx.drawImage(canvasMask, 0, 0);
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function renderFusion(_ref5, maskOptions) {
|
||||
var foreground = _ref5.foreground,
|
||||
cellSize = _ref5.cellSize,
|
||||
isDark = _ref5.isDark,
|
||||
count = _ref5.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var context = canvasMask.getContext('2d');
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
var _maskOptions$value2 = maskOptions.value,
|
||||
value = _maskOptions$value2 === void 0 ? 1 : _maskOptions$value2;
|
||||
var radius = value * cellSize / 2;
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref6) {
|
||||
var i = _ref6.i,
|
||||
j = _ref6.j,
|
||||
x = _ref6.x,
|
||||
y = _ref6.y;
|
||||
var corners = [0, 0, 0, 0]; // NW, NE, SE, SW
|
||||
|
||||
if (isDark(i - 1, j)) {
|
||||
corners[0] += 1;
|
||||
corners[1] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i + 1, j)) {
|
||||
corners[2] += 1;
|
||||
corners[3] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i, j - 1)) {
|
||||
corners[0] += 1;
|
||||
corners[3] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i, j + 1)) {
|
||||
corners[1] += 1;
|
||||
corners[2] += 1;
|
||||
}
|
||||
|
||||
if (isDark(i, j)) {
|
||||
if (isDark(i - 1, j - 1)) corners[0] += 1;
|
||||
if (isDark(i - 1, j + 1)) corners[1] += 1;
|
||||
if (isDark(i + 1, j + 1)) corners[2] += 1;
|
||||
if (isDark(i + 1, j - 1)) corners[3] += 1;
|
||||
context.beginPath();
|
||||
context.moveTo(x + 0.5 * cellSize, y);
|
||||
drawCorner(context, x + cellSize, y, x + cellSize, y + 0.5 * cellSize, corners[1] ? 0 : radius);
|
||||
drawCorner(context, x + cellSize, y + cellSize, x + 0.5 * cellSize, y + cellSize, corners[2] ? 0 : radius);
|
||||
drawCorner(context, x, y + cellSize, x, y + 0.5 * cellSize, corners[3] ? 0 : radius);
|
||||
drawCorner(context, x, y, x + 0.5 * cellSize, y, corners[0] ? 0 : radius); // context.closePath();
|
||||
|
||||
context.fill();
|
||||
} else {
|
||||
if (corners[0] === 2) {
|
||||
fillCorner(context, x, y + 0.5 * cellSize, x, y, x + 0.5 * cellSize, y, radius);
|
||||
}
|
||||
|
||||
if (corners[1] === 2) {
|
||||
fillCorner(context, x + 0.5 * cellSize, y, x + cellSize, y, x + cellSize, y + 0.5 * cellSize, radius);
|
||||
}
|
||||
|
||||
if (corners[2] === 2) {
|
||||
fillCorner(context, x + cellSize, y + 0.5 * cellSize, x + cellSize, y + cellSize, x + 0.5 * cellSize, y + cellSize, radius);
|
||||
}
|
||||
|
||||
if (corners[3] === 2) {
|
||||
fillCorner(context, x + 0.5 * cellSize, y + cellSize, x, y + cellSize, x, y + 0.5 * cellSize, radius);
|
||||
}
|
||||
}
|
||||
});
|
||||
var canvasFg = getCanvas(width);
|
||||
drawCanvas(canvasFg, foreground, {
|
||||
cellSize: cellSize
|
||||
});
|
||||
var ctx = canvasFg.getContext('2d');
|
||||
ctx.globalCompositeOperation = 'destination-in';
|
||||
ctx.drawImage(canvasMask, 0, 0);
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function renderSpot(_ref7, maskOptions) {
|
||||
var foreground = _ref7.foreground,
|
||||
cellSize = _ref7.cellSize,
|
||||
isDark = _ref7.isDark,
|
||||
count = _ref7.count;
|
||||
var getCanvas = helpers.getCanvas,
|
||||
drawCanvas = helpers.drawCanvas;
|
||||
var width = cellSize * count;
|
||||
var canvasMask = getCanvas(width);
|
||||
var value = maskOptions.value,
|
||||
_maskOptions$foregrou = maskOptions.foregroundLight,
|
||||
foregroundLight = _maskOptions$foregrou === void 0 ? COLOR_WHITE : _maskOptions$foregrou;
|
||||
var context = canvasMask.getContext('2d');
|
||||
var canvasLayer = getCanvas(width);
|
||||
var canvasFg = getCanvas(width);
|
||||
var ctxLayer = canvasLayer.getContext('2d');
|
||||
[{
|
||||
dark: true,
|
||||
foreground: foreground
|
||||
}, {
|
||||
dark: false,
|
||||
foreground: foregroundLight
|
||||
}].forEach(function (item) {
|
||||
context.fillStyle = COLOR_BLACK;
|
||||
context.clearRect(0, 0, width, width);
|
||||
drawCells({
|
||||
cellSize: cellSize,
|
||||
count: count
|
||||
}, function (_ref8) {
|
||||
var i = _ref8.i,
|
||||
j = _ref8.j,
|
||||
x = _ref8.x,
|
||||
y = _ref8.y;
|
||||
|
||||
if (isDark(i, j) ^ +!item.dark) {
|
||||
var fillSize;
|
||||
|
||||
if (i <= 7 && j <= 7 || i <= 7 && count - j - 1 <= 7 || count - i - 1 <= 7 && j <= 7 || i + 5 <= count && i + 9 >= count && j + 5 <= count && j + 9 >= count || i === 7 || j === 7) {
|
||||
fillSize = 1 - 0.1 * value;
|
||||
} else {
|
||||
fillSize = 0.25;
|
||||
}
|
||||
|
||||
var offset = (1 - fillSize) / 2;
|
||||
context.fillRect(x + offset * cellSize, y + offset * cellSize, fillSize * cellSize, fillSize * cellSize);
|
||||
}
|
||||
});
|
||||
drawCanvas(canvasLayer, item.foreground, {
|
||||
cellSize: cellSize,
|
||||
context: ctxLayer
|
||||
});
|
||||
ctxLayer.globalCompositeOperation = 'destination-in';
|
||||
ctxLayer.drawImage(canvasMask, 0, 0);
|
||||
drawCanvas(canvasFg, canvasLayer, {
|
||||
cellSize: cellSize,
|
||||
clear: false
|
||||
});
|
||||
});
|
||||
return canvasFg;
|
||||
}
|
||||
|
||||
function drawCells(_ref9, drawEach) {
|
||||
var cellSize = _ref9.cellSize,
|
||||
count = _ref9.count;
|
||||
|
||||
for (var i = 0; i < count; i += 1) {
|
||||
for (var j = 0; j < count; j += 1) {
|
||||
var x = j * cellSize;
|
||||
var y = i * cellSize;
|
||||
drawEach({
|
||||
i: i,
|
||||
j: j,
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function drawCorner(ctx, cornerX, cornerY, x, y, r) {
|
||||
if (r) {
|
||||
ctx.arcTo(cornerX, cornerY, x, y, r);
|
||||
} else {
|
||||
ctx.lineTo(cornerX, cornerY);
|
||||
ctx.lineTo(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
function fillCorner(context, startX, startY, cornerX, cornerY, destX, destY, radius) {
|
||||
context.beginPath();
|
||||
context.moveTo(startX, startY);
|
||||
drawCorner(context, cornerX, cornerY, destX, destY, radius);
|
||||
context.lineTo(cornerX, cornerY);
|
||||
context.lineTo(startX, startY); // context.closePath();
|
||||
|
||||
context.fill();
|
||||
}
|
||||
|
||||
// Enable UTF_8 support
|
||||
qrcode.stringToBytes = qrcode.stringToBytesFuncs['UTF-8'];
|
||||
var DEFAULTS = {
|
||||
background: 'white',
|
||||
foreground: 'black',
|
||||
typeNumber: 0,
|
||||
correctLevel: 'L',
|
||||
data: '',
|
||||
padding: 0,
|
||||
resize: true
|
||||
};
|
||||
|
||||
var QRCanvasRenderer = /*#__PURE__*/function () {
|
||||
function QRCanvasRenderer(options) {
|
||||
var _this = this;
|
||||
|
||||
this.options = _extends({}, DEFAULTS);
|
||||
this.cache = {};
|
||||
|
||||
this.isDark = function (i, j) {
|
||||
var _this$cache = _this.cache,
|
||||
qr = _this$cache.qr,
|
||||
count = _this$cache.count;
|
||||
if (i < 0 || i >= count || j < 0 || j >= count) return false;
|
||||
return qr.isDark(i, j);
|
||||
};
|
||||
|
||||
this.setOptions(options);
|
||||
}
|
||||
|
||||
var _proto = QRCanvasRenderer.prototype;
|
||||
|
||||
_proto.render = function render(canvas, config) {
|
||||
if (config === void 0) {
|
||||
config = {};
|
||||
}
|
||||
|
||||
var _this$options = this.options,
|
||||
background = _this$options.background,
|
||||
foreground = _this$options.foreground,
|
||||
padding = _this$options.padding,
|
||||
effect = _this$options.effect,
|
||||
logo = _this$options.logo,
|
||||
resize = _this$options.resize;
|
||||
var onRender = effects[effect.type] || effects["default"];
|
||||
var count = this.cache.count;
|
||||
var drawCanvas = helpers.drawCanvas;
|
||||
var _config = config,
|
||||
size = _config.size;
|
||||
var canvasOut;
|
||||
var canvasBg;
|
||||
var canvasFg; // Prepare output canvas, resize it if cellSize or size is provided.
|
||||
|
||||
{
|
||||
var _config2 = config,
|
||||
cellSize = _config2.cellSize;
|
||||
if (!canvas && !cellSize && !size) cellSize = 6;
|
||||
if (cellSize) size = count * cellSize + padding + padding;
|
||||
|
||||
if (size) {
|
||||
canvasOut = resize || !canvas ? helpers.updateCanvas(canvas, size) : canvas;
|
||||
} else {
|
||||
size = canvas.width;
|
||||
canvasOut = canvas;
|
||||
}
|
||||
}
|
||||
var contentSize = size - padding - padding; // Create foreground and background layers on canvas
|
||||
|
||||
{
|
||||
var _cellSize = Math.ceil(contentSize / count);
|
||||
|
||||
var sketchSize = _cellSize * count;
|
||||
canvasBg = helpers.getCanvas(_cellSize * count);
|
||||
drawCanvas(canvasBg, background, {
|
||||
cellSize: _cellSize
|
||||
});
|
||||
canvasFg = onRender(_extends({
|
||||
foreground: foreground,
|
||||
cellSize: _cellSize,
|
||||
isDark: this.isDark
|
||||
}, this.cache), this.options.effect); // draw logo
|
||||
|
||||
if (logo) {
|
||||
var logoLayer = _extends({}, logo);
|
||||
|
||||
if (!logo.w && !logo.h && !logo.cols && !logo.rows) {
|
||||
var _ref = logo.image,
|
||||
width = _ref.width,
|
||||
height = _ref.height;
|
||||
var imageRatio = width / height;
|
||||
var posRatio = Math.min((count - 18) / count, 0.38);
|
||||
var h = Math.min(height, sketchSize * posRatio, sketchSize * posRatio / imageRatio);
|
||||
var w = h * imageRatio;
|
||||
var x = (sketchSize - w) / 2;
|
||||
var y = (sketchSize - h) / 2;
|
||||
logoLayer.w = w;
|
||||
logoLayer.h = h;
|
||||
logoLayer.x = x;
|
||||
logoLayer.y = y;
|
||||
}
|
||||
|
||||
drawCanvas(canvasFg, logoLayer, {
|
||||
clear: false
|
||||
});
|
||||
}
|
||||
} // Combine the layers
|
||||
|
||||
drawCanvas(canvasOut, [{
|
||||
image: canvasBg
|
||||
}, {
|
||||
image: canvasFg,
|
||||
x: padding,
|
||||
y: padding,
|
||||
w: contentSize,
|
||||
h: contentSize
|
||||
}]);
|
||||
return canvasOut;
|
||||
};
|
||||
|
||||
_proto.setOptions = function setOptions(options) {
|
||||
this.options = _extends({}, this.options, options);
|
||||
this.normalizeEffect();
|
||||
this.normalizeLogo();
|
||||
var _this$options2 = this.options,
|
||||
typeNumber = _this$options2.typeNumber,
|
||||
data = _this$options2.data,
|
||||
logo = _this$options2.logo; // L / M / Q / H
|
||||
|
||||
var correctLevel = this.options.correctLevel;
|
||||
if (logo && ['Q', 'H'].indexOf(correctLevel) < 0) correctLevel = 'H';
|
||||
var qr = qrcode(typeNumber, correctLevel);
|
||||
qr.addData(data || '');
|
||||
qr.make();
|
||||
var count = qr.getModuleCount();
|
||||
this.cache = {
|
||||
qr: qr,
|
||||
count: count
|
||||
};
|
||||
};
|
||||
|
||||
_proto.normalizeEffect = function normalizeEffect() {
|
||||
var effect = this.options.effect;
|
||||
|
||||
if (typeof effect === 'string') {
|
||||
effect = {
|
||||
type: effect
|
||||
};
|
||||
}
|
||||
|
||||
this.options.effect = effect || {};
|
||||
};
|
||||
|
||||
_proto.normalizeLogo = function normalizeLogo() {
|
||||
var isDrawable = helpers.isDrawable,
|
||||
drawText = helpers.drawText;
|
||||
var logo = this.options.logo;
|
||||
|
||||
if (logo) {
|
||||
if (isDrawable(logo)) {
|
||||
logo = {
|
||||
image: logo
|
||||
};
|
||||
} else if (!isDrawable(logo.image)) {
|
||||
if (typeof logo === 'string') {
|
||||
logo = {
|
||||
text: logo
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof logo.text === 'string') {
|
||||
logo = {
|
||||
image: drawText(logo.text, logo.options)
|
||||
};
|
||||
} else {
|
||||
logo = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.options.logo = logo;
|
||||
};
|
||||
|
||||
return QRCanvasRenderer;
|
||||
}();
|
||||
|
||||
function qrcanvas(options) {
|
||||
var canvas = options.canvas,
|
||||
size = options.size,
|
||||
cellSize = options.cellSize,
|
||||
rest = _objectWithoutPropertiesLoose(options, ["canvas", "size", "cellSize"]);
|
||||
|
||||
var renderer = new QRCanvasRenderer(rest);
|
||||
return renderer.render(canvas, {
|
||||
size: size,
|
||||
cellSize: cellSize
|
||||
});
|
||||
}
|
||||
|
||||
function setCanvasModule(canvasModule) {
|
||||
var Canvas = canvasModule.Canvas,
|
||||
Image = canvasModule.Image,
|
||||
createCanvas = canvasModule.createCanvas;
|
||||
|
||||
var isCanvas = function isCanvas(el) {
|
||||
return el instanceof Canvas;
|
||||
};
|
||||
|
||||
var isDrawable = function isDrawable(el) {
|
||||
return isCanvas(el) || el instanceof Image;
|
||||
};
|
||||
|
||||
helpers.createCanvas = createCanvas;
|
||||
helpers.isCanvas = isCanvas;
|
||||
helpers.isDrawable = isDrawable;
|
||||
}
|
||||
|
||||
export { effects, helpers, qrcanvas, setCanvasModule };
|
||||
3062
libs/vendor/qrcanvas/lib/qrcanvas.js
vendored
Normal file
2
libs/vendor/qrcanvas/lib/qrcanvas.min.js
vendored
Normal file
54
libs/vendor/qrcanvas/package.json
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "qrcanvas",
|
||||
"version": "3.1.2",
|
||||
"description": "Generate characteristic qrcodes with a canvas.",
|
||||
"author": "Gerald <i@gerald.top>",
|
||||
"license": "ISC",
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-push": "npm run lint"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "rollup -wc rollup.conf.js",
|
||||
"prebuild": "npm run ci && npm run clean",
|
||||
"build": "tsc && npm run build:js",
|
||||
"lint": "eslint --ext .ts .",
|
||||
"deploy": "gh-pages -d demo",
|
||||
"prepublishOnly": "npm run build",
|
||||
"clean": "del lib types",
|
||||
"build:js": "rollup -c rollup.conf.js",
|
||||
"ci": "npm run lint"
|
||||
},
|
||||
"title": "QRCanvas",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:gera2ld/qrcanvas.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gera2ld/qrcanvas/issues"
|
||||
},
|
||||
"typings": "types/index.d.ts",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "lib/qrcanvas.common.js",
|
||||
"module": "lib/qrcanvas.esm.js",
|
||||
"unpkg": "lib/qrcanvas.min.js",
|
||||
"jsdelivr": "lib/qrcanvas.min.js",
|
||||
"files": [
|
||||
"lib",
|
||||
"types"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@gera2ld/plaid": "~2.0.7",
|
||||
"@gera2ld/plaid-common-ts": "~2.1.2",
|
||||
"@gera2ld/plaid-rollup": "~2.1.1",
|
||||
"del-cli": "^3.0.1",
|
||||
"husky": "^4.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.11.2",
|
||||
"qrcode-generator": "^1.4.4"
|
||||
}
|
||||
}
|
||||
3
libs/vendor/qrcanvas/types/index.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './types';
|
||||
export * from './qrcanvas';
|
||||
export * from './util';
|
||||
2
libs/vendor/qrcanvas/types/qrcanvas/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { QRCanvasOptions } from '../types';
|
||||
export declare function qrcanvas(options: QRCanvasOptions): any;
|
||||
11
libs/vendor/qrcanvas/types/qrcanvas/renderer.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { QRCanvasRenderConfig } from '../types';
|
||||
export default class QRCanvasRenderer {
|
||||
private options;
|
||||
private cache;
|
||||
constructor(options: any);
|
||||
render(canvas: any, config?: QRCanvasRenderConfig): any;
|
||||
private setOptions;
|
||||
private normalizeEffect;
|
||||
private normalizeLogo;
|
||||
private isDark;
|
||||
}
|
||||
54
libs/vendor/qrcanvas/types/types.d.ts
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
export declare type TypeNumber = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40;
|
||||
export declare type ErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H';
|
||||
export interface QRCanvasOptions {
|
||||
typeNumber?: TypeNumber;
|
||||
correctLevel?: ErrorCorrectionLevel;
|
||||
data?: string;
|
||||
canvas?: HTMLCanvasElement;
|
||||
size?: number;
|
||||
cellSize?: number;
|
||||
background?: QRCanvasLayerValue;
|
||||
foreground?: QRCanvasLayerValue;
|
||||
padding?: number;
|
||||
effect?: QRCanvasEffect;
|
||||
logo?: QRCanvasLayer;
|
||||
/**
|
||||
* Whether to resize the canvas to size of QRCode on render
|
||||
*/
|
||||
resize?: boolean;
|
||||
}
|
||||
export interface QRCanvasRenderConfig {
|
||||
size?: number;
|
||||
cellSize?: number;
|
||||
}
|
||||
export interface QRCanvasEffect {
|
||||
type?: string;
|
||||
value?: number;
|
||||
foregroundLight?: string;
|
||||
}
|
||||
export interface QRCanvasLayer {
|
||||
w?: number;
|
||||
h?: number;
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
x?: number;
|
||||
y?: number;
|
||||
col?: number;
|
||||
row?: number;
|
||||
image?: CanvasImageSource;
|
||||
text?: string;
|
||||
style?: string;
|
||||
options?: QRCanvasDrawTextOptions;
|
||||
}
|
||||
export interface QRCanvasDrawTextOptions {
|
||||
fontSize?: number;
|
||||
fontStyle?: string;
|
||||
fontFamily?: string;
|
||||
color?: string;
|
||||
pad?: number;
|
||||
padColor?: string;
|
||||
mode?: number;
|
||||
}
|
||||
export declare type QRCanvasLayerValue = string | CanvasImageSource | QRCanvasLayer | QRCanvasLayerArray;
|
||||
declare type QRCanvasLayerArray = QRCanvasLayerValue[];
|
||||
export {};
|
||||
2
libs/vendor/qrcanvas/types/util/consts.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const COLOR_BLACK = "#000";
|
||||
export declare const COLOR_WHITE = "#fff";
|
||||
32
libs/vendor/qrcanvas/types/util/effects.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { QRCanvasEffect } from '../types';
|
||||
declare const _default: {
|
||||
default: typeof renderDefault;
|
||||
round: typeof renderRound;
|
||||
fusion: typeof renderFusion;
|
||||
spot: typeof renderSpot;
|
||||
};
|
||||
export default _default;
|
||||
declare function renderDefault({ foreground, cellSize, isDark, count, }: {
|
||||
foreground: any;
|
||||
cellSize: any;
|
||||
isDark: any;
|
||||
count: any;
|
||||
}): HTMLCanvasElement;
|
||||
declare function renderRound({ foreground, cellSize, isDark, count, }: {
|
||||
foreground: any;
|
||||
cellSize: any;
|
||||
isDark: any;
|
||||
count: any;
|
||||
}, maskOptions: QRCanvasEffect): HTMLCanvasElement;
|
||||
declare function renderFusion({ foreground, cellSize, isDark, count, }: {
|
||||
foreground: any;
|
||||
cellSize: any;
|
||||
isDark: any;
|
||||
count: any;
|
||||
}, maskOptions: QRCanvasEffect): HTMLCanvasElement;
|
||||
declare function renderSpot({ foreground, cellSize, isDark, count, }: {
|
||||
foreground: any;
|
||||
cellSize: any;
|
||||
isDark: any;
|
||||
count: any;
|
||||
}, maskOptions: QRCanvasEffect): HTMLCanvasElement;
|
||||
37
libs/vendor/qrcanvas/types/util/helpers.d.ts
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { QRCanvasLayerValue, QRCanvasDrawTextOptions } from '../types';
|
||||
declare const helpers: {
|
||||
createCanvas: typeof createCanvas;
|
||||
isCanvas: typeof isCanvas;
|
||||
isDrawable: typeof isDrawable;
|
||||
getCanvas: typeof getCanvas;
|
||||
updateCanvas: typeof updateCanvas;
|
||||
drawCanvas: typeof drawCanvas;
|
||||
drawText: typeof drawText;
|
||||
};
|
||||
export default helpers;
|
||||
declare function createCanvas(width: number, height: number): HTMLCanvasElement;
|
||||
declare function isCanvas(el: QRCanvasLayerValue): boolean;
|
||||
declare function isDrawable(el: QRCanvasLayerValue): boolean;
|
||||
/**
|
||||
* @desc Create a new canvas.
|
||||
* @param {Int} width Width of the canvas.
|
||||
* @param {Int} height Height of the canvas.
|
||||
* @return {Canvas}
|
||||
*/
|
||||
declare function getCanvas(width: number, height?: number): HTMLCanvasElement;
|
||||
declare function updateCanvas(canvas: HTMLCanvasElement, width: number, height?: number): HTMLCanvasElement;
|
||||
interface DrawCanvasOptions {
|
||||
cellSize?: number;
|
||||
context?: any;
|
||||
clear?: boolean;
|
||||
}
|
||||
/**
|
||||
* @desc Draw to the canvas with given image or colors.
|
||||
* @param {Canvas} canvas The canvas to initialize.
|
||||
* @param {Image | String | Array} data
|
||||
* @param {Object} options
|
||||
* cellSize: {Int}
|
||||
* clear: {Boolean}
|
||||
*/
|
||||
declare function drawCanvas(canvas: HTMLCanvasElement, data: QRCanvasLayerValue, options?: DrawCanvasOptions): HTMLCanvasElement;
|
||||
declare function drawText(text: string, options?: QRCanvasDrawTextOptions): HTMLCanvasElement;
|
||||
4
libs/vendor/qrcanvas/types/util/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import helpers from './helpers';
|
||||
export { helpers };
|
||||
export { default as effects } from './effects';
|
||||
export declare function setCanvasModule(canvasModule: any): void;
|
||||
201
libs/vendor/sheetjs-master/LICENSE
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (C) 2012-present SheetJS LLC
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||