%%
%% This is file `biblatex-archaeology.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% biblatex-archaeology.dtx  (with options: `sty')
%% 

\def\blxarch@regex@location@match{\regexp{(.+?),[\s\~]+(.+)}}
\def\blxarch@regex@location@replace{\regexp{$1\\mkbiblocationaddon\{$2\}}}
\def\blxarch@opt@useinstitution@aspublisher{%
    \edef\blxarch@useinstitution@value{aspublisher}}
\def\blxarch@opt@useinstitution@false{%
    \edef\blxarch@useinstitution@value{false}}
\def\blxarch@opt@useinstitution@locationfirst{%
    \edef\blxarch@useinstitution@value{locationfirst}}
\def\blxarch@opt@useinstitution@omitlocation{%
    \edef\blxarch@useinstitution@value{omitlocation}}
\def\blxarch@opt@useinstitution@omitlocationifurl{%
    \edef\blxarch@useinstitution@value{omitlocationifurl}}
\def\blxarch@opt@useinstitution@pluslocation{%
    \edef\blxarch@useinstitution@value{pluslocation}}
\def\blxarch@useinstitution@errstr#1{%
    Invalid value of #1}
\def\blxarch@opt@uselocation@false{%
    \edef\blxarch@uselocation@value{false}}
\def\blxarch@opt@uselocation@omitifseries{%
    \edef\blxarch@uselocation@value{omitifseries}}
\def\blxarch@opt@uselocation@true{%
    \edef\blxarch@uselocation@value{true}}
\def\blxarch@uselocation@errstr#1{%
    Invalid value of #1}
\def\blxarch@opt@positionlabeldate@both{%
    \edef\blxarch@positionlabeldate@value{both}}
\def\blxarch@opt@positionlabeldate@label{%
    \edef\blxarch@positionlabeldate@value{label}}
\def\blxarch@opt@positionlabeldate@location{%
    \edef\blxarch@positionlabeldate@value{location}}
\def\blxarch@positionlabeldate@errstr#1{%
    Invalid value of #1}
\def\blxarch@opt@shortform@false{%
    \edef\blxarch@shortform@value{false}}
\def\blxarch@opt@shortform@title{%
    \edef\blxarch@shortform@value{title}}
\def\blxarch@opt@shortform@true{%
    \edef\blxarch@shortform@value{true}}
\def\blxarch@shortform@errstr#1{%
    Invalid value of #1}
\def\blxarch@opt@repeatlabel@dashed{%
    \edef\blxarch@repeatlabel@value{dashed}}
\def\blxarch@opt@repeatlabel@false{%
    \edef\blxarch@repeatlabel@value{false}}
\def\blxarch@opt@repeatlabel@true{%
    \edef\blxarch@repeatlabel@value{true}}
\def\blxarch@repeatlabel@errstr#1{%
    Invalid value of #1}
\def\blxarch@opt@editionsuperscript@none{%
    \edef\blxarch@editionsuperscript@value{none}}
\def\blxarch@opt@editionsuperscript@predate{%
    \edef\blxarch@editionsuperscript@value{predate}}
\def\blxarch@opt@editionsuperscript@postdate{%
    \edef\blxarch@editionsuperscript@value{postdate}}
\def\blxarch@opt@editionsuperscript@prelabel{%
    \edef\blxarch@editionsuperscript@value{prelabel}}
\def\blxarch@opt@editionsuperscript@postlabel{%
    \edef\blxarch@editionsuperscript@value{postlabel}}
\def\blxarch@opt@editionsuperscript@preloc{%
    \edef\blxarch@editionsuperscript@value{preloc}}
\def\blxarch@opt@editionsuperscript@postloc{%
    \edef\blxarch@editionsuperscript@value{postloc}}
\def\blxarch@opt@editionsuperscript@posttitle{%
    \edef\blxarch@editionsuperscript@value{posttitle}}
\def\blxarch@editionsuperscript@errstr#1{%
    Invalid value of #1}
\edef\blxarch@divis{-}
\edef\blxarch@space{\space}
\edef\blxarch@nbspace{~}
\def\blxarch@warnmsg#1{\BibliographyWarning{[\blxarch@name@shell] #1}}
\def\blxarch@errmsg#1{\PackageError{\blxarch@name@shell}{#1}}
\def\blxarch@interror#1#2{\blxarch@errmsg{%
    option '#1' value must be an integer >= 0 and #2}}
