%%
%% This is file `aebpro.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% aeb_pro.dtx  (with options: `copyright,aebpro')
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% aeb_pro.sty package,                  2006-9-08      %%
%% Copyright (C) 2006  D. P. Story                      %%
%%   dpstory@acrotex.net                                %%
%%                                                      %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License        %%
%% Distributed from CTAN archives in directory          %%
%% macros/latex/base/lppl.txt; either version 1 of the  %%
%% License, or (at your option) any later version.      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\@tfor\aeb@windowopts:={{fit}{FitWindow}}{{center}{CenterWindow}}%
    {{fullscreen}{FullScreen}}{{showtitle}{DisplayDocTitle}}\do
{%
    \expandafter\getargs\aeb@windowopts
    \edef\temp@expand@def{%
            \noexpand\define@key{aebWindowOpts}{\aeb@argi}[true]{%
            \noexpand\def\csname aeb@windowopts\aeb@argii\endcsname{/\aeb@argii\space##1}%
        }%
    }\temp@expand@def
    \expandafter\let\csname aeb@windowopts\aeb@argii\endcsname\@empty
}
\newcommand{\setWindowOptions}[1]{\setkeys{aebWindowOpts}{#1}}
\@tfor\aeb@uiopts:={{hidetoolbar}{HideToolbar}}{{hidemenubar}{HideMenubar}}%
    {{hidewindowui}{HideWindowUI}}\do
{%
    \expandafter\getargs\aeb@uiopts
    \edef\temp@expand@def{%
        \noexpand\define@key{aebUIOpts}{\aeb@argi}[true]%
        {%
            \noexpand\edef\csname aeb@uiopts\aeb@argii\endcsname{/\aeb@argii\space##1}%
        }%
    }\temp@expand@def
    \expandafter\let\csname aeb@uiopts\aeb@argii\endcsname\@empty
}
\newcommand{\setUIOptions}[1]{\setkeys{aebUIOpts}{#1}}
\define@choicekey+{aebLayoutMag}{navitab}{UseNone,UseOutlines,UseThumbs,FullScreen,%
    UseOC,UseAttachments}[UseNone]{%
        \def\aeb@layoutMagNaviTab{#1}%
}{\PackageWarning{aeb}{Bad choice for PageLayout, permissible values
   are UseNone, UseOutlines, UseThumbs, FullScreen,%
    UseOC, UseAttachments. Try again}}
\let\aeb@layoutMagNaviTab\@empty
\define@choicekey+{aebLayoutMag}{pagelayout}{SinglePage,OneColumn,%
    TwoColumnLeft,TwoColumnRight,TwoPageLeft,TwoPageRight}[SinglePage]{%
        \def\aeb@layoutMagPageLayout{#1}%
}{\PackageWarning{aeb}{Bad choice for PageLayout, permissible values
   are SinglePage, OneColumn, TwoColumnLeft, TwoColumnRight,
   TwoPageLeft,TwoPageRight. Try again}}
\let\aeb@layoutMagPageLayout\@empty
\define@choicekey+{aebLayoutMag}{mag}[\val\nr]%
    {ActualSize,FitPage,FitWidth,FitHeight,FitVisible}[FitPage]%
{%
    \ifcase\nr\relax
        \def\aeb@layoutMagMag{/XYZ -32768 -32768 1.0}%
    \or
        \def\aeb@layoutMagMag{/Fit}%
    \or
        \def\aeb@layoutMagMag{/FitH -32768}%
    \or
        \def\aeb@layoutMagMag{/FitV -32768}%
    \or
        \def\aeb@layoutMagMag{/FitBH -32768}%
    \fi
}{\edef\aeb@layoutMagMag{/XYZ -32768 -32768 \val\space 100 div}}
\let\aeb@layoutMagMag\@empty
\define@key{aebLayoutMag}{openatpage}[1]{\def\aeb@openatpageChoice{#1}%
    \def\aeb@layoutMagPage{Page#1}}
\let\aeb@openatpageChoice\@empty
\let\aeb@layoutMagPage\@empty
\newcommand{\setLayoutMag}[1]{\edef\temp@expand@sets{%
    \noexpand\setkeys{aebLayoutMag}{\ifx\aeb@openatpageChoice\@empty
        openatpage=1\else openatpage=\aeb@openatpageChoice\fi}}%
    \temp@expand@sets\setkeys{aebLayoutMag}{#1}}
\define@key{aebDeclareInitView}{layoutmag}
    {\def\aebDeclareInitView@layoutmag{#1}}
\let\aebDeclareInitView@layoutmag\@empty
\define@key{aebDeclareInitView}{windowoptions}
    {\def\aebDeclareInitView@windowoptions{#1}}
\let\aebDeclareInitView@windowoptions\@empty
\define@key{aebDeclareInitView}{uioptions}
    {\def\aebDeclareInitView@uioptions{#1}}
\let\aebDeclareInitView@uioptions\@empty
\newcommand{\DeclareInitView}[1]{%
    \setkeys{aebDeclareInitView}{#1}%
    \edef\temp@expand@sets{%
        \noexpand\setLayoutMag{\aebDeclareInitView@layoutmag}%
        \noexpand\setWindowOptions{\aebDeclareInitView@windowoptions}%
        \noexpand\setUIOptions{\aebDeclareInitView@uioptions}%
    }\temp@expand@sets
}
\let\aeb@additionalOpenAction\@empty
\newcommand{\addtionalOpenAction}[1]{%
    \def\aeb@additionalOpenAction{/Next {aebAdditionalOpenAction}}%
    \setLayoutMag{}%
    \literalps@out{[/_objdef {aebAdditionalOpenAction} /type/dict /OBJ pdfmark
    [ {aebAdditionalOpenAction} << #1 >> /PUT pdfmark}%
}
\newcommand{\requiresVersion}[1]{%
    \def\requiredVersionNumber{#1}\addtionalOpenAction{\JS{%
    if(app.viewerVersion < #1 ) {
    try {
        if (this.external) {
            app.alert("\aeb@requiredVersionMsgRedirect");
            if (app.viewerVersion >= 7.0)
                app.launchURL("\aebAlternateDocumentURL");
            else
                this.getURL("\aebAlternateDocumentURL",false);
        } else {
            app.alert("\aeb@requiredVersionMsg");
            this.closeDoc(true);
        }
    } catch(e) {};
    } else {
        \aeb@ViewerPassedRequirementJS
    }
}}}
\def\requiredVersionNumber{7}
\newcommand{\alternateDocumentURL}[1]{\def\aebAlternateDocumentURL{#1}}
\alternateDocumentURL{http://www.acrotex.net/}
\newcommand{\requiredVersionMsg}[1]{\def\aeb@requiredVersionMsg{#1}}
\requiredVersionMsg{This document requires Adobe Reader or Acrobat,
    version \requiredVersionNumber\space or later. The document is now
    closing.}
\newcommand{\requiredVersionMsgRedirect}[1]{%
    \def\aeb@requiredVersionMsgRedirect{#1}}
\requiredVersionMsgRedirect{%
    This document requires Adobe Reader or Acrobat,
    version \requiredVersionNumber\space or later.
    Redirecting browser to an alternate page.}
\newcommand{\afterRequirementPassedJS}[1]{%
    \def\aeb@ViewerPassedRequirementJS{#1}}
\let\aeb@ViewerPassedRequirementJS\@empty
\def\aeb@SetCatalog{\literalps@out{%
[ {Catalog} <</ViewerPreferences<<%
    \ifx\aeb@windowoptsFitWindow\@empty\else
        \aeb@windowoptsFitWindow\fi
    \ifx\aeb@windowoptsCenterWindow\@empty\else
        \aeb@windowoptsCenterWindow\fi
    \ifx\aeb@windowoptsDisplayDocTitle\@empty\else
        \aeb@windowoptsDisplayDocTitle\fi
    \ifx\aeb@uioptsHideToolbar\@empty\else
        \aeb@uioptsHideToolbar\fi
    \ifx\aeb@uioptsHideMenubar\@empty\else
        \aeb@uioptsHideMenubar\fi
    \ifx\aeb@uioptsHideWindowUI\@empty\else
        \aeb@uioptsHideWindowUI\fi
    \ifx\aeb@layoutMagNaviTab\@empty\else
        /NonFullScreenPageMode/\aeb@layoutMagNaviTab\fi
    >>%
    \ifx\aeb@layoutMagPageLayout\@empty\else
        /PageLayout/\aeb@layoutMagPageLayout%
    \fi
    \ifx\aeb@windowoptsFullScreen\@empty
        \ifx\aeb@layoutMagNaviTab\@empty\else
            /PageMode/\aeb@layoutMagNaviTab%
        \fi
    \else
        /PageMode/FullScreen%
    \fi
    \ifx\aeb@layoutMagPage\@empty
        \ifx\aeb@layoutMagMag\@empty
        \else
            /OpenAction<</D[{Page1}\aeb@layoutMagMag]/S/GoTo\aeb@additionalOpenAction>>%
        \fi
    \else
        \ifx\aeb@layoutMagMag\@empty
            /OpenAction<</D[{\aeb@layoutMagPage}/Fit]/S/GoTo\aeb@additionalOpenAction>>%
        \else
            /OpenAction<</D[{\aeb@layoutMagPage}\aeb@layoutMagMag]/S/GoTo\aeb@additionalOpenAction>>%
        \fi
    \fi
>> /PUT pdfmark}}
\AtBeginDocument{\aeb@SetCatalog}
\newcommand{\setDefaultFS}[1]
{%
    \setkeys{aebDefFS}{Trans=Replace}\setkeys{aebDefFS}{#1}%
    \makeatletter
    \InputIfFileExists{fsprodef.js}{}{\PackageWarning{aeb}
        {Cannot find fsdef.js, please run aeb.ins again}}
    \makeatother
}
\@onlypreamble\setDefaultFS
\def\aeb@NoTransition{NoTransition}
\define@choicekey+{aebDefFS}{Trans}
{NoTransition,UncoverLeft,UncoverRight,UncoverDown,UncoverUp,%
UncoverLeftDown,UncoverLeftUp,UncoverRightDown,UncoverRightUp,%
CoverLeft,CoverRight,CoverDown,CoverUp,CoverLeftDown,CoverLeftUp,%
CoverRightDown,CoverRightUp,PushLeft,PushRight,PushDown,PushUp,%
PushLeftDown,PushLeftUp,PushRightDown,PushRightUp,FlyInRight,%
FlyInLeft,FlyInDown,FlyInUp,FlyOutRight,FlyOutLeft,FlyOutDown,%
FlyOutUp,FlyIn,FlyOut,Blend,Fade,Random,Dissolve,%
GlitterRight,GlitterDown,GlitterRightDown,BoxIn,BoxOut,%
BlindsHorizontal,BlindsVertical,SplitHorizontalIn,%
SplitHorizontalOut,SplitVerticalIn,SplitVerticalOut,WipeLeft,%
WipeRight,WipeDown,WipeUp,WipeLeftDown,WipeLeftUp,%
WipeRightDown,WipeRightUp,Replace,ZoomInDown,ZoomInLeft,%
ZoomInLeftDown,ZoomInLeftUp,ZoomInRight,ZoomInRightDown,%
ZoomInRightUp,ZoomInUp,ZoomOutDown,ZoomOutLeft,ZoomOutLeftDown,%
ZoomOutLeftUp,ZoomOutRight,ZoomOutRightDown,ZoomOutRightUp,%
ZoomOutUp,CombHorizontal,CombVertical}[Replace]{%
    \def\aeb@arg{#1}\ifx\aeb@arg\@empty
    \let\aeb@fsTran=\@empty\else
    \ifx\aeb@arg\aeb@NoTransition
        \def\aeb@fsTran{app.fs.defaultTransition = "";^^J}
    \else
    \def\aeb@fsTran{app.fs.defaultTransition = "#1";^^J}\fi\fi}
{\PackageWarning{aeb}{Bad choice, try again. Meanwhile,
    will use the default, Replace}%
    \def\aeb@fsTran{app.fs.defaultTransition = "Replace";^^J}}
\define@key{aebDefFS}{bgColor}[]{%
    \def\aeb@arg{#1}\ifx\aeb@arg\@empty
    \let\aeb@fsBGColor=\@empty\else
    \def\aeb@fsBGColor{app.fs.backgroundColor = #1;^^J}\fi}
\let\aeb@fsBGColor=\@empty
\define@key{aebDefFS}{timeDelay}[]{%
    \def\aeb@arg{#1}\ifx\aeb@arg\@empty
    \let\aeb@fstimeDelay=\@empty\else
    \def\aeb@fstimeDelay{app.fs.timeDelay = #1;^^J}\fi}
\let\aeb@fstimeDelay=\@empty
\define@boolkey{aebDefFS}{loop}[true]{%
    \def\aeb@fsLoop{app.fs.loop = #1;^^J}}
\let\aeb@fsLoop=\@empty
\define@choicekey+{aebDefFS}{cursor}{hidden,delay,visible}{%
    \def\aeb@arg{#1}\ifx\aeb@arg\@empty
    \let\aeb@fscursor=\@empty\else
    \def\aeb@fscursor{app.fs.cursor = cursor.#1;^^J}\fi
}{\PackageWarning{aeb}{Bad choice for cursor, permissible values
   are hidden, delay and visible. Try again}}
\let\aeb@fscursor=\@empty
\define@boolkey{aebDefFS}{escape}[true]{%
    \def\aeb@fsEscape{app.fs.escapeExits = #1;^^J}}
\let\aeb@fsEscape=\@empty
\define@boolkey{aebDefFS}{clickAdv}[true]{%
    \def\aeb@fsclickAdv{app.fs.clickAdvances = #1;^^J}}
\let\aeb@fsclickAdv=\@empty
\define@boolkey{aebDefFS}{fullscreen}[true]{%
        \def\aeb@windowoptsFullScreen{true}%
}
\let\aeb@fsFS=\@empty
\define@boolkey{aebDefFS}{useTimer}[true]{%
    \def\aeb@fsuseTimer{app.fs.useTimer = #1;^^J}}
\let\aeb@fsuseTimer=\@empty
\define@boolkey{aebDefFS}{usePageTiming}[true]{%
    \def\aeb@fsusePageTiming{app.fs.usePageTiming = #1;^^J}}
\let\aeb@fsusePageTiming=\@empty
\newcommand{\setPageTransition}[1]{%
    \begingroup
    \setkeys{aebTrans}{TransDur,Speed}%
    \setkeys{aebTrans}{#1}%
    \ifx\aeb@TranChoice\@empty\else
    \literalps@out{ [ {ThisPage} << \aeb@Page@Dur
        /Trans <<\aeb@Trans@Dur\aeb@TranChoice>> >> /PUT pdfmark}%
    \fi
    \endgroup
}
\newcommand{\setPageTransitionAt}[2]{%
    \begingroup
    \setkeys{aebTrans}{#2}%
    \ifx\aeb@TranChoice\@empty\else
        \expandafter\aebp@rse\expandafter{#1}%
        \edef\shakeandbake{%
            \noexpand\@for\noexpand\@mytoks:=\the\aeb@parsetoks}%
        \shakeandbake \do {%
            \literalps@out{ [ {Page\@mytoks} << \aeb@Page@Dur
            /Trans <<\aeb@Trans@Dur\aeb@TranChoice>> >> /PUT pdfmark}%
        }%
    \fi
    \endgroup
}
\define@choicekey+{aebTrans}{Trans}
{NoTransition,UncoverLeft,UncoverRight,UncoverDown,UncoverUp,%
UncoverLeftDown,UncoverLeftUp,UncoverRightDown,UncoverRightUp,%
CoverLeft,CoverRight,CoverDown,CoverUp,CoverLeftDown,CoverLeftUp,%
CoverRightDown,CoverRightUp,PushLeft,PushRight,PushDown,PushUp,%
PushLeftDown,PushLeftUp,PushRightDown,PushRightUp,FlyInRight,%
FlyInLeft,FlyInDown,FlyInUp,FlyOutRight,FlyOutLeft,FlyOutDown,%
FlyOutUp,FlyIn,FlyOut,Blend,Fade,Random,Dissolve,%
GlitterRight,GlitterDown,GlitterRightDown,BoxIn,BoxOut,%
BlindsHorizontal,BlindsVertical,SplitHorizontalIn,%
SplitHorizontalOut,SplitVerticalIn,SplitVerticalOut,WipeLeft,%
WipeRight,WipeDown,WipeUp,WipeLeftDown,WipeLeftUp,%
WipeRightDown,WipeRightUp,Replace,ZoomInDown,ZoomInLeft,%
ZoomInLeftDown,ZoomInLeftUp,ZoomInRight,ZoomInRightDown,%
ZoomInRightUp,ZoomInUp,ZoomOutDown,ZoomOutLeft,ZoomOutLeftDown,%
ZoomOutLeftUp,ZoomOutRight,ZoomOutRightDown,ZoomOutRightUp,%
ZoomOutUp,CombHorizontal,CombVertical}[Replace]%
    {\edef\aeb@TranChoice{\csname aeb@Trans@#1\endcsname}%
}{\PackageWarning{aeb}{Bad choice, try again}}
\let\aeb@TranChoice=\@empty
\define@key{aebTrans}{TransDur}[]{\def\aeb@arg{#1}\ifx\aeb@arg\@empty
    \let\aeb@Trans@Dur=\@empty\else\def\aeb@Trans@Dur{/D #1}\fi}
\let\aeb@Trans@Dur=\@empty
\define@choicekey+{aebTrans}{Speed}[\val\nr]%
    {Slow,Medium,Fast}[Slow]{%dps/change 02/27/07
    \ifcase\nr\relax
        \let\aeb@Trans@Speed\@empty\or
        \def\aeb@Trans@Speed{/D 0.666656}\or
        \def\aeb@Trans@Speed{/D 0.333328}
    \fi
}{\PackageWarning{aeb}{Bad choice for Speed, permissible values
   are Slow, Medium and Fast. Try again}}
\let\apb@apbTrans@Speed\@empty
\define@key{aebTrans}{PageDur}[]{\def\aeb@arg{#1}\ifx\aeb@arg\@empty
    \let\aeb@Page@Dur=\@empty\else\def\aeb@Page@Dur{/Dur #1}\fi}
\let\aeb@Page@Dur=\@empty
\def\aeb@Trans@NoTransition{}
\def\aeb@Trans@SplitHorizontalIn{/Dm/H/M/I/S/Split}
\def\aeb@Trans@SplitHorizontalOut{/Dm/H/M/O/S/Split}
\def\aeb@Trans@SplitVerticalIn{/Dm/V/M/I/S/Split}
\def\aeb@Trans@SplitVerticalOut{/Dm/V/M/O/S/Split}
\def\aeb@Trans@BlindsHorizontal{/Dm/H/S/Blinds}
\def\aeb@Trans@BlindsVertical{/Dm/V/S/Blinds}
\def\aeb@Trans@BoxIn{/M/I/S/Box}
\def\aeb@Trans@BoxOut{/M/O/S/Box}
\def\aeb@Trans@WipeLeft{/Di 180/S/Wipe}
\def\aeb@Trans@WipeRight{/Di 0/S/Wipe}
\def\aeb@Trans@WipeDown{/Di 270/S/Wipe}
\def\aeb@Trans@WipeUp{/Di 90/S/Wipe}
\def\aeb@Trans@Dissolve{/S/Dissolve}
\def\aeb@Trans@GlitterRight{/Di 0/S/Glitter}
\def\aeb@Trans@GlitterDown{/Di 270/S/Glitter}
\def\aeb@Trans@GlitterRightDown{/Di 315/S/Glitter}
\def\aeb@Trans@Replace{/S/R}
\def\aeb@Trans@FlyInRight{/Di 0/M/I/S/Fly}
\def\aeb@Trans@FlyInLeft{/Di 180/M/I/S/Fly}
\def\aeb@Trans@FlyInDown{/Di 270/M/I/S/Fly}
\def\aeb@Trans@FlyInUp{/Di 90/M/I/S/Fly}
\def\aeb@Trans@FlyOutRight{/Di 0/M/O/S/Fly}
\def\aeb@Trans@FlyOutLeft{/Di 180/M/O/S/Fly}
\def\aeb@Trans@FlyOutDown{/Di 270/M/O/S/Fly}
\def\aeb@Trans@FlyOutUp{/Di 90/M/O/S/Fly}
\def\aeb@Trans@FlyIn{/M/I/S/Fly}
\def\aeb@Trans@FlyOut{/M/O/S/Fly}
\def\aeb@Trans@PushLeft{/Di 180/S/Push}
\def\aeb@Trans@PushRight{/Di 0/S/Push}
\def\aeb@Trans@PushDown{/Di 270/S/Push}
\def\aeb@Trans@PushUp{/Di 90/S/Push}
\def\aeb@Trans@CoverLeft{/Di 180/S/Cover}
\def\aeb@Trans@CoverRight{/Di 0/S/Cover}
\def\aeb@Trans@CoverDown{/Di 270/S/Cover}
\def\aeb@Trans@CoverUp{/Di 90/S/Cover}
\def\aeb@Trans@CoverLeftDown{/Di 225.0/S/Cover}
\def\aeb@Trans@CoverLeftUp{/Di 135.0/S/Cover}
\def\aeb@Trans@CoverRightDown{/Di 315.0/S/Cover}
\def\aeb@Trans@CoverRightUp{/Di 45.0/S/Cover}
\def\aeb@Trans@UncoverLeft{/Di 180/S/Uncover}
\def\aeb@Trans@UncoverRight{/Di 0/S/Uncover}
\def\aeb@Trans@UncoverDown{/Di 270/S/Uncover}
\def\aeb@Trans@UncoverUp{/Di 90/S/Uncover}
\def\aeb@Trans@UncoverLeftDown{/Di 225.0/S/Uncover}
\def\aeb@Trans@UncoverLeftUp{/Di 135.0/S/Uncover}
\def\aeb@Trans@UncoverRightDown{/Di 315.0/S/Uncover}
\def\aeb@Trans@UncoverRightUp{/Di 45.0/S/Uncover}
\def\aeb@Trans@Fade{/S/Fade}
\def\aeb@Trans@Random{/S/Random}
\def\aeb@Trans@Blend{/S/Blend}
\def\aeb@Trans@PushLeftDown{%
    /S/Push/Directional/BiDir/Di 225.0/Curve/Easy}
\def\aeb@Trans@PushLeftUp{%
    /S/Push/Directional/BiDir/Di 135.0/Curve/Easy}
\def\aeb@Trans@PushRightDown{%
    /S/Push/Directional/BiDir/Di 315.0/Curve/Easy}
\def\aeb@Trans@PushRightUp{%
    /S/Push/Directional/BiDir/Di 45.0/Curve/Easy}
\def\aeb@Trans@WipeLeftDown{%
    /S/Wipe/Directional/BiDir/Di 225/Curve/Easy}
\def\aeb@Trans@WipeLeftUp{%
    /S/Wipe/Directional/BiDir/Di 135/Curve/Easy}
\def\aeb@Trans@WipeRightDown%
    {/S/Wipe/Directional/BiDir/Di 315/Curve/Easy}
\def\aeb@Trans@WipeRightUp{%
    /S/Wipe/Directional/BiDir/Di 45/Curve/Easy}
\def\aeb@Trans@ZoomInDown{%
    /S/ZoomIn/Directional/BiDir/Di 270.0/Curve/Easy}
\def\aeb@Trans@ZoomInLeft{%
    /S/ZoomIn/Directional/BiDir/Di 180.0/Curve/Easy}
\def\aeb@Trans@ZoomInLeftDown{%
    /S/ZoomIn/Directional/BiDir/Di 225.0/Curve/Easy}
\def\aeb@Trans@ZoomInLeftUp{%
    /S/ZoomIn/Directional/BiDir/Di 135.0/Curve/Easy}
\def\aeb@Trans@ZoomInRight{%
    /S/ZoomIn/Directional/BiDir/Di 0.0/Curve/Easy}
\def\aeb@Trans@ZoomInRightDown{%
    /S/ZoomIn/Directional/BiDir/Di 315.0/Curve/Easy}
\def\aeb@Trans@ZoomInRightUp{%
    /S/ZoomIn/Directional/BiDir/Di 45.0/Curve/Easy}
\def\aeb@Trans@ZoomInUp{%
    /S/ZoomIn/Directional/BiDir/Di 90.0/Curve/Easy}
\def\aeb@Trans@ZoomOutDown{%
    /S/ZoomOut/Directional/BiDir/Di 270.0/Curve/Easy}
\def\aeb@Trans@ZoomOutLeft{%
    /S/ZoomOut/Directional/BiDir/Di 180.0/Curve/Easy}
\def\aeb@Trans@ZoomOutLeftDown{%
    /S/ZoomOut/Directional/BiDir/Di 225.0/Curve/Easy}
\def\aeb@Trans@ZoomOutLeftUp{%
    /S/ZoomOut/Directional/BiDir/Di 135.0/Curve/Easy}
\def\aeb@Trans@ZoomOutRight{%
    /S/ZoomOut/Directional/BiDir/Di 0.0/Curve/Easy}
\def\aeb@Trans@ZoomOutRightDown{%
    /S/ZoomOut/Directional/BiDir/Di 315.0/Curve/Easy}
\def\aeb@Trans@ZoomOutRightUp{%
    /S/ZoomOut/Directional/BiDir/Di 45.0/Curve/Easy}
\def\aeb@Trans@ZoomOutUp{%
    /S/ZoomOut/Directional/BiDir/Di 90.0/Curve/Easy}
\def\aeb@Trans@CombHorizontal{%
    /S/Comb/Directional/BiDir/Dm/H/Curve/Easy}
\def\aeb@Trans@CombVertical{%
    /S/Comb/Directional/BiDir/Dm/V/Curve/Easy}
\def\canceleveryPageOpen{\global\@everyPageOpenfalse
    \global\let\every@PageOpen\@empty}
\def\canceleveryPageClose{\global\@everyPageClosefalse
    \global\let\every@PageClose\@empty}
\newenvironment{everyPageOpen}[1][]
{\global\@everyPageOpentrue\@defineJS[#1]{\every@PageOpen}}
{\end@defineJS}
\newenvironment{everyPageClose}[1][]
{\global\@everyPageClosetrue\@defineJS[#1]{\every@PageClose}}
{\end@defineJS}
\let\every@PageOpen\@empty
\let\every@PageClose\@empty
\newenvironment{addJSToPageOpen}[1][]
{\@defineJS[#1]{\addJST@PageOpen}}
{\end@defineJS
    \ifnum\value{page}=1\relax
    \gdef\myAddtoOpenJS{\OpenAction{\JS{\addJST@PageOpen}}}%
    \expandafter\aftergroup\expandafter\myAddtoOpenJS\fi
}
\newenvironment{addJSToPageOpenAt}[2][]
{\@@defineJS[#1]{addJST@PageOpenAt}{#2}}
{\end@@defineJS}
\newenvironment{addJSToPageClose}[1][]
{\@defineJS[#1]{\addJST@PageClose}}
{\end@defineJS
    \ifnum\value{page}=1\relax
    \gdef\myAddtoCloseJS{%
        \gdef\@CloseAction{/C << \JS{\addJST@PageClose} >>}}%
    \expandafter\aftergroup\expandafter\myAddtoCloseJS\fi
}
\newenvironment{addJSToPageCloseAt}[2][]
{\@@defineJS[#1]{addJST@PageCloseAt}{#2}}
{\end@@defineJS}
\let\addJST@PageOpen=\@empty
\let\addJST@PageClose=\@empty
\def\aeb@addToPageOpenCloseActions{%
    \@ifundefined{addJST@PageOpenAt\the\c@page}%
        {\def\thisOpenPageActionAt{\@empty}}%
        {\def\thisOpenPageActionAt{%
            \csname addJST@PageOpenAt\the\c@page\endcsname}}%
    \@ifundefined{addJST@PageCloseAt\the\c@page}%
        {\gdef\thisClosePageActionAt{\@empty}}%
        {\gdef\thisClosePageActionAt{%
            \csname addJST@PageCloseAt\the\c@page\endcsname}}%
    \aebPageAction{\thisOpenPageActionAt\addJST@PageOpen}%
        {\thisClosePageActionAt\addJST@PageClose}%
    \global\let\addJST@PageOpen\@empty\global\let\addJST@PageClose\@empty
}
\AddToShipoutPicture{\aeb@addToPageOpenCloseActions}
\newenvironment{@@defineJS}[3][]
{%
    \gdef\argType{#2}%
    \gdef\defineJSArg{#3}\JStoks={}%
    \def\verbatim@processline
        {%
            \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}%
            \global\JStoks=\expandafter{\JS@temp}%
        }%
    \let\do\@makeother\dospecials\catcode`\^^M\active
    #1%
    \verbatim@start
}{%
    \expandafter\aebp@rse\expandafter{\defineJSArg}%
    \edef\shakeandbake{\noexpand\@for\noexpand\@mytoks:=\the\aeb@parsetoks}%
    \aeb@parsecnt=0 \shakeandbake \do {%
        \ifnum\aeb@parsecnt=0
            \edef\firsttok{\@mytoks}%
            \expandafter\xdef\csname\argType\@mytoks\endcsname{\the\JStoks}%
        \else
            \edef\letsmakelet{\global\let\expandafter\noexpand\csname\argType\@mytoks\endcsname=\expandafter\noexpand\csname\argType\firsttok\endcsname}%
            \letsmakelet
        \fi
        \advance\aeb@parsecnt1
    }%
}
\newif\ifaeb@PageOpen
\newif\ifaeb@PageClose
\newif\if@everyPageOpen\@everyPageOpenfalse
\newif\if@everyPageClose\@everyPageClosefalse
\newcommand\aebPageAction[3][ThisPage]{%
    \let\ispageactions=0\aeb@PageOpenfalse\aeb@PageOpenfalse
    \def\@aebOpen{#2}%
    \if1\@aebOpen1%
        \if@everyPageOpen
            \aeb@PageOpentrue\let\ispageactions=1%
            \def\@aebOpen{/O << \JS{\every@PageOpen#2} >>}%
        \fi
    \else
        \let\ispageactions=1%
        \aeb@PageOpentrue
        \def\@aebOpen{/O << \JS{\every@PageOpen#2} >>}%
    \fi
    \def\@aebClose{#3}%
    \if1\@aebClose1%
        \if@everyPageClose
            \aeb@PageClosetrue\let\ispageactions=1%
            \def\@aebClose{/C << \JS{\every@PageClose#3} >>}%
        \fi
    \else
        \let\ispageactions=1%
        \aeb@PageClosetrue
        \def\@aebClose{/C << \JS{\every@PageClose#3} >>}%
    \fi
    \if@everyPageOpen\aeb@PageOpentrue\let\ispageactions=1\fi
    \if@everyPageClose\@everyPageClosetrue\let\ispageactions=1\fi
    \if\ispageactions1%
    \literalps@out{[ {#1} << /AA
        << \ifaeb@PageOpen\@aebOpen\space\fi
           \ifaeb@PageClose\@aebClose\space\fi >> >> /PUT pdfmark}%
    \fi
}
\def\aeb@exiii{\expandafter\expandafter\expandafter}
\let\ahrefexafter\aeb@exiii
\def\atPage#1{\@ifundefined{r@#1}{1}
    {\aeb@exiii\@secondoffive\csname r@#1\endcsname}}
\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
    {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
\newtoks\aeb@parsetoks
\newcount\aeb@parsecnt
\def\aeb@removelastcomma#1,\@nil{\aeb@parsetoks={#1}}
\def\aebp@rse#1{\aeb@parsetoks={}\aeb@parse#1,\relax}
\def\aeb@parse{\@ifnextchar\relax
    {\expandafter\aeb@removelastcomma\the\aeb@parsetoks\@nil}
    {\aeb@@parse}}
\def\aeb@@parse#1,{\aeb@@@parse#1-\@nil}
\def\aeb@@@parse#1-#2\@nil{%
    \def\argi{#2}\ifx\argi\@empty\def\aeb@next{\aeb@@@@parse{#1}}\else
        \def\aeb@next{\aeb@@@@@parse#1-#2}\fi\aeb@next
}
\def\aeb@@@@parse#1{%single page #1
    \aeb@parsecnt=#1
    \edef\edefaeb@parsetoks{\the\aeb@parsetoks\the\aeb@parsecnt,}%
    \aeb@parsetoks=\expandafter{\edefaeb@parsetoks}%
    \aeb@parse}
\def\aeb@@@@@parse#1-#2-{\def\aeb@lowerlimit{#1}\def\aeb@upperlimit{#2}%
    % range argument from #1 to \csname aebLastPage\endcsname
    \ifx\aeb@upperlimit\@empty
        \@ifundefined{aebLastPage}{\aeb@parsecnt=#1}
            {\expandafter\aeb@parsecnt\expandafter=\csname aebLastPage\endcsname}%
    \else % page range #1 to #2, switch the two if #2 < #1
        \aeb@parsecnt=\aeb@lowerlimit
        \edef\aeb@lowerlimit{\the\aeb@parsecnt}
        \aeb@parsecnt=\aeb@upperlimit
        \ifnum\aeb@parsecnt<\aeb@lowerlimit\relax
            \aeb@parsecnt=\aeb@lowerlimit
            \def\aeb@lowerlimit{#2}%
            \def\aeb@upperlimit{#1}%
        \fi
    \fi
       \advance\aeb@parsecnt1
       \edef\aeb@upperlimit{\the\aeb@parsecnt}%
       \aeb@parsecnt=\aeb@lowerlimit
    \loop
        \edef\edefaeb@parsetoks{\the\aeb@parsetoks\the\aeb@parsecnt,}%
        \aeb@parsetoks=\expandafter{\edefaeb@parsetoks}%
        \advance\aeb@parsecnt1
    \ifnum\aeb@parsecnt < \aeb@upperlimit\repeat
    \aeb@parse}
\newenvironment{willClose}
{\@defineJS{\will@Close}}
{\end@defineJS}
\let\will@Close=\@empty
\newenvironment{fs@willClose}
{\@defineJS{\fs@will@Close}}
{\end@defineJS}
\let\fs@will@Close\@empty
\newenvironment{willSave}
{\@defineJS{\will@Save}}
{\end@defineJS}
\let\will@Save=\@empty
\newenvironment{didSave}
{\@defineJS{\did@Save}}
{\end@defineJS}
\let\did@Save=\@empty
\newenvironment{willPrint}
{\@defineJS{\will@Print}}
{\end@defineJS}
\let\will@Print=\@empty
\newenvironment{didPrint}
{\@defineJS{\did@Print}}
{\end@defineJS}
\let\did@Print=\@empty
\newcommand\@setDocActions{\literalps@out{%
[ {Catalog} << /AA <<
   \ifx\will@Close\@empty\else/WC << /S/JavaScript/JS(\fs@will@Close\will@Close) >>\fi
   \ifx\will@Save\@empty\else/WS << /S/JavaScript/JS(\will@Save) >>\fi
   \ifx\did@Save\@empty\else/DS << /S/JavaScript/JS(\did@Save) >>\fi
   \ifx\will@Print\@empty\else/WP << /S/JavaScript/JS(\will@Print) >>\fi
   \ifx\did@Print\@empty\else/DP << /S/JavaScript/JS(\did@Print) >>\fi
    >> >>
    /PUT pdfmark}%
}
\AtBeginDocument{\@setDocActions}
\def\aref(#1){\csname aeb@aName@#1\endcsname}
\def\aeb@initAttachWrite{%
    \newwrite \aeb@attachmentswrite
    \immediate\openout \aeb@attachmentswrite \jobname_attach.cut
    \let\verbatim@out\aeb@attachmentswrite
    \aeb@IWVO{\string\begin{execJS}{\jobname_attach}}%
    {\lccode`P=`\{\lowercase{\aeb@IWVO{try P}}}%
}
\ifx\aeb@attachsource\@empty
    \ifx\aeb@attachments\@empty
    \else\aeb@initAttachWrite\fi
\else
    \@ifundefined{aeb@attachmentswrite}
    {\aeb@initAttachWrite}{}
\fi
\ifx\aeb@attachsource\@empty\else
    \edef\temp@expand{\noexpand\@for\noexpand\@@tmp:=\aeb@attachsource}
    \temp@expand\do
    {%
        \aeb@IWVO{\space\space\space\space\string\importDataObject({cName: "\jobname.\@@tmp", cDIPath: "\jobname.\@@tmp"});}%
        \expandafter\edef\csname aeb@aName@\@@tmp\endcsname{\jobname.\@@tmp}
    }
\fi
\def\jsstrsps{replace(/^\string\s*/, "")}
\ifx\aeb@attachments\@empty\else
    \aeb@parsecnt=0
    \edef\temp@expand{\noexpand\@for\noexpand\@@tmp:=\aeb@attachments}
    \temp@expand\do
    {%
        \advance\aeb@parsecnt1
        \aeb@IWVO{\space\space\space\space\string\importDataObject({cName:"\string\aref(attach\the\aeb@parsecnt)", cDIPath: "\@@tmp".\jsstrsps});}
        \expandafter\xdef\csname aeb@aName@attach\the\aeb@parsecnt\endcsname{AeB Attachment \the\aeb@parsecnt}
    }
\fi
\@ifundefined{aeb@attachmentswrite}{}
{%
    {\lccode`P=`\}\def\jsMsg{"Attachments error: " + e.toString()}\lowercase{\aeb@IWVO{P catch(e) { console.println( \jsMsg\space); }}}}%
    \aeb@IWVO{\string\end{execJS}}
    \immediate\closeout \aeb@attachmentswrite
}
\def\aeb@inputAttachments{\@ifundefined{aeb@attachmentswrite}{}
    {\InputIfFileExists{\jobname_attach.cut}%
    {\typeout{Inputting attachments file}}%
    {\typeout{Cannot find attachments file}}}%
}
\define@choicekey+{aebpdfpack}{viewmode}[\val\nr]{details,tile,hidden}
{%
    \ifcase\nr\relax
        \def\aeb@pdfpack@viewmode{/D}%
    \or
        \def\aeb@pdfpack@viewmode{/T}%
    \or
        \def\aeb@pdfpack@viewmode{/H}%
    \fi
}{}
\define@key{aebpdfpack}{initview}[]{\def\aeb@pdfpack@initview{#1}}
\let\aeb@pdfpack@initview\@empty
\newcommand{\makePDFPackage}[1]{%
    \setkeys{aebpdfpack}{viewmode=details}%
    \setkeys{aebpdfpack}{#1}%
    \ifx\aeb@pdfpack@initview\@empty
        \let\aeb@pdfpackage@initview\@empty
    \else
        {\obeyspaces\sanitize@attach\gdef\aeb@pdfpackage@initview{/D<\aeb@exiii\stringiiUnicode\aref(\aeb@pdfpack@initview)\relax>}}%
    \fi
    \def\aeb@setPDFPackage{%
        \literalps@out{[ {Catalog} <<
            /PageMode/UseAttachments
            /Collection<</Type/Collection\aeb@pdfpackage@initview/View\aeb@pdfpack@viewmode>>
        >>/PUT pdfmark}%
    }%
}
\@onlypreamble\makePDFPackage
\newenvironment{docassembly}{%
\execJS{docassembly}
}{\endexecJS}
\def\theDocObject{this}
\def\addWatermarkFromFile#1#2{%
aebTrustedFunctions#1\theDocObject, aebAddWatermarkFromFile, #2}
\def\importIcon#1#2{%
aebTrustedFunctions#1\theDocObject, aebImportIcon, #2}
\def\importSound#1#2{%
aebTrustedFunctions#1\theDocObject, aebImportSound, #2}
\def\appopenDoc#1#2{%
aebTrustedFunctions#1\theDocObject, aebAppOpenDoc, #2} % doesn't use doc
\def\insertPages#1#2{%
aebTrustedFunctions#1\theDocObject, aebInsertPages, #2}
\def\importDataObject#1#2{%
aebTrustedFunctions#1\theDocObject, aebImportDataObject, #2}
\def\executeSave#1{%
aebTrustedFunctions#1\theDocObject, aebSaveAs, "Save"}
\endinput
%%
%% End of file `aebpro.def'.
