var D,V;function Be(){if(V)return D;V=1;function _(a){return a?typeof a=="string"?a:a.source:null}function m(a){return e("(?=",a,")")}function e(...a){return a.map(s=>_(s)).join("")}function W(a){const s=a[a.length-1];return typeof s=="object"&&s.constructor===Object?(a.splice(a.length-1,1),s):{}}function t(...a){return"("+(W(a).capture?"":"?:")+a.map(s=>_(s)).join("|")+")"}const A=a=>e(/\b/,a,/\w$/.test(a)?/\b/:/\B/),G=["Protocol","Type"].map(A),x=["init","self"].map(A),H=["Any","Self"],E=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],M=["false","nil","true"],X=["assignment","associativity","higherThan","left","lowerThan","none","right"],J=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],$=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],I=t(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),L=t(I,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),k=e(I,L,"*"),O=t(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),F=t(O,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),i=e(O,F,"*"),h=e(/[A-Z]/,F,"*"),Q=["attached","autoclosure",e(/convention\(/,t("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",e(/objc\(/,i,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Y=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function ee(a){const s={match:/\s+/,relevance:0},ne=a.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[a.C_LINE_COMMENT_MODE,ne],ae={match:[/\./,t(...G,...x)],className:{2:"keyword"}},te={match:e(/\./,t(...E)),relevance:0},ie=E.filter(n=>typeof n=="string").concat(["_|0"]),se=E.filter(n=>typeof n!="string").concat(H).map(A),ce={variants:[{className:"keyword",match:t(...se,...x)}]},c={$pattern:t(/\b\w+/,/#\w+/),keyword:ie.concat(J),literal:M},o=[ae,te,ce],oe={match:e(/\./,t(...$)),relevance:0},ue={className:"built_in",match:e(/\b/,t(...$),/(?=\()/)},C=[oe,ue],P={match:/->/,relevance:0},re={className:"operator",relevance:0,variants:[{match:k},{match:`\\.(\\.|${L})+`}]},p=[P,re],f="([0-9]_*)+",T="([0-9a-fA-F]_*)+",d={className:"number",relevance:0,variants:[{match:`\\b(${f})(\\.(${f}))?([eE][+-]?(${f}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${f}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},K=(n="")=>({className:"subst",variants:[{match:e(/\\/,n,/[0\\tnr"']/)},{match:e(/\\/,n,/u\{[0-9a-fA-F]{1,8}\}/)}]}),le=(n="")=>({className:"subst",match:e(/\\/,n,/[\t ]*(?:[\r\n]|\r\n)/)}),j=(n="")=>({className:"subst",label:"interpol",begin:e(/\\/,n,/\(/),end:/\)/}),w=(n="")=>({begin:e(n,/"""/),end:e(/"""/,n),contains:[K(n),le(n),j(n)]}),y=(n="")=>({begin:e(n,/"/),end:e(/"/,n),contains:[K(n),j(n)]}),l={className:"string",variants:[w(),w("#"),w("##"),w("###"),y(),y("#"),y("##"),y("###")]},z=[a.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[a.BACKSLASH_ESCAPE]}],me={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:z},N=n=>{const v=e(n,/\//),b=e(/\//,n);return{begin:v,end:b,contains:[...z,{scope:"comment",begin:`#(?!.*${b})`,end:/$/}]}},q={scope:"regexp",variants:[N("###"),N("##"),N("#"),me]},U={match:e(/`/,i,/`/)},pe={className:"variable",match:/\$\d+/},de={className:"variable",match:`\\$${F}+`},S=[U,pe,de],be={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Y,contains:[...p,d,l]}]}},Fe={scope:"keyword",match:e(/@/,t(...Q),m(t(/\(/,/\s+/)))},he={scope:"meta",match:e(/@/,i)},g=[be,Fe,he],u={match:m(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,F,"+")},{className:"type",match:h,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:e(/\s+&\s+/,m(h)),relevance:0}]},fe={begin://,keywords:c,contains:[...r,...o,...g,P,u]};u.contains.push(fe);const we={match:e(i,/\s*:/),keywords:"_|0",relevance:0},Z={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",we,...r,q,...o,...C,...p,d,l,...S,...g,u]},B={begin://,keywords:"repeat each",contains:[...r,u]},ye={begin:t(m(e(i,/\s*:/)),m(e(i,/\s+/,i,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:i}]},R={begin:/\(/,end:/\)/,keywords:c,contains:[ye,...r,...o,...p,d,l,...g,u,Z],endsParent:!0,illegal:/["']/},ge={match:[/(func|macro)/,/\s+/,t(U.match,i,k)],className:{1:"keyword",3:"title.function"},contains:[B,R,s],illegal:[/\[/,/%/]},ve={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[B,R,s],illegal:/\[|%/},Ae={match:[/operator/,/\s+/,k],className:{1:"keyword",3:"title"}},Ee={begin:[/precedencegroup/,/\s+/,h],className:{1:"keyword",3:"title"},contains:[u],keywords:[...X,...M],end:/}/},ke={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ce={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ne={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,i,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[B,...o,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:h},...o],relevance:0}]};for(const n of l.variants){const v=n.contains.find(Se=>Se.label==="interpol");v.keywords=c;const b=[...o,...C,...p,d,l,...S];v.contains=[...b,{begin:/\(/,end:/\)/,contains:["self",...b]}]}return{name:"Swift",keywords:c,contains:[...r,ge,ve,ke,Ce,Ne,Ae,Ee,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},q,...o,...C,...p,d,l,...S,...g,u,Z]}}return D=ee,D}export{Be as r}; //# sourceMappingURL=swift-Dj6OBavv.chunk.mjs.map