\edef\blxarch@name@shell{biblatex-archaeology}
\edef\blxarch@name@hyph{bib\-la\-tex\--ar\-chaeo\-lo\-gy}
\edef\blxarch@maxnumber{9999}
\def\blxarch@newcounter#1#2{\newcounter{#1}\setcounter{#1}{#2}}
\def\blxarch@minmaxcounters#1#2#3#4{%
    \blxarch@newcounter{#1}{0}%
    \blxarch@newcounter{#2}{\blxarch@maxnumber}%
    \DeclareBibliographyOption{#1}[#3]{%
        \IfInteger{##1}%
        {\ifthenelse{##1<0\OR##1>\value{#2}}%
            {\blxarch@interror{#1}{<= #2}}%
            {\setcounter{#1}{##1}}}%
        {\blxarch@interror{#1}{<= #2}}}%
    \DeclareBibliographyOption{#2}[#4]{%
        \IfInteger{##1}%
        {\ifthenelse{##1<0\OR##1<\value{#1}}%
            {\blxarch@interror{#2}{>= #1}}%
            {\setcounter{#2}{##1}}}%
        {\blxarch@interror{#2}{>= #1}}}%
    \ExecuteBibliographyOptions{#1,#2}}%
\def\blxarch@giveninitialletters#1{%
    \fullexpandarg%
    \StrLeft{#1}{1}[\blxarch@str]%
    \renewcommand*{\do}[1]{%
        \IfBeginWith{#1}{##1}
            {\def\blxarch@str{##1}\listbreak}
            {}%
    }%
    \dolistloop{\blxarch@giveninitligatures}%
}
\def\blxarch@nextgivensep{%
    \let\blxarch@namefirstsepposition\blxarch@maxnumber%
    \blxarch@nextnamefirstsep{\blxarch@space}%
    \blxarch@nextnamefirstsep{\bibinitdelim}%
    \blxarch@nextnamefirstsep{\bibnamedelima}%
    \blxarch@nextnamefirstsep{\bibnamedelimb}%
    \blxarch@nextnamefirstsep{\bibnamedelimc}%
    \blxarch@nextnamefirstsep{\bibnamedelimd}%
    \blxarch@nextnamefirstsep{\bibnamedelimi}%
    \blxarch@nextnamefirstsep{\bibinithyphendelim}%
    \blxarch@nextnamefirstsep{\blxarch@divis}%
    \blxarch@nextnamefirstsep{\blxarch@nbspace}%
}
\def\blxarch@ligatureinitchars#1{%
    \noexpandarg%
    \edef\blxarch@currstr{#1}%
    \blxarch@giveninitialletters{#1}%
    \blxarch@str%
    \blxarch@nextgivensep%
    \whiledo{\blxarch@namefirstsepposition<\blxarch@maxnumber}{%
        \StrBehind[1]{\blxarch@currstr}{\blxarch@namefirstsep}[\blxarch@currstr]%
        \ifterseinits
            {\let\blxarch@namefirstsep\@empty}%
            {\ifthenelse{\equal{\blxarch@namefirstsep}{\blxarch@divis}
                    \OR\equal{\blxarch@namefirstsep}{\bibinithyphendelim}}
                {\let\blxarch@namefirstsep\bibinithyphendelim}
                {\let\blxarch@namefirstsep\blxarch@namefirstdelim}}
        \blxarch@giveninitialletters{\blxarch@currstr}%
        \unspace\blxarch@namefirstsep\blxarch@str%
        \blxarch@nextgivensep}%
    \bibinitperiod}
\def\blxarch@nextnamefirstsep#1{%
    \fullexpandarg%
    \StrPosition[1]{\blxarch@currstr}{#1}[\blxarch@posbuffer]%
    \ifthenelse{\blxarch@posbuffer=0}
    {}
    {\ifthenelse{\blxarch@posbuffer<\blxarch@namefirstsepposition}{%
            \let\blxarch@namefirstsepposition\blxarch@posbuffer%
            \renewcommand*{\blxarch@namefirstsep}{#1}}
        {}}%
}
\def\blxarch@namefirstsep{}
\def\blxarch@namefirstdelim{\bibinitperiod\bibinitdelim}
\ProvidesPackage{biblatex-archaeology}
[2018/11/20 v2.1 biblatex-archaeology (Ingram Braun) based on biblatex]
\RequirePackage{xpatch,xstring}
\RequireBiber[3]
\@ifpackagelater{biblatex}{2018/10/13}
    {}
    {\blxarch@errmsg{too old\MessageBreak biblatex version - update required}}
\DeclareLanguageMappingSuffix{-archaeology}
\ExecuteBibliographyOptions{
    abbreviate=true,      % abbreviates bibstrings
    arxiv=pdf,            % although I've never seen an arXiv link we point them to PDFs.
    autopunct=true,       % wether cite commands should scan ahead for punctuation
    autolang=hyphen,      % language-dependent hyphenation rules
    backref=false,        % wether to print back references in the bilbiography
    block=none,           % no extra spacing between blocks
    citetracker=true,
    clearlang=true,       % omit language field if identical to default one
    date=year,
    dateabbrev=true,
    datecirca=true,
    dateuncertain=true,   % needed for \Option{realdate}
    dateusetime=false,    % we never use the time part in \Feld{date} fields
    datezeros=false,
    doi=true,
    eprint=false,
    eventdate=year,
    giveninits=true,
    hyperref=auto,        % \Kbd{auto} detects a loaded \Paket{hyperref} package
    ibidtracker=constrict,
    idemtracker=constrict,
    isbn=false,
    labelalpha=false,     % needed for alpha styles only
    labeldateparts=true,
    labeldate=year,
    language=auto,
    loccittracker=constrict,
    maxbibnames=500,
    maxcitenames=2,
    maxitems=3,
    maxparens=5,
    mincitenames=1,
    minitems=3,
    mincrossrefs=500,     % the threshold for crossreferenced works to be included separately in the bibliography
    minxrefs=500,         % the threshold for xreferenced works to be included separately in the bibliography
    notetype=foot+end,
    opcittracker=false,
    origdate=year,
    pagetracker=false,
    parentracker=true,
    singletitle=false,
    sortcites=false,
    sorting=nyvc,
    sortlocale=de_DE,
    terseinits=false,
    uniquelist=minyear,
    uniquename=init,
    url=false,
    urldate=terse,
    useauthor=true,
    useeditor=true,
    usetranslator=true,
    useprefix=true,
    fulleventdate=comp,
    newsdate=comp,
    origrealdate=ymd,
    realdate=ymd,
}
    \DeclareDriverSourcemap[datatype=bibtex]{
        \map[overwrite=true]{
            \step[
                fieldsource=journaltitle,
                notfield=number,
                final,
            ]
            \step[
                fieldsource=month,
                match=\regexp{\A(\d|1[0-2])\Z},
                fieldset=number,
                origfieldval=true,
            ]
            \step[
                fieldset=month,
                null,
            ]
        }
        \map[overwrite=true]{
            \step[
                fieldsource=journaltitle,
                notfield=number,
                final,
            ]
            \step[
                fieldsource=issue,
                match=\regexp{\A\d+\Z},
                fieldset=number,
                origfieldval=true,
            ]
            \step[
                fieldset=issue,
                null,
            ]
        }
        \map[
            overwrite
        ]{
            \pertype{thesis}
            \step[
                fieldsource=type,
                fieldset=type,
                match=\regexp{Diss},
                fieldvalue=phdthesis,
            ]
        }
        \map[
            overwrite=true,
            foreach={titleaddon,booktitleaddon,maintitleaddon},
        ]{
            \pernottype{article}
            \pernottype{review}
            \pernottype{reference}
            \pernottype{inreference}
            \pernottype{mvreference}
            \pernottype{thesis}
             \step[
                fieldsource=\regexp{$MAPLOOP},
                match=\regexp{[Ee]xhibi[ct]|[Aa]usstellung|[Uu][dt]st[iä]ll[n]ing|[Tt]entoonstelling|[Ee][xs]posi[cçtz]},
                fieldset=eventtype,
                fieldvalue=exhibition,
                append=true,
                notfield=eventtype,
            ]
             \step[
                fieldsource=\regexp{$MAPLOOP},
                match=\regexp{[KkCc]onf[eé]ren[cstz]|[Ss]ymposi|[KkCc]ol{1,2}[oó]qu|[KkCc]onvent|[Mm]eeting|},
                fieldset=eventtype,
                fieldvalue=conference,
                append=true,
                notfield=eventtype,
            ]
             \step[
                fieldsource=\regexp{$MAPLOOP},
                match=\regexp{[Aa]u[ck]tion|Versteigerung|\b[Ee]nchère|[Vv]eiling|[Ss]ubasta|[Ll]eil(ões|ão)},
                fieldset=eventtype,
                fieldvalue=auction,
                append=true,
                notfield=eventtype,
            ]
        }
        \map[
            overwrite
        ]{
            \step[
                fieldsource=eventtype,
                match=\regexp{[Aa]u[ck]tion},
                final=true,
            ]
            \step[
                fieldsource=eventdate,
                fieldset=fulleventdate,
                origfieldval=true,
            ]
        }
        \map[
            overwrite
        ]{
            \step[
                fieldsource=date+an,
                match=\regexp{\battributed\b}, % find all date+an field that match "attributed" (<field>+an are csv)
                final=true, % do not add entries in further steps
            ]
            \step[
                fieldsource=date,
                fieldtarget=realdate,
            ]
        }
        \map[
            overwrite
        ]{
            \step[
                fieldsource=year,
                match=\regexp{\A\[.+\]\Z},
                fieldtarget=realdate,
            ]
            \step[
                fieldsource=date,
                match=\regexp{\A\[.+\]\Z},
                fieldtarget=realdate,
            ]
        }
        \map[overwrite]{
            \step[
                fieldsource=realdate,
                match=\regexp{\A\[(.+)\]\Z},
                replace={$1},
            ]
        }
        \map[
            overwrite
        ]{
            \pertype{article}
            \pertype{periodical}
            \pertype{suppperiodical}
            \pertype{review}
            \step[
                fieldsource=entrysubtype,
                match=\regexp{\Anews\Z},
                final=true,
            ]
            \step[
                fieldsource=date,
                fieldset=newsdate,
                origfieldval=true,
            ]
        }
        \map[
            overwrite
        ]{
            \step[
                fieldsource=edition,
                match=\regexp{(\d+)},
                replace={$1},
            ]
        }
        \map[
            overwrite,
            foreach={location, multivenue}
        ]{
            \step[
                fieldsource=\regexp{$MAPLOOP},
                match={\blxarch@regex@location@match},
                replace={\blxarch@regex@location@replace},
            ]
        }
        \map[
            overwrite
        ]{
            \step[
                fieldsource=venue,
                match={\blxarch@regex@location@match},
                replace={\blxarch@regex@location@replace},
            ]
        }
}
\DeclareFieldInputHandler{chapter}{\def\NewValue{}}
\DeclareFieldInputHandler{eventtitle}{\def\NewValue{}}
\DeclareNameInputHandler{foreword}{\def\NewValue{}}
\DeclareNameInputHandler{holder}{\def\NewValue{}}
\DeclareFieldInputHandler{issn}{\def\NewValue{}}
\DeclareFieldInputHandler{issuetitle}{\def\NewValue{}}
\DeclareFieldInputHandler{issuesubtitle}{\def\NewValue{}}
\DeclareFieldInputHandler{journalsubtitle}{\def\NewValue{}}
\DeclareListInputHandler{language}{\def\NewValue{}}
\DeclareListInputHandler{origlanguage}{\def\NewValue{}}
\DeclareFieldInputHandler{volumes}{\def\NewValue{}}
\newlength{\labelnamedatewidth}
\setlength{\labelnamedatewidth}{0.33\linewidth}
\DeclareFieldFormat*{labelnamedatewidth}{#1}
\defbibenvironment{leftmarginbibliography}
    {\list
        {\printtext[labelnamedatewidth]{%
            \usebibmacro{repeatlabel}}}
        {\setlength{\labelwidth}{\labelnamedatewidth}%
            \setlength{\leftmargin}{\labelwidth}%
            \setlength{\labelsep}{\biblabelsep}%
            \addtolength{\leftmargin}{\labelsep}%
            \setlength{\itemsep}{\bibitemsep}%
            \setlength{\parsep}{\bibparsep}}%
            \renewcommand*{\makelabel}[1]{##1\hss}}
    {\endlist}
    {\item}%
\ifnumequal\blx@uniquename\blx@opt@uniquename@false
    {\DeclareSortingNamekeyTemplate{
        \keypart{
            \namepart[use=true]{prefix}
        }
        \keypart{
            \namepart{family}
        }
    }}
    {\ifnumequal\blx@uniquename\blx@opt@uniquename@init
        {\DeclareSortingNamekeyTemplate{
            \keypart{
                \namepart[use=true]{prefix}
            }
            \keypart{
                \namepart{family}
            }
            \keypart{
                \namepart[inits=true]{given}
            }
        }
        \DeclareUniquenameTemplate{
            \namepart[use=true, base=true]{prefix}
            \namepart[base=true]{family}
            \namepart[disambiguation=init]{given}
        }}
        {}%
    }%
\DeclareNosort{
    \nosort{setnames}{\regexp{^[^\p{Lu}]+}}
}
\DeclareSortingTemplate{lnyc}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{label}
    \field{shorthand}
    \field{shortauthor}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
    \field{shorttitle}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
    \sort{
    \citeorder
  }
}
\DeclareSortingTemplate{lnyvc}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{label}
    \field{shorthand}
    \field{shortauthor}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
    \field{shorttitle}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
    \sort{
    \citeorder
  }
}
\DeclareSortingTemplate{lnyvt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{label}
    \field{shorthand}
    \field{shortauthor}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
    \field{shorttitle}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
    \sort{
    \citeorder
  }
}
\DeclareSortingTemplate{nyvc}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \citeorder
  }
}
\DeclareSortingTemplate{nyc}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \citeorder
  }
}
\DeclareSortingTemplate{nyvt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
}
\DeclareSortingTemplate{nyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}
\newcommand{\ifselfcontained}[2]{%
    \ifboolexpr{
        test {\ifentrytype{book}}
        or
        test {\ifentrytype{booklet}}
        or
        test {\ifentrytype{collection}}
        or
        test {\ifentrytype{manual}}
        or
        test {\ifentrytype{misc}}
        or
        test {\ifentrytype{mvbook}}
        or
        test {\ifentrytype{mvcollection}}
        or
        test {\ifentrytype{mvproceedings}}
        or
        test {\ifentrytype{mvreference}}
        or
        test {\ifentrytype{online}}
        or
        test {\ifentrytype{proceedings}}
        or
        test {\ifentrytype{reference}}
        or
        test {\ifentrytype{report}}
        or
        test {\ifentrytype{thesis}}
        or
        test {\ifentrytype{unpublished}}
    }
        {#1}
        {\ifboolexpr{
            test {\iffieldundef{booktitle}}
            and
            test {\iffieldundef{journaltitle}}
            and
            test {\ifnameundef{bookauthor}}
         }
            {#1}
            {#2}}}
\DeclareBibliographyAlias{incollection}{inbook}
\DeclareBibliographyAlias{inproceedings}{inbook}
\DeclareBibliographyAlias{booklet}{book}
\DeclareBibliographyAlias{collection}{book}
\DeclareBibliographyAlias{manual}{book}
\DeclareBibliographyAlias{proceedings}{book}
\DeclareBibliographyAlias{reference}{book}
\DeclareBibliographyAlias{report}{book}
\DeclareBibliographyAlias{patent}{book}
\renewcommand*{\mkbibacro}[1]{\MakeLowercase{#1}}
\renewbibmacro*{doi+eprint+url}{%
  \printfield{doi}%
  \newunit\newblock%
  \usebibmacro{eprint}%
  \newunit\newblock%
  \usebibmacro{url+urldate}}
\newcommand*{\mkbibletterspacing}[1]{\textls{#1}}
\providecommand*{\textls}[1]{\textsc{#1}}
\renewcommand*{\mkbibnamegiven}[1]{#1}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}}
\renewcommand*{\mkbibnamesuffix}[1]{#1}
\newcommand*{\mkbibrepeatgiven}[1]{#1}
\newcommand*{\mkbibrepeatfamily}[1]{\textsc{#1}}
\newcommand*{\mkbibrepeatprefix}[1]{\textsc{#1}}
\newcommand*{\mkbibrepeatsuffix}[1]{#1}
\newcommand*{\mkbibbooknamegiven}[1]{#1}
\newcommand*{\mkbibbooknamefamily}[1]{#1}
\newcommand*{\mkbibbooknameprefix}[1]{#1}
\newcommand*{\mkbibbooknamesuffix}[1]{#1}
\newcommand*{\mkbibsourcenamegiven}[1]{#1}
\newcommand*{\mkbibsourcenamefamily}[1]{#1}
\newcommand*{\mkbibsourcenameprefix}[1]{#1}
\newcommand*{\mkbibsourcenamesuffix}[1]{#1}
\newcommand*{\mkbiblistnamegiven}[1]{#1}
\newcommand*{\mkbiblistnamefamily}[1]{#1}
\newcommand*{\mkbiblistnameprefix}[1]{#1}
\newcommand*{\mkbiblistnamesuffix}[1]{#1}
\newcommand{\ifshortform}[3]{%
    \ifdefstring{\blxarch@shortform@value}{#1}
        {#2}
        {\ifcsdef{blxarch@opt@shortform@#1}
            {#3}
            {\blxarch@errmsg{\blxarch@shortform@errstr{\unexpanded{\ifshortform}}}}}}%
\DeclareBibliographyOption[string]{shortform}[true]{%
    \ifcsdef{blxarch@opt@shortform@#1}
        {\csuse{blxarch@opt@shortform@#1}}%
        {\blxarch@errmsg{\blxarch@shortform@errstr{option 'shortform'}}}}
\ExecuteBibliographyOptions{shortform}
\DeclareFieldFormat*{shortformvolume}{\ifinteger{#1}{\RN{#1}}{#1}}
\DeclareFieldFormat*{shortformauthor}{\mkbibparens{#1}}
\DeclareBibliographyDriver{shortform}{%
    \iffieldundef{shortform}
        {\blxarch@warnmsg{Cannot use \shortformcite without field shortform!}}
        {\printfield{shortform}%
         \setunit{\addspace}%
         \printfield[shortformvolume]{volume}}}
\DeclareCiteCommand{\sfcite}[]
  {\usebibmacro{prenote}}
  {\usedriver{}{shortform}}
  {\multicitedelim}
  {\usebibmacro{postnote}%
  \setunit*{\addspace}%
  \ifentrytype{inreference}{\printfield[dictionary]{title}}{}%
  \setunit*{\addspace}%
  \ifnameundef{author}{}
  {\printtext[shortformauthor]{\printnames[g-family][1-]{author}}}%
}
\DeclareMultiCiteCommand{\sfcites}[]
{\sfcite}{\multicitedelim}
\DeclareCiteCommand{\shortformcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usedriver{}{shortform}}
  {\multicitedelim}
  {\usebibmacro{postnote}%
  \setunit*{\addspace}%
  \ifentrytype{inreference}{\printfield[dictionary]{title}}{}%
  \setunit*{\addspace}%
  \ifnameundef{author}{}
  {\printtext[shortformauthor]{\printnames[g-family][1-]{author}\unspace}}%
}
\DeclareMultiCiteCommand{\shortformcites}[\mkbibfootnote]
{\shortformcite}{\multicitedelim}
\newcommand*{\nameshortformdelim}{\usebibmacro{in:}}
\DeclareBibliographyDriver{inreference}{%
    \ifshortform{true}
        {\usebibmacro{bibindex}%
         \clearfield{edition}%
         \usebibmacro{begentry}%
         \usebibmacro{author/translator+others}%
         \setunit{\printdelim{nameshortformdelim}}%
         \iftabbedlabeldate{&}{\newblock}
         \printfield{shortform}%
         \setunit{\addspace}%
         \printfield[shortformvolume]{volume}%
         \setunit{\noseriespunct}\newblock
         \usebibmacro{location+date}%
         \newunit\newblock
         \usebibmacro{chapter+pages}%
         \setunit{\addspace}%
         \usebibmacro{title}%
         \newunit\newblock
         \iftoggle{bbx:isbn}
           {\printfield{isbn}}
           {}%
         \newunit\newblock
         \usebibmacro{doi+eprint+url}%
         \newunit\newblock
         \usebibmacro{addendum+pubstate}%
         \setunit{\bibpagerefpunct}\newblock
         \usebibmacro{pageref}%
         \newunit\newblock
         \iftoggle{bbx:related}
           {\usebibmacro{related:init}%
            \usebibmacro{related}}
           {}%
         \usebibmacro{finentry}}
        {\usedriver{}{inbook}\usebibmacro{finentry}}%
}
\newcommand{\ifrepeatlabel}[3]{%
    \ifbibliography
        {\ifdefstring{\blxarch@repeatlabel@value}{#1}
            {#2}
            {\ifcsdef{blxarch@opt@repeatlabel@#1}
                {#3}
                {\blxarch@errmsg{\blxarch@repeatlabel@errstr{\unexpanded{\ifrepeatlabel}}}}}}%
        {\ifstrequal{false}{#1}
            {#2}
            {\ifcsdef{blxarch@opt@repeatlabel@#1}
                {#3}
                {\blxarch@errmsg{\blxarch@repeatlabel@errstr{\unexpanded{\ifrepeatlabel}}}}}}%
}
\DeclareBibliographyOption[string]{repeatlabel}[true]{%
    \ifcsdef{blxarch@opt@repeatlabel@#1}
        {\csuse{blxarch@opt@repeatlabel@#1}}%
        {\blxarch@errmsg{\blxarch@repeatlabel@errstr{option 'repeatlabel'}}}}
\ExecuteBibliographyOptions{repeatlabel}
\newcommand*{\repeatlabeldash}{--\addspace}
\DeclareFieldFormat*{repeatlabel}{#1}
\newcommand*{\repeatlabeldelim}{\newline}
\newbibmacro*{repeatlabel}{%
    \let\blxarch@buffer@repeatfamily\mkbibnamefamily%
    \let\blxarch@buffer@repeatprefix\mkbibnameprefix%
    \let\blxarch@buffer@repeatgiven\mkbibnamegiven%
    \let\blxarch@buffer@repeatsuffix\mkbibnamesuffix%
    \let\mkbibnamefamily\mkbibrepeatfamily%
    \let\mkbibnameprefix\mkbibrepeatprefix%
    \let\mkbibnamegiven\mkbibrepeatgiven%
    \let\mkbibnamesuffix\mkbibrepeatsuffix%
    \let\blxarch@buffer@repeatnames\c@minnames%
    \let\blxarch@buffer@maxnames\c@maxnames%
    \let\blxarch@buffer@minnames\c@minnames%
    \let\c@maxnames\blx@maxcitenames%
    \let\c@minnames\blx@mincitenames%
    \ifhyperref
        {\let\bibhyperref\@empty}
        {}%
    \printtext[repeatlabel]{%
        \togglefalse{archbool:capitalizeprefixinbiblist}{\midsentence}%
        \iffieldundef{shorthand}
            {\ifboolexpr{
                test {\ifrepeatlabel{dashed}}
                and
                test {\iffieldequalcs{namehash}{blxarch@field@namehash}}}
                {\printtext{\repeatlabeldash}%
                 \ifeditionsuperscript{prelabel}{\usebibmacro{editionsuperscript}}{}%
                 \usebibmacro{cite:labeldate+extradate}%
                 \ifeditionsuperscript{postlabel}{\usebibmacro{editionsuperscript}}{}}
                {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
                    {\usebibmacro{cite:label}%
                     \setunit{\printdelim{nonameyeardelim}}}
                    {\printnames{labelname}%
                     \setunit{\printdelim{nameyeardelim}}}%
                 \ifeditionsuperscript{prelabel}{\usebibmacro{editionsuperscript}}{}%
                 \usebibmacro{cite:labeldate+extradate}%
                 \ifeditionsuperscript{postlabel}{\usebibmacro{editionsuperscript}}{}}}%
            {\usebibmacro{cite:shorthand}}%
    }%
    \ifhyperref{\let\bibhyperref\blxarch@buffer@hyperref}{}%
    \let\c@maxnames\blxarch@buffer@maxnames%
    \let\c@minnames\blxarch@buffer@minnames%
    \let\mkbibnamefamily\blxarch@buffer@repeatfamily%
    \let\mkbibnameprefix\blxarch@buffer@repeatprefix%
    \let\mkbibnamegiven\blxarch@buffer@repeatgiven%
    \let\mkbibnamesuffix\blxarch@buffer@repeatsuffix%
    \savefield{namehash}{\blxarch@field@namehash}%
}
\newtoggle{archbool:capitalizeprefixinbiblist}
\DeclareBibliographyOption{capitalizeprefixinbiblist}[false]{%
    \settoggle{archbool:capitalizeprefixinbiblist}{#1}}
\ExecuteBibliographyOptions{capitalizeprefixinbiblist}
\renewbibmacro*{begentry}{%
    \ifboolexpr{
        togl {archbool:noseries}
        and
        test {\iffieldundef{journaltitle}}
    }
        {\clearfield{series}%
         \clearfield{subseries}%
         \clearfield{shortseries}%
         \clearfield{shortsubseries}}
        {}%
    \ifboolexpr{
        test {\ifshortform{title}}
        and
        not test {\iffieldundef{shortform}}
    }
        {\savefield*{shortform}{\blxarch@field@shortform}%
         \restorefield{booktitle}{\blxarch@field@shortform}%
         \clearfield{booksubtitle}%
         \clearfield{booktitleaddon}}
        {}%
    \iffieldundef{volume}
        {}
        {\savefield*{volume}{\blxarch@field@volume}%
         \restorefield{usera}{\blxarch@field@volume}}%
    \ifboolexpr{
        test {\iffieldequalstr{entrysubtype}{digital}}
        or
        test {\ifentrytype{online}}
    }
        {}
        {\iftoggle{bbx:doi}{}{\clearfield{doi}}%
         \iftoggle{bbx:eprint}{}{\clearfield{eprint}}%
         \iftoggle{bbx:url}{}{\clearfield{url}\clearfield{urlyear}}}%
    \ifboolexpr{
        not test {\iffieldundef{series}}
        and
        test {\iffieldundef{number}}
        and
        test {\iffieldundef{journaltitle}}
        and
        not test {\ifentrytype{periodical}}
     }
        {\clearfield{series}}
        {}%
    \iffieldundef{doi}
        {}
        {\clearfield{eprint}\clearfield{url}\clearfield{urlyear}}%
    \iffieldundef{eprint}
        {}
        {\clearfield{url}\clearfield{urlyear}}%
    \iflistundef{publisher}
        {\clearlist{lista}}
        {\savelist{publisher}{\blxarch@field@publisher}%
        \restorelist{lista}{\blxarch@field@publisher}}%
    \iftoggle{archbool:usepublisher}
        {}
        {\clearlist{publisher}%
         \clearlist{origpublisher}}%
    \ifeditionsuperscript{none}
        {\clearfield{usere}}
        {\savefield*{edition}{\blxarch@field@edition}%
        \clearfield{edition}%
        \restorefield{usere}{\blxarch@field@edition}}%
    \ifboolexpr{
        not test {\iffieldundef{maintitle}}
        and
        test {\iffieldundef{booktitle}}
        and
        not test {\ifselfcontained}
    }
        {\savefield*{maintitle}{\blxarch@field@maintitle}%
         \savefield*{mainsubtitle}{\blxarch@field@mainsubtitle}%
         \savefield*{maintitleaddon}{\blxarch@field@maintitleaddon}%
         \savefield*{maintitlenote}{\blxarch@field@maintitlenote}%
         \restorefield{booktitle}{\blxarch@field@maintitle}%
         \restorefield{booksubtitle}{\blxarch@field@mainsubtitle}%
         \restorefield{booktitleaddon}{\blxarch@field@maintitleaddon}%
         \restorefield{booktitlenote}{\blxarch@field@maintitlenote}%
         \clearfield{maintitle}%
         \clearfield{mainsubtitle}%
         \clearfield{maintitleaddon}%
         \clearfield{maintitlenote}%
        }
        {}%
    \ifboolexpr{
        togl {archbool:shortjournal}
        and
        not test {\iffieldundef{shortjournal}}
    }
        {\savefield*{shortjournal}{\blxarch@field@shortjournal}%
         \restorefield{journaltitle}{\blxarch@field@shortjournal}%
         \clearfield{journalsubtitle}}
        {}%
    \iftoggle{archbool:subseries}
        {}
        {\clearfield{subseries}%
         \clearfield{subnumber}%
         \clearfield{shortsubseries}}%
    \ifboolexpr{
        togl {archbool:shortseries}
        and
        not test {\iffieldundef{shortseries}}
    }
        {\savefield*{shortseries}{\blxarch@field@shortseries}%
         \savefield*{shortsubseries}{\blxarch@field@shortsubseries}%
         \iffieldundef{shortsubseries}
            {}
            {\restorefield{series}{\blxarch@field@shortseries}%
            \restorefield{subseries}{\blxarch@field@shortsubseries}}%
        }
        {}%
    \togglefalse{archbool:capitalizeprefixinbiblist}{\ifbibliography{\midsentence}{}}%
    \ifrepeatlabel{false}
        {}
        {\usebibmacro{repeatlabel}\repeatlabeldelim}%
    \let\blxarch@buffer@list@namegiven\mkbibnamegiven%
    \let\blxarch@buffer@list@namefamily\mkbibnamefamily%
    \let\blxarch@buffer@list@nameprefix\mkbibnameprefix%
    \let\blxarch@buffer@list@namesuffix\mkbibnamesuffix%
    \let\mkbibnamegiven\mkbiblistnamegiven%
    \let\mkbibnamefamily\mkbiblistnamefamily%
    \let\mkbibnameprefix\mkbiblistnameprefix%
    \let\mkbibnamesuffix\mkbiblistnamesuffix%
}%
\newtoggle{archbool:usemultivenue}
\DeclareBibliographyOption{usemultivenue}[false]{%
    \settoggle{archbool:usemultivenue}{#1}}
\ExecuteBibliographyOptions{usemultivenue}
\newtoggle{archbool:useeventdate}
\DeclareBibliographyOption{useeventdate}[true]{%
    \settoggle{archbool:useeventdate}{#1}}
\ExecuteBibliographyOptions{useeventdate}
\newtoggle{archbool:useeventnumber}
\DeclareBibliographyOption{useeventnumber}[true]{%
    \settoggle{archbool:useeventnumber}{#1}}
\ExecuteBibliographyOptions{useeventnumber}
\newtoggle{archbool:usefestschriftaddon}
\DeclareBibliographyOption{usefestschriftaddon}[true]{%
    \settoggle{archbool:usefestschriftaddon}{#1}}
\ExecuteBibliographyOptions{usefestschriftaddon}
\DeclareNameAlias{festschrift}{g-family}
\newcommand*{\mkbibfestschriftnamegiven}[1]{#1}
\newcommand*{\mkbibfestschriftnamefamily}[1]{#1}
\newcommand*{\mkbibfestschriftnameprefix}[1]{#1}
\newcommand*{\mkbibfestschriftnamesuffix}[1]{#1}
\newbibmacro*{festschrift}[1]{%
    \printtext[#1note]{%
        \let\blxarch@buffer@festschrift@namegiven\mkbibnamegiven%
        \let\blxarch@buffer@festschrift@namefamily\mkbibnamefamily%
        \let\blxarch@buffer@festschrift@nameprefix\mkbibnameprefix%
        \let\blxarch@buffer@festschrift@namesuffix\mkbibnamesuffix%
        \let\mkbibnamegiven\mkbibfestschriftnamegiven%
        \let\mkbibnamefamily\mkbibfestschriftnamefamily%
        \let\mkbibnameprefix\mkbibfestschriftnameprefix%
        \let\mkbibnamesuffix\mkbibfestschriftnamesuffix%
        \printtext{\bibstring{festschrift}\setunit{\addspace}}%
        \ifboolexpr{
            togl {archbool:usefestschriftaddon}
            and
            not test {\iffieldundef{festschriftaddon}}
        }
            {\printfield{festschriftaddon}%
             \setunit{\addspace}}
            {}%
        \printnames[][-\value{listtotal}]{festschrift}%
        \let\mkbibnamegiven\blxarch@buffer@festschrift@namegiven%
        \let\mkbibnamefamily\blxarch@buffer@festschrift@namefamily%
        \let\mkbibnameprefix\blxarch@buffer@festschrift@nameprefix%
        \let\mkbibnamesuffix\blxarch@buffer@festschrift@namesuffix%
        \unspace}%
}
\newbibmacro*{auction}[1]{%
    \printtext[#1note]{%
        \ifbibxstring{\thefield{eventtype}}
            {\printtext{\bibstring{\thefield{eventtype}}}}
            {\printfield{eventtype}}%
        \setunit*{\addspace}%
        \iftoggle{archbool:useeventnumber}
            {\printfield{eventnumber}}
            {}%
        \setunit{\eventtypepunct}%
        \printfield{venue}%
        \setunit{\addspace}%
        \printfulleventdate}%
        \iftoggle{archbool:usemultivenue}
            {\usebibmacro{multivenue}}
            {}
}
\newbibmacro*{exhibition/conference}[1]{%
    \printtext[#1note]{%
        \ifbibxstring{\thefield{eventtype}}
            {\printtext{\bibstring{\thefield{eventtype}}}}
            {\printfield{eventtype}}%
        \setunit*{\addspace}%
        \iftoggle{archbool:useeventnumber}
            {\printfield{eventnumber}}
            {}%
        \setunit{\eventtypepunct}%
        \printfield{venue}%
        \iftoggle{archbool:useeventdate}
            {\setunit{\addspace}%
             \printeventdate}
            {}%
        \iftoggle{archbool:usemultivenue}
            {\usebibmacro{multivenue}}
            {}%u8
    }%
}
\blxarch@newcounter{multivenueloop}{1}%
\newbibmacro*{multivenue}{%
    \iflistundef{multivenue}
        {}
        {\iftoggle{archbool:useeventdate}
            {\ifboolexpr{
                not test {\iflistundef{multieventdate}}
                and
                test {\ifnumequal{\value{multieventdate}}{\value{multivenue}}}
             }
                {}
                {\blxarch@errmsg{Lists 'multivenue' and 'multieventdate' MUST have the same length in entry '\thefield{entrykey}'}}}
            {}%
            \unlessboolexpr{
               test {\ifnumgreater{\value{multivenueloop}}{\value{multivenue}}}
            }
               {\setunit{\multivenuedelim}%
                \printlist[notruncation][\value{multivenueloop}-\value{multivenueloop}]{multivenue}%
                \iftoggle{archbool:useeventdate}
                    {\setunit{\addspace}%
                     \printlist[notruncation][\value{multivenueloop}-\value{multivenueloop}]{multieventdate}}
                    {}%
                \stepcounter{multivenueloop}}%
            \setcounter{multivenueloop}{1}%
        }%
}
\newcommand*{\multivenuedelim}{\addcomma\space}
\newcommand*{\eventtypepunct}{\addspace}
\DeclareListFormat*{notruncation}{#1}
\newbibmacro*{titlenote}[1]{%
    \iftoggle{archbool:titlenote}
        {\ifnameundef{festschrift}
            {}
            {\usebibmacro{festschrift}{#1}}%
         \ifboolexpr{
            not test {\iffieldundef{eventtype}}
            and
            not test {\iffieldundef{fulleventyear}}
         }
            {\usebibmacro{auction}{#1}}
            {}%
        \ifboolexpr{
            not test {\iffieldundef{eventtype}}
            and
            test {\iffieldundef{fulleventyear}}
        }
            {\usebibmacro{exhibition/conference}{#1}}
            {}%
        \ifboolexpr{
            test {\iffieldundef{eventtype}}
            and
            test {\ifnameundef{festschrift}}
        }
            {\iffieldundef{#1note}
                {\printfield[#1note]{#1addon}}
                {\printfield{#1note}}}
            {}
        }
        {\printfield{#1addon}}%
        \clearfield{#1addon}%
        \clearfield{#1note}%
        \clearfield{eventtype}%
        \clearname{festschrift}%
        \clearfield{venue}%
        \clearfield{eventnumber}%
        \clearlist{multivenue}%
        \clearlist{multieventdate}%
}
\xpretocmd{\bibsetup}{%
    \def\blxarch@buffer@hyperref{\bibhyperref}%
    \let\blxarch@field@namehash\undefined%
}{}{Patching macro '\bibsetup' failed}
\xpretobibmacro{finentry}{%
   \let\mkbibnamegiven\blxarch@buffer@list@namegiven%
   \let\mkbibnamefamily\blxarch@buffer@list@nameprefix%
   \let\mkbibnameprefix\blxarch@buffer@list@namefamily%
   \let\mkbibnamesuffix\blxarch@buffer@list@namesuffix%
}{}{Patching 'finentry' failed (1)}
\xpatchbibdriver{book}{\printfield {volume}}{}
  {}{Patching driver 'book' failed (1)}
\xpatchbibdriver{book}{\printfield {part}}{}
  {}{Patching driver 'book' failed (2)}
\xpatchbibdriver{inbook}{\printfield {volume}}{}
  {}{blxarch@warning{patching driver 'inbook' failed (1)}
\xpatchbibdriver{inbook}{\printfield {part}}{}
  {}{Patching driver 'inbook' failed  (2)}
\xpatchbibdriver{book}{\iffieldundef {maintitle} {} {}\newunit}{}
  {}{Patching driver 'book' failed (3)}
\xpatchbibdriver{inbook}{\iffieldundef {maintitle} {} {}\newunit}{}
  {}{Patching driver 'inbook' failed (3)}}
\xpatchbibdriver{article}{\usebibmacro{byeditor+others}}{}
  {}{Patching driver 'book' failed (4)}
\newcommand*{\titleseriesdelim}{\addperiod\space}
\newcommand*{\articletitlepunct}{\newunitpunct}
\xpatchbibdriver{inbook}{newunit \newblock \usebibmacro {in:}}{printunit{\inbookbookdelim}\newblock\usebibmacro{in:}}
  {}{Patching driver 'inbook' failed (4)}
\newcommand{\inbookbookdelim}{\newunitpunct}
\DeclareFieldFormat[inreference]{dictionary}{\midsentence\bibstring{subverbum}\space\mkbibquote{#1\isdot}}
\newtoggle{archbool:titlebrackets}
\DeclareBibliographyOption{titlebrackets}[true]{%
    \settoggle{archbool:titlebrackets}{#1}}
\ExecuteBibliographyOptions{titlebrackets}
\DeclareEntryOption{titlebrackets}[true]{%
    \settoggle{archbool:titlebrackets}{#1}}
\newtoggle{archbool:titlenote}
\DeclareBibliographyOption{titlenote}[true]{%
    \settoggle{archbool:titlenote}{#1}}
\ExecuteBibliographyOptions{titlenote}
\DeclareEntryOption{titlenote}[true]{%
    \settoggle{archbool:titlenote}{#1}}
\newtoggle{archbool:summarytitle}
\DeclareBibliographyOption{summarytitle}[true]{%
    \settoggle{archbool:summarytitle}{#1}}
\ExecuteBibliographyOptions{summarytitle}
\newtoggle{archbool:notitlepunct}
\DeclareBibliographyOption{notitlepunct}[false]{%
    \settoggle{archbool:notitlepunct}{#1}}
\ExecuteBibliographyOptions{notitlepunct}
\newtoggle{archbool:nothesistitlepunct}
\DeclareBibliographyOption{nothesistitlepunct}[false]{%
    \settoggle{archbool:nothesistitlepunct}{#1}}
\ExecuteBibliographyOptions{nothesistitlepunct}
\newcommand{\ifnothesistitlepunct}[2]{%
    \ifboolexpr{
        test {\ifentrytype{thesis}}
        and
        togl {archbool:nothesistitlepunct}
    }
        {#1}
        {#2}
}
\renewcommand*{\subtitlepunct}{\addperiod\space}
\DeclareDataInheritance
{mvbook,book,collection,mvcollection,proceedings,mvproceedings,reference,mvreference}
{inbook,bookinbook,suppbook,incollection,suppcollection,inproceedings,inreference}{%
  \inherit[override=true]{festschrift}{festschrift}
  \inherit[override=true]{shortform}{shortform}
  \inherit[override=true]{titlenote}{booktitlenote}
  \inherit[override=true]{maintitlenote}{maintitlenote}
  \inherit[override=true]{organization}{organization}
  \inherit[override=true]{eventdate}{eventdate}
  \inherit[override=true]{eventnumber}{eventnumber}
  \inherit[override=true]{eventtype}{eventtype}
  \inherit[override=true]{venue}{venue}
  \inherit[override=true]{multivenue}{multivenue}
  \inherit[override=true]{multieventdate}{multieventdate}
  \inherit[override=true]{options}{options}
  \noinherit{summarytitle}
}
\renewbibmacro*{maintitle+title}{%
    \iffieldsequal{maintitle}{title}
        {\clearfield{maintitle}%
         \clearfield{mainsubtitle}%
         \clearfield{maintitleaddon}}
        {\iffieldundef{maintitle}
           {}
           {\usebibmacro{maintitle}%
            \iffieldundef{volume}
                {\newunit\newblock}
                {\printfield{volume}%
                 \printfield{part}%
                 \clearfield{volume}%
                 \setunit{\addcolon\space}}}}%
    \usebibmacro{title}%
    \newunit}
\renewbibmacro*{maintitle+booktitle}{%
    \iffieldsequal{maintitle}{booktitle}
        {\clearfield{maintitle}%
         \clearfield{mainsubtitle}%
         \clearfield{maintitleaddon}}
        {\iffieldundef{maintitle}
           {}
           {\usebibmacro{maintitle}%
            \iffieldundef{volume}
                {\newunit\newblock}
                {\printfield{volume}%
                 \printfield{part}%
                 \clearfield{volume}%
                 \setunit{\addcolon\space}}}}%
    \usebibmacro{booktitle}%
    \newunit}
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{titlebrackets}{\mkbibbrackets{#1}}
\DeclareFieldFormat*{titlenote}{%
    \iftoggle{archbool:titlebrackets}
        {\printtext[titlebrackets]{#1}}
        {#1}}
\DeclareFieldFormat*{booktitlenote}{%
    \iftoggle{archbool:titlebrackets}
        {\printtext[titlebrackets]{#1}}
        {#1}}
\DeclareFieldFormat*{maintitlenote}{%
    \iftoggle{archbool:titlebrackets}
        {\printtext[titlebrackets]{#1}}
        {#1}}
\renewbibmacro*{title}{%
    \ifboolexpr{
        test {\iffieldundef{title}}
        and
        test {\iffieldundef{subtitle}}
    }
        {}
        {\printtext[title]{%
            \printtext[dictionary]{%
                \printfield[titlecase]{title}%
                \ifselfcontained
                    {\setunit{\subtitlepunct}}
                    {\setunit{\articlesubtitlepunct}}%
                \printfield[titlecase]{subtitle}%
            }%
            \setunit{\addspace}%
            \ifboolexpr{
                togl {archbool:summarytitle}
                and
                not test {\iffieldundef{summarytitle}}
            }
                {\printtext[titlebrackets]{\printfield{summarytitle}}}
                {}%
            \iftoggle{archbool:titlebrackets}
                {\ifselfcontained
                    {\usebibmacro{titlenote}{title}}
                    {\printfield[titlenote]{titleaddon}}}%
                {}%
            \iffieldundef{journaltitle}
                {\newunit}
                {\printunit{\articletitlepunct}}}}%
        \iftoggle{archbool:titlebrackets}
            {}
            {\ifselfcontained
                {\usebibmacro{titlenote}{title}}
                {\printfield{titleaddon}}}%
        \ifselfcontained
            {\ifeditionsuperscript{posttitle}
                {\setunit{\nopunct}%
                 \usebibmacro{editionsuperscript}}
                {}%
            \iftoggle{archbool:volumeafterseries}
                {}
                {\setunit{\addspace}\printfield{volume}%
                 \printfield{part}%
                 \clearfield{volume}}%
             \newunit%
             \iffieldundef{series}
                {\ifpagesfirst
                    {\usebibmacro{chapter+pages}%
                     \clearfield{pages}}
                    {}%
                }%
                {\printunit{\titleseriesdelim}}%
             \ifboolexpr{
                togl {archbool:notitlepunct}
                and
                not test {\ifentrytype{thesis}}
                and
                not test {\ifsourceeditor}
                and
                test {\iffieldundef{series}}
             }
                {\printunit{\addspace}}
                {\ifnothesistitlepunct
                    {\printunit{\addspace}}
                    {}}%
            }
            {}%
}
\renewbibmacro*{booktitle}{%
  \ifboolexpr{
    test {\iffieldundef{booktitle}}
    and
    test {\iffieldundef{booksubtitle}}
  }
    {}
    {\printtext[booktitle]{%
        \printfield[titlecase]{booktitle}%
        \setunit{\subtitlepunct}%
        \printfield[titlecase]{booksubtitle}%
        \setunit{\addspace}%
        \iftoggle{archbool:titlebrackets}
            {\usebibmacro{titlenote}{booktitle}}%
            {}%
        \newunit}}%
    \iftoggle{archbool:titlebrackets}
        {}
        {\usebibmacro{titlenote}{booktitle}}%
    \ifeditionsuperscript{posttitle}
        {\setunit{\nopunct}%
         \usebibmacro{editionsuperscript}}
        {}%
    \ifboolexpr{
        togl{archbool:volumeafterseries}
        and
        not test {\iffieldundef{series}}
    }
        {}
        {\setunit{\addspace}\printfield{volume}\clearfield{volume}%
         \printfield{part}}%
    \setunit{\addspace}%
    \iffieldundef{series}
        {\ifpagesfirst
            {\usebibmacro{chapter+pages}%
             \clearfield{pages}}
            {}%
        }
        {\printunit{\titleseriesdelim}}%
    \ifboolexpr{
                togl {archbool:notitlepunct}
                and
                test {\iffieldundef{series}}
            }
                {\printunit{\addspace}}{}}
\renewbibmacro*{maintitle}{%
  \ifboolexpr{
    test {\iffieldundef{maintitle}}
    and
    test {\iffieldundef{mainsubtitle}}
  }
    {}
    {\printtext[maintitle]{%
        \printfield[titlecase]{maintitle}%
            \setunit{\subtitlepunct}%
            \printfield[titlecase]{mainsubtitle}%
            \setunit{\addspace}%
            \iftoggle{archbool:titlebrackets}
                {\usebibmacro{titlenote}{maintitle}}
                {}%
            }%
        \setunit{\nopunct}}%
    \usebibmacro{titlenote}{maintitle}%
}
\newtoggle{archbool:volumeafterseries}
\DeclareBibliographyOption{volumeafterseries}[false]{%
    \settoggle{archbool:volumeafterseries}{#1}}
\ExecuteBibliographyOptions{volumeafterseries}
\newcommand*{\articlesubtitlepunct}{\addcolon\space\midsentence}
\renewbibmacro*{bytranslator+others}{}
\newtoggle{archbool:usesourceeditor}
\DeclareBibliographyOption{usesourceeditor}[true]{%
    \settoggle{archbool:usesourceeditor}{#1}}
\ExecuteBibliographyOptions{usesourceeditor}
\DeclareEntryOption{usesourceeditor}[true]{%
    \settoggle{archbool:usesourceeditor}{#1}}
\newcommand{\ifsourceeditor}[2]{%
    \ifboolexpr{
        togl {archbool:usesourceeditor}
        and
        not test {\ifnameundef{editor}}
    }
        {#1}
        {#2}%
}
\newcommand*{\multisourceeditordelim}{\addcomma\space}
\newcommand*{\finalsourceeditordelim}{\addspace\bibstring{and}\space}
\DeclareNameAlias{byeditor}{given-family}
\xpretobibmacro{byeditor}{%
    \usebibmacro{byeditor:start}
}{}{Patching bibmacro 'byeditor' failed (1)}
\xpretobibmacro{byeditor+others}{%
    \usebibmacro{byeditor:start}
}{}{Patching bibmacro 'byeditor:others' failed (1)}
\xapptobibmacro{byeditor}{%
    \usebibmacro{byeditor:end}
}{}{Patching bibmacro 'byeditor:' failed (2)}
\xapptobibmacro{byeditor+others}{%
    \usebibmacro{byeditor:end}
}{}{Patching bibmacro 'byeditor:others' failed (2)}
\newbibmacro*{byeditor:start}{%
    \ifsourceeditor
        {\let\blxarch@buffer@multinamedelim\multinamedelim%
         \let\blxarch@buffer@finalnamedelim\finalnamedelim%
         \let\multinamedelim\multisourceeditordelim%
         \let\finalnamedelim\finalsourceeditordelim%
         \let\blxarch@buffer@source@namegiven\mkbibnamegiven%
         \let\blxarch@buffer@source@namefamily\mkbibnamefamily%
         \let\blxarch@buffer@source@nameprefix\mkbibnameprefix%
         \let\blxarch@buffer@source@namesuffix\mkbibnamesuffix%
         \let\mkbibnamegiven\mkbibsourcenamegiven%
         \let\mkbibnamefamily\mkbibsourcenamefamily%
         \let\mkbibnameprefix\mkbibsourcenameprefix%
         \let\mkbibnamesuffix\mkbibsourcenamesuffix}
        {\clearname{editor}%
         \clearname{annotator}%
         \clearname{commentator}%
         \clearname{introduction}%
         \clearname{afterword}}%
}
\newbibmacro*{byeditor:end}{%
    \ifsourceeditor
        {\let\mkbibnamegiven\blxarch@buffer@source@namegiven%
         \let\mkbibnamefamily\blxarch@buffer@source@namefamily%
         \let\mkbibnameprefix\blxarch@buffer@source@nameprefix%
         \let\mkbibnamesuffix\blxarch@buffer@source@namesuffix%
         \let\multinamedelim\blxarch@buffer@multinamedelim%
         \let\finalnamedelim\blxarch@buffer@finalnamedelim%
        }
        {}%
    \ifboolexpr{
        togl {archbool:notitlepunct}
        and
        test {\iffieldundef{series}}
    }
        {\printunit{\addspace}}
        {}%
}
\blxarch@minmaxcounters{minbooknames}{maxbooknames}{1}{1}
\renewbibmacro*{bybookauthor}{%
    \clearname{translator}%
    \let\blxarch@buffer@maxbooknames\c@maxnames%
    \let\blxarch@buffer@minbooknames\c@minnames%
    \let\c@maxnames\c@maxbooknames%
    \let\c@minnames\c@minbooknames%
    \let\blxarch@buffer@namegiven\mkbibnamegiven%
    \let\blxarch@buffer@nameprefix\mkbibnamefamily%
    \let\blxarch@buffer@namefamily\mkbibnameprefix%
    \let\blxarch@buffer@namesuffix\mkbibnamesuffix%
    \let\mkbibnamegiven\mkbibbooknamegiven%
    \let\mkbibnameprefix\mkbibbooknameprefix%
    \let\mkbibnamefamily\mkbibbooknamefamily%
    \let\mkbibnamesuffix\mkbibbooknamesuffix%
    \ifnameundef{bookauthor}
        {\ifnameundef{editor}
            {}
            {\printnames[bookauthor]{editor}%
                \clearname{editor}%
                \setunit*{\addspace}%
                \usebibmacro{editorstrg}%
                \printunit*{\booknametitledelim}}}%
        {\printnames[bookauthor]{bookauthor}%
            \clearname{bookauthor}%
            \printunit*{\booknametitledelim}}%
    \let\mkbibnamegiven\blxarch@buffer@namegiven%
    \let\mkbibnamefamily\blxarch@buffer@nameprefix%
    \let\mkbibnameprefix\blxarch@buffer@namefamily%
    \let\mkbibnamesuffix\blxarch@buffer@namesuffix%
    \let\c@maxnames\blxarch@buffer@maxbooknames%
    \let\c@minnames\blxarch@buffer@minbooknames%
}
\DeclareDelimFormat{booknametitledelim}{\booklabelnamepunct}
\newcommand*{\booklabelnamepunct}{\addcomma\space}
\def\blxarch@issuedate{%
    \savebibmacro{issue+date}%
    \renewbibmacro*{issue+date}{%
      \printtext[journaldateparens]{%
        \printfield{issue}%
        \setunit*{\addspace}%
        \usebibmacro{bibliographydate}}}}
\DeclareFieldFormat*{journaldateparens}{%
    \mkbibparens{#1}}
\newtoggle{archbool:shortjournal}
\DeclareBibliographyOption{shortjournal}[true]{%
    \settoggle{archbool:shortjournal}{#1}}
\ExecuteBibliographyOptions{shortjournal}
\newcommand*{\volumedatedelim}{\addcomma\space}
\newcommand*{\journalvolumedelim}{\addspace}
\newcommand*{\volumenumberdelim}{\addslash}
\renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\volumenumberdelim}%
    \printfield{number}%
    \setunit{\addcomma\space}%
    \printfield{eid}}
\DeclareFieldFormat*{journaltitle}{#1}
\xapptobibmacro{note+pages}{%
    \iftoggle{archbool:journallocation}
        {\newunit%
         \usebibmacro{location}{location}}
        {}%
}{}{Patching bibmacro 'note+pages' failed}
\renewbibmacro*{journal+issuetitle}{%
    \printtext[journalvolumeblock]{%
        \usebibmacro{journal}%
        \setunit*{\journalvolumedelim}%
        \iffieldundef{series}
        {}
        {\setunit{\addspace}%
         \printfield{series}%
         \setunit{\journalvolumedelim}}%
        \usebibmacro{volume+number+eid}%
        \iffieldundef{volume}
            {\setunit{\addspace}}
            {\setunit{\volumedatedelim}}%
        \usebibmacro{issue+date}%
    }%
    \newunit}
\renewbibmacro*{in:}{%
    \printtext{%
        \iftoggle{archbool:injournal}
            {\bibstring{in}\intitlepunct}
            {\iffieldundef{journaltitle}
                {\bibstring{in}\intitlepunct}
                {}}}}
\newtoggle{archbool:journallocation}
\DeclareBibliographyOption{journallocation}[true]{%
    \settoggle{archbool:journallocation}{#1}}
\ExecuteBibliographyOptions{journallocation}
\newtoggle{archbool:injournal}
\DeclareBibliographyOption{injournal}[true]{%
    \settoggle{archbool:injournal}{#1}}
\ExecuteBibliographyOptions{injournal}
\newcommand{\ifeditionsuperscript}[3]{%
    \ifdefstring{\blxarch@editionsuperscript@value}{#1}
        {#2}
        {\ifcsdef{blxarch@opt@editionsuperscript@#1}
            {#3}
            {\blxarch@errmsg{\blxarch@editionsuperscript@errstr{\unexpanded{\ifeditionsuperscript}}}}}}%
\DeclareBibliographyOption[string]{editionsuperscript}[posttitle]{%
    \ifcsdef{blxarch@opt@editionsuperscript@#1}
        {\csuse{blxarch@opt@editionsuperscript@#1}}%
        {\blxarch@errmsg{\blxarch@editionsuperscript@errstr{option 'editionsuperscript'}}}}
\ExecuteBibliographyOptions{editionsuperscript}
\DeclareFieldFormat*{usere}{%
    \ifboolexpr{
        test {\ifeditionsuperscript{postdate}}
        or
        test {\ifeditionsuperscript{postlabel}}
        or
        test {\ifeditionsuperscript{posttitle}}
    }
        {\unspace}
        {}%
        \textsuperscript{#1}}
\newbibmacro*{editionsuperscript}{%
    \iffieldundef{usere}
        {}
        {\iffieldint{usere}
            {\printfield{usere}}
            {}%
        \clearfield{usere}%
        }%
}
\newcommand*{\mkbiblocationaddon}[1]{}
\renewcommand*{\finallistdelim}{\multilistdelim}
\newcommand{\ifuselocation}[3]{%
    \ifdefstring{\blxarch@uselocation@value}{#1}
        {#2}
        {\ifcsdef{blxarch@opt@uselocation@#1}
            {#3}
            {\blxarch@errmsg{\blxarch@uselocation@errstr{\unexpanded{\ifuselocation}}}}}}%
\DeclareBibliographyOption[string]{uselocation}[true]{%
    \ifcsdef{blxarch@opt@uselocation@#1}
        {\csuse{blxarch@opt@uselocation@#1}}%
        {\blxarch@errmsg{\blxarch@shortform@errstr{option 'uselocation'}}}}
\ExecuteBibliographyOptions{uselocation}
\newtoggle{archbool:pagesfirst}
\DeclareBibliographyOption{pagesfirst}[true]{%
    \settoggle{archbool:pagesfirst}{#1}}
\ExecuteBibliographyOptions{pagesfirst}
\newcommand*{\ifpagesfirst}[2]{%
    \iftoggle{archbool:pagesfirst}
        {#1}
        {#2}}%
\newtoggle{archbool:origfields}
\DeclareBibliographyOption{origfields}[true]{%
    \settoggle{archbool:origfields}{#1}}
\ExecuteBibliographyOptions{origfields}
\newtoggle{archbool:usepublisher}
\DeclareBibliographyOption{usepublisher}[true]{%
    \settoggle{archbool:usepublisher}{#1}}
\ExecuteBibliographyOptions{usepublisher}
\newcommand*{\locationpublisherdelim}{\addcolon\space}
\newcommand{\iforigfields}[2]{%
    \iftoggle{archbool:origfields}
        {\iffieldundef{origyear}
            {\iffieldundef{origlocation}
                {\iffieldundef{origpublisher}
                    {#2}
                    {#1}}
                {#1}}
            {#1}}
        {#2}}
\renewbibmacro*{publisher+location+date}{%
    \usebibmacro{location+date}}
\renewbibmacro*{location+date}{%
    \iforigfields
        {\usebibmacro{origfields+reprint}}
        {\usebibmacro{location+date+edition}}}%
\newbibmacro*{location}[1]{%
    \ifuselocation{false}
        {}
        {\ifboolexpr{
            test {\ifuselocation{omitifseries}}
            and
            not test {\iffieldundef{series}}
         }
            {}
            {\iflistundef{#1}
                {\printtext[missingfield]{\midsentence\bibstring{noplace}}}
                {\printlist{#1}}}}}%
\DeclareFieldFormat*{missingfield}{#1}
\DeclareFieldFormat*{locationdateparens}{\mkbibparens{#1}}
\newbibmacro*{location+date+edition}{%
    \printtext[locationdateparens]{%
        \ifeditionsuperscript{preloc}
            {\usebibmacro{editionsuperscript}}
            {}%
        \usebibmacro{location}{location}%
        \ifeditionsuperscript{postloc}
            {\usebibmacro{editionsuperscript}}
            {}%
        \setunit{\locationpublisherdelim}%
        \printlist{publisher}%
        \setunit{\addspace}%
        \usebibmacro{bibliographydate}}%
        \newunit}%
\DeclareFieldFormat*{reprintparens}{\mkbibbrackets{#1}}
\newbibmacro*{origfields+reprint}{%
    \printtext[locationdateparens]{%
        \ifeditionsuperscript{preloc}
            {\usebibmacro{editionsuperscript}}
            {}%
        \usebibmacro{location}{origlocation}%
        \ifeditionsuperscript{postloc}
            {\usebibmacro{editionsuperscript}}
            {}%
        \setunit{\locationpublisherdelim}%
        \printlist{origpublisher}%
        \setunit{\addspace}%
        \ifeditionsuperscript{predate}
            {\usebibmacro{editionsuperscript}}
            {}%
        \usebibmacro{origdate}
        \usebibmacro{editionsuperscript}%
        \setunit{\addspace}%
        \printtext[reprintparens]{%
            \bibstring{reprint}\addspace%
            \printtext{\usebibmacro{location}{location}}%
            \setunit{\locationpublisherdelim}%
            \printlist{publisher}%
            \setunit{\addspace}%
            \usebibmacro{bibliographydate}}}
        \newunit}%
\DeclareBibliographyOption[string]{useinstitution}[pluslocation]{%
    \ifcsdef{blxarch@opt@useinstitution@#1}
        {\csuse{blxarch@opt@useinstitution@#1}}%
        {\blxarch@errmsg{\blxarch@useinstitution@errstr{option 'useinstitution'}}}}
\ExecuteBibliographyOptions{useinstitution}
\newcommand{\ifuseinstitution}[3]{%
    \ifdefstring{\blxarch@useinstitution@value}{#1}
        {#2}
        {\ifcsdef{blxarch@opt@useinstitution@#1}
            {#3}
            {\blxarch@errmsg{\blxarch@useinstitution@errstr{\unexpanded{\ifuseinstitution}}}}}}%
\xpatchbibdriver{thesis}{\printfield {type}}{}
  {}{Patching driver 'thesis' failed (1)}
\xpatchbibdriver{thesis}{\printlist {language}}{}
  {}{Patching driver 'thesis' failed (2)}
\newtoggle{archbool:useunpublishedthesis}
\DeclareBibliographyOption{useunpublishedthesis}[true]{%
    \settoggle{archbool:useunpublishedthesis}{#1}}
\ExecuteBibliographyOptions{useunpublishedthesis}
\renewbibmacro*{institution+location+date}{%
    \printtext[thesis]{%
        \ifuseinstitution{false}
            {\usebibmacro{thesistype}%
             \setunit{\typeinstitutiondelim}%
             \usebibmacro{location+date}}
            {\ifuseinstitution{pluslocation}
                {\usebibmacro{institution+location}}
                {\ifuseinstitution{aspublisher}
                    {\usebibmacro{institution:aspublisher}}
                    {\ifuseinstitution{omitlocation}
                        {\usebibmacro{institution+date}}
                        {\ifuseinstitution{omitlocationifurl}
                            {\usebibmacro{institution:omitifurl}}
                            {\usebibmacro{institution:locationfirst}}%
                        }%
                    }%
                }%
            }%
}}
\newbibmacro*{institution+location}{%
    \printtext[typeinstitution]{%
        \usebibmacro{thesistype}%
        \setunit{\typeinstitutiondelim}%
        \printlist{institution}}%
    \setunit*{\institutionlocationdelim}%
    \usebibmacro{location+date}%
}
\newbibmacro*{institution+date}{%
    \usebibmacro{thesistype}%
    \setunit{\typeinstitutiondelim}%
    \printlist{institution}%
    \setunit*{\institutionlocationdelim}%
    \usebibmacro{bibliographydate}%
}
\newbibmacro*{institution:aspublisher}{%
    \usebibmacro{thesistype}%
    \setunit{\typeinstitutiondelim}%
    \savelist*{institution}{\blxarch@field@institution}%
    \restorelist{publisher}{\blxarch@field@institution}%
    \usebibmacro{location+date}%
}
\newbibmacro*{institution:locationfirst}{%
    \usebibmacro{location}{location}%
    \setunit*{\typeinstitutiondelim}%
    \usebibmacro{thesistype}%
    \setunit{\addspace}%
    \usebibmacro{bibliographydate}%
}
\newbibmacro*{institution:omitifurl}{%
    \usebibmacro{thesistype}%
    \setunit{\typeinstitutiondelim}%
    \ifboolexpr{
        test {\iffieldundef{url}}
        and
        test {\iffieldundef{eprint}}
        and
        test {\iffieldundef{doi}}
    }
        {\usebibmacro{location+date}}
        {\usebibmacro{institution+date}}%
}
\newbibmacro*{thesistype}{%
    \ifboolexpr{
        togl {archbool:useunpublishedthesis}
        and
        test {\iffieldundef{url}}
        and
        test {\iffieldundef{eprint}}
        and
        test {\iffieldundef{doi}}
        and
        test {\iffieldundef{series}}
        and
        test {\iffieldundef{isbn}}
        and
        test {\iflistundef{lista}}
        and
        test {\ifbibxstring{unpublished\thefield{type}}}
    }
        {\printtext[type]{\bibstring{unpublished\thefield{type}}}}
        {\printfield{type}}
}
\newcommand*{\institutionlocationdelim}{\addcomma\space}
\newcommand*{\typeinstitutiondelim}{\addspace}
\newcommand{\ifpositionlabeldate}[3]{%
    \ifdefstring{\blxarch@positionlabeldate@value}{#1}
        {#2}
        {\ifcsdef{blxarch@opt@positionlabeldate@#1}
            {#3}
            {\blxarch@errmsg{\blxarch@positionlabeldate@errstr{\unexpanded{\ifpositionlabeldate}}}}}}%
\DeclareBibliographyOption[string]{positionlabeldate}[both]{%
    \ifcsdef{blxarch@opt@positionlabeldate@#1}
        {\csuse{blxarch@opt@positionlabeldate@#1}}%
        {\blxarch@errmsg{\blxarch@positionlabeldate@errstr{option 'positionlabeldate'}}}}
\ExecuteBibliographyOptions{positionlabeldate}
\newcommand{\ifnewspaper}[2]{%
     \ifboolexpr{
        not test {\iffieldundef{newsday}}
        or
        test {\iffieldequalstr{entrysubtype}{news}}
    }
       {#1}
       {#2}}
\newbibmacro*{newsdate}{%
    \printtext[newsparens]{%
        \bibstring{articledated}%
        \addspace%
        \printnewsdate%
        \ifbibextrayear
            {\printfield{extrayear}}
            {}}}
\DeclareFieldFormat*{extradate}{\mknumalph{#1}}%
\newcommand{\ifbibextrayear}[2]{%
     \ifboolexpr{
        not test {\iffieldundef{extradate}}
        and
        test {\ifpositionlabeldate{location}}
        and
        test {\ifrepeatlabel{false}}
        and
        test {\ifbibliography}
    }
       {#1}
       {#2}}
\DeclareFieldFormat*{newsparens}{\addcomma\space#1}
\blxarch@newcounter{minrealdatediff}{3}
\blxarch@newcounter{currentrealdatediff}{0}
\DeclareBibliographyOption[integer]{minrealdatediff}[3]{%
    \setcounter{minrealdatediff}{#1}
    \addtocounter{minrealdatediff}{-1}}
\ExecuteBibliographyOptions{minrealdatediff}
\newbibmacro*{extendeddate}[2]{%
    \clearfield{#1day}%
    \clearfield{#1month}%
    \clearfield{#1endday}%
    \clearfield{#1endmonth}%
    \iffieldint{#1year}
        {\iffieldint{#2endyear}
            {\ifnumcomp{\thefield{#1year}}{>}{\thefield{#2endyear}}
                {\setcounter{currentrealdatediff}{\thefield{#1year}}%
                 \addtocounter{currentrealdatediff}{-\thefield{#2endyear}}}
                {\setcounter{currentrealdatediff}{\thefield{#2endyear}}%
                 \addtocounter{currentrealdatediff}{-\thefield{#1year}}}
             \ifnumcomp{\value{currentrealdatediff}}{>}{\value{minrealdatediff}}
                 {\printtext[#1dateparen]{\csuse{print#1date}}}
                 {}%
            }
            {\iffieldint{#2year}
                {\ifnumcomp{\thefield{#1year}}{>}{\thefield{#2year}}
                    {\setcounter{currentrealdatediff}{\thefield{#1year}}%
                     \addtocounter{currentrealdatediff}{-\thefield{#2year}}}
                    {\setcounter{currentrealdatediff}{\thefield{#2year}}%
                     \addtocounter{currentrealdatediff}{-\thefield{#1year}}}
                 \ifnumcomp{\value{currentrealdatediff}}{>}{\value{minrealdatediff}}
                     {\printtext[#1dateparen]{\csuse{print#1date}}}
                     {}%
                }%
                {}%
            }%
        }
        {\iffieldundef{#1year}
            {}
            {\printtext[#1dateparen]{\csuse{print#1date}}}}%
}
\newcommand*{\daterealdatedelim}{\addspace}
\newbibmacro*{bibliographydate}{%
    \ifpositionlabeldate{label}
        {\ifnewspaper
            {\usebibmacro{newsdate}}
            {}%
        }
        {\printtext{%
            \ifeditionsuperscript{predate}
                {\usebibmacro{editionsuperscript}}
                {}%
            \ifnewspaper
                {\usebibmacro{newsdate}}
                {\iffieldundef{year}
                    {\iffieldundef{pubstate}
                        {\printtext[missingfield]{\midsentence\bibstring{nodate}}}
                        {\printtext[missingfield]{\midsentence\printfield{pubstate}}}}%
                    {\printdate}%
                 \ifbibextrayear
                    {\printfield{extradate}}
                    {}%
                }%
            \ifeditionsuperscript{postdate}
                {\usebibmacro{editionsuperscript}}
                {}%
            \setunit{\daterealdatedelim}%
            \usebibmacro{extendeddate}{real}{}}}}
\newbibmacro*{origdate}{%
    \printtext{%
        \midsentence%
        \iffieldundef{origyear}
            {\printtext[missingfield]{\bibstring{nodate}}}
            {\printorigdate}%
        \setunit*{\daterealdatedelim}
        \usebibmacro{extendeddate}{origreal}{orig}%
}}
\xpatchbibmacro{addendum+pubstate}{\printfield{pubstate}}{}
  {}{Patching bibmacro 'addendum+pubstate' failed}
\DeclareFieldFormat*{realdateparens}{\mkbibbrackets{#1}}
\DeclareFieldFormat*{origrealdateparens}{\mkbibbrackets{#1}}
\renewrobustcmd*{\bibdaterangesep}{\bibrangedash}
\newrobustcmd*{\bibdatesubseqesep}{\slash}

\newrobustcmd*{\bibdaterangesepx}[1]{%
  \ifboolexpr{test {\iffieldint{#1year}} and test {\iffieldint{#1endyear}}}
    {\ifnumequal{\thefield{#1endyear}-\thefield{#1year}}{1}
       {\bibdatesubseqesep}
       {\bibdaterangesep}}
    {\bibdaterangesep}}
 \renewrobustcmd*{\mkdaterangefull}[2]{%
 \begingroup
    \blx@metadateinfo{#2}%
    \iffieldundef{#2year}
      {}
      {\datecircaprint
       \printtext[#2date]{%
         % Such a season component can only come from an ISO8601 season which replaces
         % a normal month so if it exists, we know that a normal date print is ruled out
         \iffieldundef{#2season}
           {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}%
            % Optionally print the time after the date
            \blx@printtime{#2}{}}
           {\csuse{mkbibseasondate#1}{#2year}{#2season}}%
         \dateuncertainprint
         \dateeraprint{#2year}%
         \iffieldundef{#2endyear}
           {}
           {\iffieldequalstr{#2endyear}{}
              {\mbox{\bibdaterangesep}}
              {\bibdaterangesepx{#2}%
                \enddatecircaprint
                \iffieldundef{#2season}
                  {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
                   % Optionally print the time after the date
                   \blx@printtime{#2}{end}}
                 {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}%
                \enddateuncertainprint
              \dateeraprint{#2endyear}}}}}%
  \endgroup}
\renewrobustcmd*{\mkdaterangetrunc}[2]{%
  \begingroup
    \blx@metadateinfo{#2}%
    \iffieldundef{#2year}
      {}
      {\datecircaprint
       \printtext[#2date]{%
         % Such a season component can only come from an ISO8601 season which replaces
         % a normal month so if it exists, we know that a normal date print is ruled out
         \iffieldundef{#2season}
           {\iffieldsequal{#2year}{#2endyear}
              {\iffieldsequal{#2month}{#2endmonth}
                 {\csuse{mkbibdate#1}{}{}{#2day}}
                 {\csuse{mkbibdate#1}{}{#2month}{#2day}}}
              {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}%
               \iffieldsequal{#2dateera}{#2enddateera}{}
                {\dateeraprint{#2year}}}}
           {\iffieldsequal{#2year}{#2endyear}
             {\csuse{mkbibseasondate#1}{}{#2season}}
             {\csuse{mkbibseasondate#1}{#2year}{#2season}%
              \iffieldsequal{#2dateera}{#2enddateera}{}
                {\dateeraprint{#2year}}}}%
         \dateuncertainprint
         \iffieldundef{#2endyear}
           {}
           {\iffieldequalstr{#2endyear}{}
              {\mbox{\bibdaterangesep}}
              {\bibdaterangesepx{#2}%
                \enddatecircaprint
                \iffieldundef{#2season}
                  {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}
                 {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}%
                \enddateuncertainprint
               \dateeraprint{#2endyear}}}}}%
  \endgroup}
\renewrobustcmd*{\mkdaterangefullextra}[2]{%
  \begingroup
    \blx@metadateinfo{#2}%
    \iffieldundef{#2year}
      {}
      {\datecircaprint
       \printtext[#2date]{%
         \printtext{%
         % Such a season component can only come from an ISO8601 season which replaces
         % a normal month so if it exists, we know that a normal date print is ruled out
         \iffieldundef{#2season}
           {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}%
            % Optionally print the time after the date
            \blx@printtime{#2}{}}
           {\csuse{mkbibseasondate#1}{#2year}{#2season}}%
         \dateuncertainprint
         \dateeraprint{#2year}%
         \iffieldundef{#2endyear}
           {\printfield{extradate}}
           {\iffieldequalstr{#2endyear}{}
              {\printfield{extradate}%
               \printtext{\mbox{\bibdaterangesep}}}
              {\printtext{%
                 \bibdaterangesepx{#2}%
                 \enddatecircaprint
                 \iffieldundef{#2season}
                   {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
                    % Optionally print the time after the date
                    \blx@printtime{#2}{end}}
                   {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}%
                 \printfield{extradate}%
                 \enddateuncertainprint
                 \dateeraprint{#2endyear}}}}}}%
  \endgroup}
\renewrobustcmd*{\mkdaterangetruncextra}[2]{%
  \begingroup
    \blx@metadateinfo{#2}%
    \iffieldundef{#2year}
      {}
      {\datecircaprint
       \printtext[#2date]{%
         \printtext{%
         % Such a season component can only come from an ISO8601 season which replaces
         % a normal month so if it exists, we know that a normal date print is ruled out
         \iffieldundef{#2season}
           {\iffieldsequal{#2year}{#2endyear}
              {\iffieldsequal{#2month}{#2endmonth}
                 {\csuse{mkbibdate#1}{}{}{#2day}}
                 {\csuse{mkbibdate#1}{}{#2month}{#2day}}}
              {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}%
               \iffieldsequal{#2dateera}{#2enddateera}{}
                 {\dateeraprint{#2year}}}}
           {\iffieldsequal{#2year}{#2endyear}
             {\csuse{mkbibseasondate#1}{}{#2season}}
             {\csuse{mkbibseasondate#1}{#2year}{#2season}%
               \iffieldsequal{#2dateera}{#2enddateera}{}
                {\dateeraprint{#2year}}}}%
         \dateuncertainprint
         \iffieldundef{#2endyear}
           {\printfield{extradate}}
           {\iffieldequalstr{#2endyear}{}
              {\printfield{extradate}%
               \printtext{\mbox{\bibdaterangesep}}}
              {\printtext{%
                 \bibdaterangesepx{#2}%
                 \enddatecircaprint
                 \iffieldundef{#2season}
                   {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}
                   {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}%
                \printfield{extradate}%
                 \enddateuncertainprint
                 \dateeraprint{#2endyear}}}}}}%
  \endgroup}
\renewrobustcmd*{\mkdaterangeymd}[1]{%
  \begingroup
    \blx@metadateinfo{#1}%
    \iffieldundef{#1year}
      {}
      {\datecircaprint
       \printtext[#1date]{%
         % Such a season component can only come from an  ISO8601 season which replaces
         % a normal month so if it exists, we know that a normal date print is ruled out
         \iffieldundef{#1season}
           {\blx@ymddate{#1}{}%
            % Optionally print the time after the date
            \blx@printtime{#1}{}}
           {\csuse{mkbibseasondateshort}{#1year}{#1season}}%
         \dateuncertainprint
         \dateeraprint{#1year}%
         \iffieldundef{#1endyear}
           {}
           {\iffieldequalstr{#1endyear}{}
              {\mbox{\bibdaterangesep}}
              {\bibdaterangesepx{#1}%
                \enddatecircaprint
                \iffieldundef{#1season}
                  {\blx@ymddate{#1}{end}%
                   % Optionally print the time after the date
                   \blx@printtime{#1}{end}}
                 {\csuse{mkbibseasondateshort}{#1endyear}{#1endseason}}%
               \enddateuncertainprint
               \dateeraprint{#1endyear}}}}}%
  \endgroup}
\renewrobustcmd*{\mkdaterangeymdextra}[1]{%
  \begingroup
    \blx@metadateinfo{#1}%
    \iffieldundef{#1year}
      {}
      {\datecircaprint
       \printtext[#1date]{%
         % Such a season component can only come from an ISO8601 season which replaces
         % a normal month so if it exists, we know that a normal date print is ruled out
         \iffieldundef{#1season}
           {\blx@ymddate[extradate]{#1}{}%
            % Optionally print the time after the date
            \blx@printtime{#1}{}}
           {\csuse{mkbibseasondateshort}{#1year}{#1season}}%
         \dateuncertainprint
         \dateeraprint{#1year}%
         \iffieldundef{#1endyear}
           {}
           {\iffieldequalstr{#1endyear}{}
              {\mbox{\bibdaterangesep}}
              {\printtext{%
                 \bibdaterangesepx{#1}%
                 \enddatecircaprint
                 \iffieldundef{#1season}
                   {\blx@ymddate{#1}{end}%
                    % Optionally print the time after the date
                    \blx@printtime{#1}{end}}
                   {\csuse{mkbibseasondateshort}{#1endyear}{#1endseason}}}%
               \enddateuncertainprint
               \dateeraprint{#1endyear}}}}}%
  \endgroup}
\DeclareBibliographyOption{giveninitligatures}[{Chr, Ch, Fr, IJ, Ll, Ph, Sch, St, Th}]{%
    \let\blxarch@giveninitligatures\@empty%
    \forcsvlist{\listadd\blxarch@giveninitligatures}{#1}%
}
\ExecuteBibliographyOptions{giveninitligatures}
\renewbibmacro*{name:family-given}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \ifdefvoid{#3}{}{%
       \ifcapital
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
         {\mkbibnameprefix{#3}\isdot}%
       \ifprefchar{}{\bibnamedelimc}}%
     \mkbibnamefamily{#1}\isdot
     \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
     \ifdefstrequal{#2}{\@empty}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamefamily{#1}\isdot
     \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
     \ifboolexpe{%
       test {\ifdefstrequal{#2}{\@empty}}
       and
       test {\ifdefvoid{#3}}}
       {}
       {\revsdnamepunct}%
     \ifdefstrequal{#2}{\@empty}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
     \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
\renewbibmacro*{name:given-family}[4]{%
  \usebibmacro{name:delim}{#2#3#1}%
  \usebibmacro{name:hook}{#2#3#1}%
  \ifdefstrequal{#2}{\@empty}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
  \ifdefvoid{#3}{}{%
    \mkbibnameprefix{#3}\isdot
    \ifprefchar
      {}
      {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
  \mkbibnamefamily{#1}\isdot
  \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
\DeclareNameFormat{given-family}{%
    \ifdefvoid{\namepartgiven}
        {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\@empty}
          {\namepartprefix}
          {\namepartsuffix}}
          {%
            \ifgiveninits
              {\usebibmacro{name:given-family}
              {\namepartfamily}
              {\blxarch@ligatureinitchars{\namepartgiven}}
              {\namepartprefix}
              {\namepartsuffix}}
            {\usebibmacro{name:given-family}
              {\namepartfamily}
              {\namepartgiven}
              {\namepartprefix}
              {\namepartsuffix}}}%
    \usebibmacro{name:andothers}}
\DeclareNameFormat{family-given}{%
    \ifdefvoid{\namepartgiven}
        {\usebibmacro{name:family-given}
          {\namepartfamily}
          {\@empty}
          {\namepartprefix}
          {\namepartsuffix}}
          {%
            \ifgiveninits
              {\usebibmacro{name:family-given}
              {\namepartfamily}
              {\blxarch@ligatureinitchars{\namepartgiven}}
              {\namepartprefix}
              {\namepartsuffix}}
            {\usebibmacro{name:family-given}
              {\namepartfamily}
              {\namepartgiven}
              {\namepartprefix}
              {\namepartsuffix}}}%
    \usebibmacro{name:andothers}}
\DeclareNameFormat{family-given/given-family}{%
  \ifnumequal{\value{listcount}}{1}
    {\ifgiveninits
       {\ifdefvoid{\namepartgiven}
           {\usebibmacro{name:family-given}
             {\namepartfamily}
             {\@empty}
             {\namepartprefix}
             {\namepartsuffix}}
           {\usebibmacro{name:family-given}
             {\namepartfamily}
             {\blxarch@ligatureinitchars{\namepartgiven}}
             {\namepartprefix}
             {\namepartsuffix}}}
       {\usebibmacro{name:family-given}
         {\namepartfamily}
         {\namepartgiven}
         {\namepartprefix}
         {\namepartsuffix}}%
     \ifboolexpe{%
       test {\ifdefvoid\namepartgiven}
       and
       test {\ifdefvoid\namepartprefix}}
       {}
       {\usebibmacro{name:revsdelim}}}
    {\ifgiveninits
       {\ifdefvoid{\namepartgiven}
           {\usebibmacro{name:given-family}
             {\namepartfamily}
             {\@empty}
             {\namepartprefix}
             {\namepartsuffix}}
           {\usebibmacro{name:given-family}
             {\namepartfamily}
             {\blxarch@ligatureinitchars{\namepartgiven}}
             {\namepartprefix}
             {\namepartsuffix}}}
       {\usebibmacro{name:given-family}
         {\namepartfamily}
         {\namepartgiven}
         {\namepartprefix}
         {\namepartsuffix}}}%
  \usebibmacro{name:andothers}}
\DeclareNameFormat{g-family}{%
    \ifdefvoid{\namepartgiven}
        {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\@empty}
          {\namepartprefix}
          {\namepartsuffix}}
        {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\blxarch@ligatureinitchars{\namepartgiven}}
          {\namepartprefix}
          {\namepartsuffix}}
  \usebibmacro{name:andothers}}
\DeclareNameFormat{gfull-family}{%
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}
  \usebibmacro{name:andothers}}
\DeclareNameAlias{bookauthor}{family-given}
\newcommand{\ifidemincitation}[2]{%
    \ifboolexpr{
        togl {archbool:idemincitation}
        and
        test {\ifcitation}
        and
        test {\ifciteidem}
    }
        {#1}
        {#2}}
\newtoggle{archbool:idemincitation}
\DeclareBibliographyOption{idemincitation}[true]{%
    \settoggle{archbool:idemincitation}{#1}}
\ExecuteBibliographyOptions{idemincitation}
\newcommand*{\seenotedelim}{\addspace}
\newtoggle{archbool:preservelastauthor}
\DeclareBibliographyOption{preservelastauthor}[true]{%
    \settoggle{archbool:preservelastauthor}{#1}}
\ExecuteBibliographyOptions{preservelastauthor}
\newcommand*{\mkbibandothers}[1]{#1}
\renewbibmacro*{name:andothers}{%
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \printdelim{andothersdelim}\bibstring[\mkbibandothers]{andothers}}%
    {}}
\newbibmacro*{name:andothersgenitive}{%
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \printdelim{andothersdelim}\bibstring[\mkbibandothers]{genitiveandothers}%
     \let\blxarch@namepartfamily\@empty}
    {}%
}
\DeclareFieldAlias{authortype}{editortype}
\DeclareFieldFormat*{editortype}{\mkbibparens{#1}}
\DeclareFieldAlias{translatortype}{editortype}
\blxarch@newcounter{preservelastauthorloop}{1}
\newbibmacro*{names:truncate}[1]{%
    \ifboolexpr{
        togl{archbool:preservelastauthor}
        and
        test {\ifnumgreater{\value{#1}}{\value{maxnames}}}
        and
        test {\ifbibliography}
    }
        {\savebibmacro{name:andothers}\renewbibmacro*{name:andothers}{\relax}%
         \printnames[][1-1]{#1}%
         \setcounter{preservelastauthorloop}{2}%
         \unlessboolexpr{
            test {\ifnumequal{\value{preservelastauthorloop}}{\value{maxnames}}}
         }
            {\setunit{\multinamedelim}%
             \printnames[][\value{preservelastauthorloop}-\value{preservelastauthorloop}]{#1}%
             \stepcounter{preservelastauthorloop}}
            {\setunit{\finalnameellipsis}%
             \printnames[][\value{#1}-\value{#1}]{#1}}%
         \restorebibmacro{name:andothers}%
        }
        {\printnames{#1}}%
}
\renewbibmacro*{sortnamelist}[1]{%
    \ifidemincitation
        {\printtext{\bibstring{idem\thefield{gender}}}}
        {\usebibmacro{names:truncate}{#1}}}
\newbibmacro*{labeldate+edition}{%
    \begin{tabbedlabeldate}%
    \ifpositionlabeldate{location}
        {}
        {\printtext[labeldateparens]{%
            \ifeditionsuperscript{predate}
                {\usebibmacro{editionsuperscript}}%
                {}%
            \usebibmacro{date+extradate}%
            \ifeditionsuperscript{postdate}
                {\usebibmacro{editionsuperscript}}%
                {}%
            \ifpositionlabeldate{label}
                {\setunit{\daterealdatedelim}%
                 \usebibmacro{extendeddate}{real}{}}
                {}}}}
\DeclareListFormat*{labeldateparens}{#1}
\DeclareDelimFormat{authortypedelim,editortypedelim,translatortypedelim}{\addspace}
\newcommand*{\finalnameellipsis}{\addspace\textellipsis\space}
\renewbibmacro*{editor+others}{%
    \usebibmacro{editor}%
}
\renewbibmacro*{translator+others}{%
    \usebibmacro{translator}%
}
\newrobustcmd*{\DefineGenitiveApostropheChars}[2]{%
    \DefineBibliographyExtras{#1}{%
        \let\blxarch@genitiveapostrophechars\@empty%
        \forcsvlist{\listadd\blxarch@genitiveapostrophechars}{#2}%
}}
\newrobustcmd*{\DeclareGenitiveApostropheChars}[1]{%
    \DeclareBibliographyExtras{%
        \let\blxarch@genitiveapostrophechars\@empty%
        \forcsvlist{\listadd\blxarch@genitiveapostrophechars}{#1}%
}}
\newtoggle{archbool:genitiveapostrophe}
\newbibmacro*{genitive}[1]{%
    \ifdefvoid{#1}
        {}
        {\togglefalse{archbool:genitiveapostrophe}%
         \fullexpandarg%
         \StrRemoveBraces{#1}[\blxarch@nobraces]%
         \renewcommand*{\do}[1]{%
            \IfEndWith{\blxarch@nobraces}{##1}
                {\toggletrue{archbool:genitiveapostrophe}\listbreak}
                {}%
         }%
         \dolistloop{\blxarch@genitiveapostrophechars}%
         \iftoggle{archbool:genitiveapostrophe}
            {\bibstring{genitiveapostrophe}}
            {\bibstring{genitives}}%
        }%
}
\DeclareNameFormat{labelname:poss}{
    \let\blxarch@namepartfamily\namepartfamily%
    \ifcase\value{uniquename}%
        \usebibmacro{name:family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}%
    \or
        \ifuseprefix
            {\usebibmacro{name:given-family}{\namepartfamily}{\blxarch@ligatureinitchars{\namepartgiven}}{\namepartprefix}{\namepartsuffixi}}
            {\usebibmacro{name:given-family}{\namepartfamily}{\blxarch@ligatureinitchars{\namepartgiven}}{\namepartprefixi}{\namepartsuffixi}}%
    \or
        \usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}%
    \fi
    \usebibmacro{name:andothersgenitive}%
    \ifnumequal{\value{listcount}}{\value{liststop}}{\usebibmacro{genitive}{\blxarch@namepartfamily}}{}}
\DeclareFieldFormat{shorthand:poss}{%
    \ifnameundef{labelname}{#1\def\blxarch@genitivecheck{#1}\usebibmacro{genitive}{\blxarch@genitivecheck}}{}}
\DeclareFieldFormat{citetitle:poss}{#1\def\blxarch@genitivecheck{#1}\usebibmacro{genitive}{\blxarch@genitivecheck}}
\DeclareFieldFormat{label:poss}{#1\def\blxarch@genitivecheck{#1}\usebibmacro{genitive}{\blxarch@genitivecheck}}
\newrobustcmd*{\posscitealias}{%
    \AtNextCite{%
        \DeclareNameAlias{labelname}{labelname:poss}%
        \DeclareFieldAlias{shorthand}{shorthand:poss}%
        \DeclareFieldAlias{citetitle}{citetitle:poss}%
        \DeclareFieldAlias{label}{label:poss}}}
\newrobustcmd*{\posscite}{%
    \posscitealias%
    \textcite}
\newrobustcmd*{\Posscite}{\bibsentence\posscite}
\newrobustcmd*{\posscites}{%
    \posscitealias%
    \textcites}
\newrobustcmd*{\Posscites}{\bibsentence\posscites}
\renewcommand*{\multicitedelim}{\addspace\textendash\space}
\newcommand*\strongcitedelim{\addperiod\space\textendash\space}
\renewcommand*{\compcitedelim}{\addsemicolon\space}
\newtoggle{archbool:citeshortin}
\DeclareBibliographyOption[boolean]{citeshortin}[true]{%
    \settoggle{archbool:citeshortin}{#1}%
    \ifboolexpr{
        togl {archbool:citeshortin}
        and
        not test {\ifcsdef{blxarch@fork@verbose}}
    }
        {\blxarch@errmsg{option 'citeshortin=true' only in verbose styles}}
        {}%
}
\ExecuteBibliographyOptions{citeshortin=false}
\DeclareFieldFormat*{citetitle}{#1}
\DeclareLabeldate{%
    \field{date}
    \field{pubstate}
    \literal{nodate}
}
\DeclareLabelname{%
    \field{shortauthor}
    \field{author}
    \field{editor}
    \field{translator}
    \field{anonstring}
}
\renewcommand*{\labelnamepunct}{\unspace\addcolon\space}
\newcommand{\ifseenote}[2]{#2}
\newtoggle{archbool:uselabeltitle}
\DeclareEntryOption{uselabeltitle}[false]{%
    \settoggle{archbool:uselabeltitle}{#1}}
\RequirePackage{array}
\RequirePackage{calc}
\RequirePackage{tabulary}
\newtoggle{archbool:tabbedlabeldate}
\DeclareBibliographyOption{tabbedlabeldate}[false]{%
    \settoggle{archbool:tabbedlabeldate}{#1}}
\ExecuteBibliographyOptions{tabbedlabeldate}
\newcommand{\iftabbedlabeldate}[2]{%
    \ifboolexpr{
        togl {archbool:tabbedlabeldate}
        and
        test {\ifbibliography}
        and
        not test {\ifpositionlabeldate{location}}
    }
            {#1}
            {#2}}
\newenvironment{tabbedlabeldate}
    {\iftabbedlabeldate
        {\newline%
         \tabulary{\textwidth}
            {@{\hspace{0em}}p{\tabbedlabeldatewidth}@{\hspace{0em}}p{\textwidth-\tabbedlabeldatewidth}@{\hspace{0em}}}%
         \midsentence}
        {}%
    }
    {\iftabbedlabeldate{\endtabulary}{}}
\newlength{\tabbedlabeldatewidth}
\setlength{\tabbedlabeldatewidth}{3em}
\newtoggle{archbool:seriesorlocation}
\DeclareBibliographyOption{seriesorlocation}[true]{%
    \settoggle{archbool:seriesorlocation}{#1}}
\ExecuteBibliographyOptions{seriesorlocation}
\newtoggle{archbool:subseries}
\DeclareBibliographyOption{subseries}[true]{%
    \settoggle{archbool:subseries}{#1}}
\ExecuteBibliographyOptions{subseries}
\newtoggle{archbool:shortseries}
\DeclareBibliographyOption{shortseries}[true]{%
    \settoggle{archbool:shortseries}{#1}}
\ExecuteBibliographyOptions{shortseries}
\newtoggle{archbool:noseries}
\DeclareBibliographyOption{noseries}[false]{%
    \settoggle{archbool:noseries}{#1}}
\ExecuteBibliographyOptions{noseries}
\newcommand*{\seriespunct}{\addperiod\space}
\newcommand*{\noseriespunct}{\seriespunct}
\newcommand*{\seriesnumberdelim}{\addspace}
\newcommand*{\subnumberseriesdelim}{\addspace=\space}
\renewbibmacro*{series+number}{%
    \iffieldundef{series}
        {}
        {\printtext[seriesparens]{%
            \iffieldundef{subseries}
                {}
                {\printfield{subseries}%
                \setunit*{\seriesnumberdelim}
                \printfield{subnumber}%
                \setunit{\subnumberseriesdelim}}%
            \printfield{series}%
            \setunit*{\seriesnumberdelim}%
            \printfield{number}%
        }}%
        \iftoggle{archbool:volumeafterseries}
            {\setunit{\addspace}\printfield{volume}%
            \printfield{part}%
            \clearfield{volume}}
            {}%
        \ifpagesfirst
            {\usebibmacro{chapter+pages}%
             \clearfield{chapter}%
             \clearfield{pages}}
            {\iffieldundef{series}
                {\iftoggle{archbool:notitlepunct}
                    {}
                    {\printunit{\noseriespunct\nopunct}}}%
                {\printunit{\seriespunct\nopunct}}%
            }%
}%
\xpatchbibdriver{book}{usebibmacro {series+number}\newunit}
    {usebibmacro{series+number}}
    {}{Patching driver 'book' failed (5)}
\xpatchbibdriver{inbook}{usebibmacro {series+number}\newunit}
    {usebibmacro{series+number}}
    {}{Patching driver 'inbook' failed (4)}
\DeclareFieldFormat[book,inbook]{volume}{\addspace#1}
\DeclareFieldFormat*{pagetotal}{}
 \xpatchbibdriver{thesis}{\newunit \printfield {pagetotal}}
  {\setunit{\bibpagespunct}\printfield{pagetotal}}
  {}{Patching driver 'thesis' failed (1)}
\renewcommand*{\labelnamepunct}{\adddot\space}
\urlstyle{same}
\DeclareFieldFormat*{url}{\bibstring{urlfrom}\addcolon\space\url{#1}}
\renewcommand*{\finalnamedelim}{\addcomma\addspace}
\DeclareListFormat*{language}{}
\newcommand{\printgiveninitligatureslist}{%
    \renewcommand*{\do}[1]{\space##1}
        \dolistloop{\@blxarch@list@add@ligatures}}
\newrobustcmd*{\SuppressAdditiveLbxSuffixes}{%
    \let\blx@lng@suff\@empty}
\edef\blxarch@style@ay{authoryear-archaeology (generic)}
\edef\blxarch@style@ayc{authoryear-comp-archaeology (generic)}
\edef\blxarch@style@ayi{authoryear-ibid-archaeology (generic)}
\edef\blxarch@style@ayic{authoryear-icomp-archaeology (generic)}
\edef\blxarch@style@numc{numeric-comp-archaeology (generic)}
\edef\blxarch@style@v{verbose-archaeology (generic)}
\edef\blxarch@style@vi{verbose-ibid-archaeology (generic)}
\edef\blxarch@style@vttwo{verbose-trad2note-archaeology (generic)}
\edef\blxarch@style@dguf@info{Deutsche Gesellschaft f\"ur Ur- und Fr\"uhgeschichte}
\edef\blxarch@style@dguf{\blxarch@style@dguf@info\space[obsolete \RN{2}]}
\edef\blxarch@style@dgufalt{\blxarch@style@dguf@info\space[obsolete \RN{1}]}
\edef\blxarch@style@dgufapa{\blxarch@style@dguf@info\space(APA)}
\edef\blxarch@style@mpk@info{Mitteilungen der Pr\"ahistorischen Kommission der \"Osterreichischen Akadademie der Wissenschaften}
\edef\blxarch@style@mpk{\blxarch@style@mpk@info\space[obsolete]}
\edef\blxarch@style@mpkoeaw{\blxarch@style@mpk@info\space[current]}
\edef\blxarch@style@rgk{R\"omisch-Germanische Kommission}
\edef\blxarch@style@rgkverbose{\blxarch@style@rgk\space(geisteswissenschaftlich)}
\edef\blxarch@style@rgkinline{\blxarch@style@rgk\space(naturwissenschaftlich)}
\edef\blxarch@style@rgknumeric{\blxarch@style@rgk\space(numerisch)}
\edef\blxarch@style@rgzm{R\"omisch-Germanisches Zentralmuseum Mainz}
\edef\blxarch@style@rgzminline{\blxarch@style@rgzm\space(naturwissenschaftlich)}
\edef\blxarch@style@rgzmnumeric{\blxarch@style@rgzm\space(numerisch)}
\edef\blxarch@style@rgzmverbose{\blxarch@style@rgzm\space(geisteswissenschaftlich)}
\edef\blxarch@style@muenster{Ur- und Fr\"uhgeschichtliche Arch\"aologie M\"unster}
\edef\blxarch@style@muensterverbose{\blxarch@style@muenster\space(geisteswissenschaftlich)}
\edef\blxarch@style@muensternumeric{\blxarch@style@muenster\space(numerisch)}
\edef\blxarch@style@muensterinline{\blxarch@style@muenster\space(naturwissenschaftlich)}
\edef\blxarch@style@kunde{Die Kunde. Zeitschrift f\"ur nieders\"asische Arch\"aologie}
\edef\blxarch@style@niedersachsen{Archäologische Kommission für Niedersachsen e.\,V.}
\edef\blxarch@style@nnu{Nachrichten aus Niedersachsens Urgeschichte}
\edef\blxarch@style@aefkw{\"Agyptologische Forschungsst\"atte f\"ur Kulturwissenschaft (\"AFKW)}
\edef\blxarch@style@afwl{Ausgrabungen und Funde in Westfalen-Lippe}
\edef\blxarch@style@amit{Arch\"aologische Berichte aus Iran und Turan (AMIT)}
\edef\blxarch@style@archa{Archaeologia Austriaca (ArchA)}
\edef\blxarch@style@eaz{Ethnographisch-Arch\"aologische Zeitschrift (EAZ)}
\edef\blxarch@style@eazalt{\blxarch@style@eaz\space[obsolete]}
\edef\blxarch@style@foe{Fundberichte aus \"Osterreich (F\"O)}
\edef\blxarch@style@jbhalle{Jahresschrift f\"ur mitteldeutsche Vorgeschichte}
\edef\blxarch@style@jbkrneuss{Jahrbuch f\"ur den Rhein-Kreis Neuss}
\edef\blxarch@style@karl{Karl. Das kulturelle Schachmagazin}
\edef\blxarch@style@maja{M\"unchner Arbeitskreis Junge Aegyptologie (MAJA)}
\edef\blxarch@style@offa{Offa}
\edef\blxarch@style@sak{Studien zur Alt\"agyptischen Kultur}
\edef\blxarch@style@volkskunde{Zeitschrift f\"ur Volkskunde}
\edef\blxarch@style@zaak{Zeitschrift f\"ur Arch\"aologie au\ss ereurop\"aischer Kulturen (ZAAK)}
\edef\blxarch@style@zaes{Zeitschrift f\"ur \"Agyptische Sprache und Altertumskunde (Z\"AS)}
\endinput
%%
%% End of file `biblatex-archaeology.sty'.
