parent
3349858d9a
commit
d557ad6962
@ -1 +1 @@
|
||||
if("__TAURI__"in window){var __TAURI_NFC__=function(n){"use strict";var a,e;return n.ScanKind=void 0,(a=n.ScanKind||(n.ScanKind={}))[a.Ndef=0]="Ndef",a[a.Tag=1]="Tag",n.NFCTypeNameFormat=void 0,(e=n.NFCTypeNameFormat||(n.NFCTypeNameFormat={}))[e.Empty=0]="Empty",e[e.NfcWellKnown=1]="NfcWellKnown",e[e.Media=2]="Media",e[e.AbsoluteURI=3]="AbsoluteURI",e[e.NfcExternal=4]="NfcExternal",e[e.Unknown=5]="Unknown",e[e.Unchanged=6]="Unchanged",n.isAvailable=async function(){return await window.__TAURI_INVOKE__("plugin:nfc|isAvailable")},n.scan=async function(a,e){return await window.__TAURI_INVOKE__("plugin:nfc|scan",{kind:a===n.ScanKind.Ndef?"ndef":"tag",...e})},n.write=async function(n){return await window.__TAURI_INVOKE__("plugin:nfc|write",{records:n})},n}({});Object.defineProperty(window.__TAURI__,"nfc",{value:__TAURI_NFC__})}
|
||||
if("__TAURI__"in window){var __TAURI_NFC__=function(n){"use strict";const e=[84],t=[85];var r,o;function a(n,e,t,r){return{format:n,kind:"string"==typeof e?Array.from((new TextEncoder).encode(e)):e,id:"string"==typeof t?Array.from((new TextEncoder).encode(t)):t,payload:"string"==typeof r?Array.from((new TextEncoder).encode(r)):r}}n.ScanKind=void 0,(r=n.ScanKind||(n.ScanKind={}))[r.Ndef=0]="Ndef",r[r.Tag=1]="Tag",n.NFCTypeNameFormat=void 0,(o=n.NFCTypeNameFormat||(n.NFCTypeNameFormat={}))[o.Empty=0]="Empty",o[o.NfcWellKnown=1]="NfcWellKnown",o[o.Media=2]="Media",o[o.AbsoluteURI=3]="AbsoluteURI",o[o.NfcExternal=4]="NfcExternal",o[o.Unknown=5]="Unknown",o[o.Unchanged=6]="Unchanged";const c=["","http://www.","https://www.","http://","https://","tel:","mailto:","ftp://anonymous:anonymous@","ftp://ftp.","ftps://","sftp://","smb://","nfs://","ftp://","dav://","news:","telnet://","imap:","rtsp://","urn:","pop:","sip:","sips:","tftp:","btspp://","btl2cap://","btgoep://","tcpobex://","irdaobex://","file://","urn:epc:id:","urn:epc:tag:","urn:epc:pat:","urn:epc:raw:","urn:epc:","urn:nfc:"];return n.RTD_TEXT=e,n.RTD_URI=t,n.isAvailable=async function(){return await window.__TAURI_INVOKE__("plugin:nfc|isAvailable")},n.record=a,n.scan=async function(e,t){return await window.__TAURI_INVOKE__("plugin:nfc|scan",{kind:e===n.ScanKind.Ndef?"ndef":"tag",...t})},n.textRecord=function(t,r){return a(n.NFCTypeNameFormat.NfcWellKnown,e,r||[],t)},n.uriRecord=function(e,r){return a(n.NFCTypeNameFormat.NfcWellKnown,t,r||[],function(n){let e="";c.slice(1).forEach((function(t){e&&"urn:"!==e||0!==n.indexOf(t)||(e=t)})),e||(e="");const t=Array.from((new TextEncoder).encode(n.slice(e.length))),r=c.indexOf(e);return t.unshift(r),t}(e))},n.write=async function(n){return await window.__TAURI_INVOKE__("plugin:nfc|write",{records:n})},n}({});Object.defineProperty(window.__TAURI__,"nfc",{value:__TAURI_NFC__})}
|
||||
|
Loading…
Reference in new issue